feat(console): add HIGHLIGHTSTATE enum

This commit is contained in:
Tristan Cormier 2025-10-02 20:02:50 -04:00 committed by fallenoak
parent 0861448de9
commit d30d5c49dc
2 changed files with 9 additions and 2 deletions

View File

@ -21,7 +21,7 @@ static float s_consoleLines = 10.0f;
static float s_fontHeight = 0.02f; static float s_fontHeight = 0.02f;
static float s_consoleHeight = s_consoleLines * s_fontHeight; static float s_consoleHeight = s_consoleLines * s_fontHeight;
static char s_fontName[STORM_MAX_PATH]; static char s_fontName[STORM_MAX_PATH];
static int32_t s_highlightState; static HIGHLIGHTSTATE s_highlightState;
static HLAYER s_layerBackground; static HLAYER s_layerBackground;
static HLAYER s_layerText; static HLAYER s_layerText;
static RECTF s_rect = { 0.0f, 1.0f, 1.0f, 1.0f }; static RECTF s_rect = { 0.0f, 1.0f, 1.0f, 1.0f };
@ -77,7 +77,7 @@ void PaintBackground(void* param, const RECTF* rect, const RECTF* visible, float
if (s_rect.bottom < 1.0f) { if (s_rect.bottom < 1.0f) {
DrawBackground(); DrawBackground();
if (s_highlightState) { if (s_highlightState != HS_NONE) {
DrawHighLight(); DrawHighLight();
} }
} }

View File

@ -34,4 +34,11 @@ enum CONSOLERESIZESTATE {
NUM_CONSOLERESIZESTATES, NUM_CONSOLERESIZESTATES,
}; };
enum HIGHLIGHTSTATE {
HS_NONE,
HS_HIGHLIGHTING,
HS_ENDHIGHLIGHT,
NUM_HIGHLIGHTSTATES
};
#endif #endif