diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 18:23:01 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 18:23:01 +0500 |
| commit | 1ae8ef5905bea12c35c45aeceab5a14d9b0ad8f9 (patch) | |
| tree | dcf1177d4fba8eac790876f685c9bfbb0d6cfe84 /src/game/client | |
| parent | 2d43c8c2c66de167be8c55c3769a7bf5e9ffe24c (diff) | |
| download | voxelius-1ae8ef5905bea12c35c45aeceab5a14d9b0ad8f9.tar.bz2 voxelius-1ae8ef5905bea12c35c45aeceab5a14d9b0ad8f9.zip | |
Fixup scaling for most of GUI elements
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/gui/crosshair.cc | 4 | ||||
| -rw-r--r-- | src/game/client/gui/scoreboard.cc | 2 | ||||
| -rw-r--r-- | src/game/client/gui/splash.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/game/client/gui/crosshair.cc b/src/game/client/gui/crosshair.cc index 758a10b..088796d 100644 --- a/src/game/client/gui/crosshair.cc +++ b/src/game/client/gui/crosshair.cc @@ -34,8 +34,8 @@ void crosshair::layout(void) auto viewport = ImGui::GetMainViewport(); auto draw_list = ImGui::GetForegroundDrawList(); - auto scaled_width = glm::max<int>(texture->size.x, static_cast<int>(globals::gui_scale * texture->size.x / 2.0f)); - auto scaled_height = glm::max<int>(texture->size.y, static_cast<int>(globals::gui_scale * texture->size.y / 2.0f)); + auto scaled_width = glm::max<int>(static_cast<int>(1.25f * texture->size.x), static_cast<int>(globals::gui_scale * texture->size.x)); + auto scaled_height = glm::max<int>(static_cast<int>(1.25f * texture->size.y), static_cast<int>(globals::gui_scale * texture->size.y)); auto start = ImVec2(static_cast<int>(0.5f * viewport->Size.x) - (scaled_width / 2.0f), static_cast<float>(static_cast<int>(0.5f * viewport->Size.y) - (scaled_height / 2.0f))); auto end = ImVec2(start.x + scaled_width, start.y + scaled_height); diff --git a/src/game/client/gui/scoreboard.cc b/src/game/client/gui/scoreboard.cc index efd2d6d..23f3174 100644 --- a/src/game/client/gui/scoreboard.cc +++ b/src/game/client/gui/scoreboard.cc @@ -52,7 +52,7 @@ void scoreboard::layout(void) return; } - ImGui::PushFont(globals::font_unscii16, 8.0f); + ImGui::PushFont(globals::font_unscii16, 16.0f); const auto& padding = ImGui::GetStyle().FramePadding; const auto& spacing = ImGui::GetStyle().ItemSpacing; diff --git a/src/game/client/gui/splash.cc b/src/game/client/gui/splash.cc index cb035e9..84ecb8b 100644 --- a/src/game/client/gui/splash.cc +++ b/src/game/client/gui/splash.cc @@ -152,7 +152,7 @@ void client_splash::render(void) const ImVec2 image_pos = ImVec2(image_x, image_y); if(!current_text.empty()) { - ImGui::PushFont(globals::font_unscii8, 8.0f); + ImGui::PushFont(globals::font_unscii8, 16.0f); ImGui::SetCursorPos(ImVec2(16.0f, 16.0f)); ImGui::TextDisabled("%s", current_text.c_str()); ImGui::PopFont(); |
