summaryrefslogtreecommitdiffstats
path: root/src/game/client/gui/direct_connection.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2026-01-05 02:20:01 +0500
committeruntodesu <kirill@untode.su>2026-01-05 02:20:01 +0500
commit915e52157208af9b41dd52892e7138c8c440e85b (patch)
tree718224dbf69a1fdf557131a648c34e60dbdca25d /src/game/client/gui/direct_connection.cc
parenta1c83d56f41e6f2e0ad86dcd76d1446bfc60a37c (diff)
downloadvoxelius-915e52157208af9b41dd52892e7138c8c440e85b.tar.bz2
voxelius-915e52157208af9b41dd52892e7138c8c440e85b.zip
Progress
Diffstat (limited to 'src/game/client/gui/direct_connection.cc')
-rw-r--r--src/game/client/gui/direct_connection.cc8
1 files changed, 4 insertions, 4 deletions
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<GlfwKeyEvent>().connect<&on_glfw_key>();
+ globals::dispatcher.sink<KeyEvent>().connect<&on_key>();
globals::dispatcher.sink<LanguageSetEvent>().connect<&on_language_set>();
}