From 6c2abde5c99a236453b795abaa6d7d70105e31f7 Mon Sep 17 00:00:00 2001 From: untodesu Date: Fri, 26 Dec 2025 14:50:33 +0500 Subject: Just a big Ctrl+H refactoring --- src/game/client/gui/direct_connection.cc | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 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 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().connect<&on_glfw_key>(); + globals::dispatcher.sink().connect<&on_glfw_key>(); globals::dispatcher.sink().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); -- cgit