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

Commit

Permalink
console: rewrite to ui framework
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Sep 24, 2024
1 parent 4c983db commit 02abd9b
Show file tree
Hide file tree
Showing 16 changed files with 669 additions and 322 deletions.
4 changes: 4 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,16 @@ dll_sources = [
'src/game/shell.c',
'src/game/sound.c',
'src/game/text.c',
'src/game/ui/common.c',
'src/game/ui/controllers/controls.c',
'src/game/ui/events.c',
'src/game/ui/widgets/console.c',
'src/game/ui/widgets/controls_column.c',
'src/game/ui/widgets/controls_dialog.c',
'src/game/ui/widgets/controls_input_selector.c',
'src/game/ui/widgets/controls_layout_selector.c',
'src/game/ui/widgets/label.c',
'src/game/ui/widgets/prompt.c',
'src/game/ui/widgets/stack.c',
'src/game/ui/widgets/window.c',
'src/global/enum_str.c',
Expand Down
9 changes: 7 additions & 2 deletions src/decomp/decomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "game/shell.h"
#include "game/sound.h"
#include "game/text.h"
#include "game/ui/common.h"
#include "global/const.h"
#include "global/funcs.h"
#include "global/vars.h"
Expand Down Expand Up @@ -561,6 +562,7 @@ void __cdecl Shell_Shutdown(void)
if (g_ErrorMessage[0]) {
MessageBoxA(NULL, g_ErrorMessage, NULL, MB_ICONWARNING);
}
UI_Shutdown();
}

int16_t __cdecl TitleSequence(void)
Expand Down Expand Up @@ -749,10 +751,13 @@ bool __cdecl WinVidSpinMessageLoop(bool need_wait)
g_MessageLoopCounter--;
return 0;
} else if (msg.message == WM_KEYDOWN) {
Console_HandleKeyDown(msg.wParam);
UI_HandleKeyDown(msg.wParam);
return 0;
} else if (msg.message == WM_KEYUP) {
UI_HandleKeyUp(msg.wParam);
return 0;
} else if (msg.message == WM_CHAR) {
Console_HandleChar(msg.wParam);
UI_HandleChar(msg.wParam);
return 0;
}
}
Expand Down
Loading

0 comments on commit 02abd9b

Please sign in to comment.