From 915e52157208af9b41dd52892e7138c8c440e85b Mon Sep 17 00:00:00 2001 From: untodesu Date: Mon, 5 Jan 2026 02:20:01 +0500 Subject: Progress --- src/game/client/gui/direct_connection.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/game/client/gui/direct_connection.cc') diff --git a/src/game/client/gui/direct_connection.cc b/src/game/client/gui/direct_connection.cc index 2b75a44..775140c 100644 --- a/src/game/client/gui/direct_connection.cc +++ b/src/game/client/gui/direct_connection.cc @@ -16,7 +16,7 @@ #include "client/gui/gui_screen.hh" #include "client/gui/language.hh" -#include "client/io/glfw.hh" +#include "client/io/keyboard.hh" #include "client/game.hh" #include "client/globals.hh" @@ -34,9 +34,9 @@ static std::string str_password; static std::string direct_hostname; static std::string direct_password; -static void on_glfw_key(const GlfwKeyEvent& event) +static void on_key(const KeyEvent& event) { - if((event.key == GLFW_KEY_ESCAPE) && (event.action == GLFW_PRESS)) { + if(event.is_keycode(GLFW_KEY_ESCAPE) && event.is_action(GLFW_PRESS)) { if(globals::gui_screen == GUI_DIRECT_CONNECTION) { globals::gui_screen = GUI_PLAY_MENU; return; @@ -79,7 +79,7 @@ static void connect_to_server(void) void direct_connection::init(void) { - globals::dispatcher.sink().connect<&on_glfw_key>(); + globals::dispatcher.sink().connect<&on_key>(); globals::dispatcher.sink().connect<&on_language_set>(); } -- cgit