mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-29 07:32:02 +00:00
Make con_height adjustable on the fly
This commit is contained in:
parent
256d9b5fdb
commit
435e1f6e7e
1 changed files with 14 additions and 1 deletions
|
@ -110,6 +110,7 @@ static void CON_RecalcSize(void);
|
|||
static void CON_ChangeHeight(void);
|
||||
|
||||
static void CON_DrawBackpic(void);
|
||||
static void CONS_height_Change(void);
|
||||
static void CONS_hudlines_Change(void);
|
||||
static void CONS_backcolor_Change(void);
|
||||
|
||||
|
@ -136,7 +137,7 @@ static CV_PossibleValue_t speed_cons_t[] = {{0, "MIN"}, {64, "MAX"}, {0, NULL}};
|
|||
static consvar_t cons_speed = CVAR_INIT ("con_speed", "8", CV_SAVE, speed_cons_t, NULL);
|
||||
|
||||
// percentage of screen height to use for console
|
||||
static consvar_t cons_height = CVAR_INIT ("con_height", "50", CV_SAVE, CV_Unsigned, NULL);
|
||||
static consvar_t cons_height = CVAR_INIT ("con_height", "50", CV_CALL|CV_SAVE, CV_Unsigned, CONS_height_Change);
|
||||
|
||||
static CV_PossibleValue_t backpic_cons_t[] = {{0, "translucent"}, {1, "picture"}, {0, NULL}};
|
||||
// whether to use console background picture, or translucent mode
|
||||
|
@ -156,6 +157,18 @@ consvar_t cons_backcolor = CVAR_INIT ("con_backcolor", "Green", CV_CALL|CV_SAVE,
|
|||
|
||||
static void CON_Print(char *msg);
|
||||
|
||||
// Change the console height on demand
|
||||
//
|
||||
static void CONS_height_Change(void)
|
||||
{
|
||||
Lock_state();
|
||||
|
||||
if (con_destlines > 0 && !con_startup) // If the console is open (as in, not using "bind")...
|
||||
CON_ChangeHeight(); // ...update its height now, not only when it's closed and re-opened
|
||||
|
||||
Unlock_state();
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
static void CONS_hudlines_Change(void)
|
||||
|
|
Loading…
Reference in a new issue