diff options
| author | untodesu <kirill@untode.su> | 2026-01-05 02:20:01 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2026-01-05 02:20:01 +0500 |
| commit | 915e52157208af9b41dd52892e7138c8c440e85b (patch) | |
| tree | 718224dbf69a1fdf557131a648c34e60dbdca25d /src/game/client/gui/main_menu.cc | |
| parent | a1c83d56f41e6f2e0ad86dcd76d1446bfc60a37c (diff) | |
| download | voxelius-915e52157208af9b41dd52892e7138c8c440e85b.tar.bz2 voxelius-915e52157208af9b41dd52892e7138c8c440e85b.zip | |
Progress
Diffstat (limited to 'src/game/client/gui/main_menu.cc')
| -rw-r--r-- | src/game/client/gui/main_menu.cc | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/game/client/gui/main_menu.cc b/src/game/client/gui/main_menu.cc index 6fa5cc9..de96538 100644 --- a/src/game/client/gui/main_menu.cc +++ b/src/game/client/gui/main_menu.cc @@ -17,9 +17,8 @@ #include "client/gui/imutils_button.hh" #include "client/gui/imutils_popup.hh" #include "client/gui/language.hh" -#include "client/gui/window_title.hh" -#include "client/io/glfw.hh" +#include "client/io/keyboard.hh" #include "client/resource/texture_gui.hh" @@ -36,9 +35,9 @@ static std::string str_quit_popup_title; static std::string str_quit_popup_question; static std::string str_quit_popup_choices[2]; -static void on_glfw_key(const GlfwKeyEvent& event) +static void on_key(const KeyEvent& event) { - if(session::is_ingame() && (event.key == GLFW_KEY_ESCAPE) && (event.action == GLFW_PRESS)) { + if(session::is_ingame() && event.is_keycode(GLFW_KEY_ESCAPE) && event.is_action(GLFW_PRESS)) { if(globals::gui_screen == GUI_SCREEN_NONE) { globals::gui_screen = GUI_MAIN_MENU; return; @@ -67,7 +66,7 @@ static void on_language_set(const LanguageSetEvent& event) void main_menu::init(void) { - globals::dispatcher.sink<GlfwKeyEvent>().connect<&on_glfw_key>(); + globals::dispatcher.sink<KeyEvent>().connect<&on_key>(); globals::dispatcher.sink<LanguageSetEvent>().connect<&on_language_set>(); } |
