summaryrefslogtreecommitdiffstats
path: root/src/game/client/gui/direct_connection.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
committeruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
commit6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch)
treef085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/client/gui/direct_connection.cc
parentf40d09cb8f712e87691af4912f3630d92d692779 (diff)
downloadvoxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2
voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/client/gui/direct_connection.cc')
-rw-r--r--src/game/client/gui/direct_connection.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/game/client/gui/direct_connection.cc b/src/game/client/gui/direct_connection.cc
index 39ea2b5..d7cea64 100644
--- a/src/game/client/gui/direct_connection.cc
+++ b/src/game/client/gui/direct_connection.cc
@@ -29,7 +29,7 @@ static std::string str_password;
static std::string direct_hostname;
static std::string direct_password;
-static void on_glfw_key(const io::GlfwKeyEvent& event)
+static void on_glfw_key(const GlfwKeyEvent& event)
{
if((event.key == GLFW_KEY_ESCAPE) && (event.action == GLFW_PRESS)) {
if(globals::gui_screen == GUI_DIRECT_CONNECTION) {
@@ -39,14 +39,14 @@ static void on_glfw_key(const io::GlfwKeyEvent& event)
}
}
-static void on_language_set(const gui::LanguageSetEvent& event)
+static void on_language_set(const LanguageSetEvent& event)
{
- str_title = gui::language::resolve("direct_connection.title");
- str_connect = gui::language::resolve_gui("direct_connection.connect");
- str_cancel = gui::language::resolve_gui("direct_connection.cancel");
+ str_title = language::resolve("direct_connection.title");
+ str_connect = language::resolve_gui("direct_connection.connect");
+ str_cancel = language::resolve_gui("direct_connection.cancel");
- str_hostname = gui::language::resolve("direct_connection.hostname");
- str_password = gui::language::resolve("direct_connection.password");
+ str_hostname = language::resolve("direct_connection.hostname");
+ str_password = language::resolve("direct_connection.password");
}
static void connect_to_server(void)
@@ -72,13 +72,13 @@ static void connect_to_server(void)
session::connect(parsed_hostname.c_str(), parsed_port, direct_password.c_str());
}
-void gui::direct_connection::init(void)
+void direct_connection::init(void)
{
- globals::dispatcher.sink<io::GlfwKeyEvent>().connect<&on_glfw_key>();
+ globals::dispatcher.sink<GlfwKeyEvent>().connect<&on_glfw_key>();
globals::dispatcher.sink<LanguageSetEvent>().connect<&on_language_set>();
}
-void gui::direct_connection::layout(void)
+void direct_connection::layout(void)
{
auto viewport = ImGui::GetMainViewport();
auto window_start = ImVec2(0.25f * viewport->Size.x, 0.20f * viewport->Size.y);