mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- Expose ConsoleState to scripts
- Make ConsoleState uint8_t sized
This commit is contained in:
parent
69778667aa
commit
c6ae73d6d2
5 changed files with 17 additions and 7 deletions
|
@ -104,7 +104,9 @@ bool vidactive = false;
|
|||
bool cursoron = false;
|
||||
int ConBottom, ConScroll, RowAdjust;
|
||||
uint64_t CursorTicker;
|
||||
constate_e ConsoleState = c_up;
|
||||
uint8_t ConsoleState = c_up;
|
||||
|
||||
DEFINE_GLOBAL(ConsoleState)
|
||||
|
||||
static int TopLine, InsertLine;
|
||||
|
||||
|
|
|
@ -41,11 +41,10 @@
|
|||
|
||||
struct event_t;
|
||||
|
||||
typedef enum cstate_t
|
||||
enum cstate_t : uint8_t
|
||||
{
|
||||
c_up=0, c_down=1, c_falling=2, c_rising=3
|
||||
}
|
||||
constate_e;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
|
@ -53,7 +52,7 @@ enum
|
|||
};
|
||||
extern int PrintColors[PRINTLEVELS + 2];
|
||||
|
||||
extern constate_e ConsoleState;
|
||||
extern uint8_t ConsoleState;
|
||||
|
||||
// Initialize the console
|
||||
void C_InitConsole (int width, int height, bool ingame);
|
||||
|
|
|
@ -56,7 +56,7 @@ CVAR(Bool, use_mouse, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
|||
CVAR(Bool, k_allowfullscreentoggle, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||
|
||||
extern int paused, chatmodeon;
|
||||
extern constate_e ConsoleState;
|
||||
extern uint8_t ConsoleState;
|
||||
extern bool ToggleFullscreen;
|
||||
bool GUICapture;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ CVAR (Bool, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
|
||||
|
||||
extern int WaitingForKey, chatmodeon;
|
||||
extern constate_e ConsoleState;
|
||||
extern uint8_t ConsoleState;
|
||||
|
||||
static const SDL_Keycode DIKToKeySym[256] =
|
||||
{
|
||||
|
|
|
@ -143,6 +143,14 @@ enum EPrintLevel
|
|||
PRINT_NOLOG = 2048, // Flag - do not print to log file
|
||||
};
|
||||
|
||||
enum EConsoleState
|
||||
{
|
||||
c_up = 0,
|
||||
c_down = 1,
|
||||
c_falling = 2,
|
||||
c_rising = 3
|
||||
};
|
||||
|
||||
/*
|
||||
// These are here to document the intrinsic methods and fields available on
|
||||
// the built-in ZScript types
|
||||
|
@ -211,6 +219,7 @@ struct _ native // These are the global variables, the struct is only here to av
|
|||
native readonly int consoleplayer;
|
||||
native readonly double NotifyFontScale;
|
||||
native readonly int paused;
|
||||
native readonly ui uint8 ConsoleState;
|
||||
}
|
||||
|
||||
struct System native
|
||||
|
|
Loading…
Reference in a new issue