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/splash.cc | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/game/client/gui/splash.cc') diff --git a/src/game/client/gui/splash.cc b/src/game/client/gui/splash.cc index fab3ad8..cb035e9 100644 --- a/src/game/client/gui/splash.cc +++ b/src/game/client/gui/splash.cc @@ -32,24 +32,24 @@ static float texture_alpha; static std::uint64_t end_time; static std::string current_text; -static void on_glfw_key(const io::GlfwKeyEvent& event) +static void on_glfw_key(const GlfwKeyEvent& event) { end_time = UINT64_C(0); } -static void on_glfw_mouse_button(const io::GlfwMouseButtonEvent& event) +static void on_glfw_mouse_button(const GlfwMouseButtonEvent& event) { end_time = UINT64_C(0); } -static void on_glfw_scroll(const io::GlfwScrollEvent& event) +static void on_glfw_scroll(const GlfwScrollEvent& event) { end_time = UINT64_C(0); } -void gui::client_splash::init(void) +void client_splash::init(void) { - if(io::cmdline::contains("nosplash")) { + if(cmdline::contains("nosplash")) { texture = nullptr; texture_aspect = 0.0f; texture_alpha = 0.0f; @@ -74,7 +74,7 @@ void gui::client_splash::init(void) } } -void gui::client_splash::init_late(void) +void client_splash::init_late(void) { if(!texture) { // We don't have to waste time @@ -84,11 +84,11 @@ void gui::client_splash::init_late(void) end_time = utils::unix_microseconds() + DELAY_MICROSECONDS; - globals::dispatcher.sink().connect<&on_glfw_key>(); - globals::dispatcher.sink().connect<&on_glfw_mouse_button>(); - globals::dispatcher.sink().connect<&on_glfw_scroll>(); + globals::dispatcher.sink().connect<&on_glfw_key>(); + globals::dispatcher.sink().connect<&on_glfw_mouse_button>(); + globals::dispatcher.sink().connect<&on_glfw_scroll>(); - current_text = gui::language::resolve("splash.skip_prompt"); + current_text = language::resolve("splash.skip_prompt"); while(!glfwWindowShouldClose(globals::window)) { const std::uint64_t curtime = utils::unix_microseconds(); @@ -100,12 +100,12 @@ void gui::client_splash::init_late(void) texture_alpha = glm::smoothstep(0.25f, 0.6f, static_cast(remains) / static_cast(DELAY_MICROSECONDS)); - gui::client_splash::render(); + client_splash::render(); } - globals::dispatcher.sink().disconnect<&on_glfw_key>(); - globals::dispatcher.sink().disconnect<&on_glfw_mouse_button>(); - globals::dispatcher.sink().disconnect<&on_glfw_scroll>(); + globals::dispatcher.sink().disconnect<&on_glfw_key>(); + globals::dispatcher.sink().disconnect<&on_glfw_mouse_button>(); + globals::dispatcher.sink().disconnect<&on_glfw_scroll>(); texture = nullptr; texture_aspect = 0.0f; @@ -113,7 +113,7 @@ void gui::client_splash::init_late(void) end_time = UINT64_C(0); } -void gui::client_splash::render(void) +void client_splash::render(void) { if(!texture) { // We don't have to waste time @@ -152,7 +152,7 @@ void gui::client_splash::render(void) const ImVec2 image_pos = ImVec2(image_x, image_y); if(!current_text.empty()) { - ImGui::PushFont(globals::font_unscii8, 16.0f); + ImGui::PushFont(globals::font_unscii8, 8.0f); ImGui::SetCursorPos(ImVec2(16.0f, 16.0f)); ImGui::TextDisabled("%s", current_text.c_str()); ImGui::PopFont(); -- cgit