Skip to content
This repository was archived by the owner on Oct 4, 2024. It is now read-only.

Commit 02abd9b

Browse files
committed
console: rewrite to ui framework
1 parent 4c983db commit 02abd9b

File tree

16 files changed

+669
-322
lines changed

16 files changed

+669
-322
lines changed

meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,16 @@ dll_sources = [
161161
'src/game/shell.c',
162162
'src/game/sound.c',
163163
'src/game/text.c',
164+
'src/game/ui/common.c',
164165
'src/game/ui/controllers/controls.c',
166+
'src/game/ui/events.c',
167+
'src/game/ui/widgets/console.c',
165168
'src/game/ui/widgets/controls_column.c',
166169
'src/game/ui/widgets/controls_dialog.c',
167170
'src/game/ui/widgets/controls_input_selector.c',
168171
'src/game/ui/widgets/controls_layout_selector.c',
169172
'src/game/ui/widgets/label.c',
173+
'src/game/ui/widgets/prompt.c',
170174
'src/game/ui/widgets/stack.c',
171175
'src/game/ui/widgets/window.c',
172176
'src/global/enum_str.c',

src/decomp/decomp.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include "game/shell.h"
2323
#include "game/sound.h"
2424
#include "game/text.h"
25+
#include "game/ui/common.h"
2526
#include "global/const.h"
2627
#include "global/funcs.h"
2728
#include "global/vars.h"
@@ -561,6 +562,7 @@ void __cdecl Shell_Shutdown(void)
561562
if (g_ErrorMessage[0]) {
562563
MessageBoxA(NULL, g_ErrorMessage, NULL, MB_ICONWARNING);
563564
}
565+
UI_Shutdown();
564566
}
565567

566568
int16_t __cdecl TitleSequence(void)
@@ -749,10 +751,13 @@ bool __cdecl WinVidSpinMessageLoop(bool need_wait)
749751
g_MessageLoopCounter--;
750752
return 0;
751753
} else if (msg.message == WM_KEYDOWN) {
752-
Console_HandleKeyDown(msg.wParam);
754+
UI_HandleKeyDown(msg.wParam);
755+
return 0;
756+
} else if (msg.message == WM_KEYUP) {
757+
UI_HandleKeyUp(msg.wParam);
753758
return 0;
754759
} else if (msg.message == WM_CHAR) {
755-
Console_HandleChar(msg.wParam);
760+
UI_HandleChar(msg.wParam);
756761
return 0;
757762
}
758763
}

0 commit comments

Comments
 (0)