From 79b599373283be10634edd3965a460fb4184343a Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Fri, 10 Feb 2023 00:54:00 +0100 Subject: [PATCH] Set a different placement and font size for the helpsystem when running on a vertically oriented screen. --- es-core/src/HelpStyle.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/es-core/src/HelpStyle.cpp b/es-core/src/HelpStyle.cpp index b416844f6..ae8679fa1 100644 --- a/es-core/src/HelpStyle.cpp +++ b/es-core/src/HelpStyle.cpp @@ -13,22 +13,22 @@ #define PREFIX "button_" HelpStyle::HelpStyle() - : position {Renderer::getScreenWidth() * 0.012f, Renderer::getScreenHeight() * 0.9515f} - , origin {glm::vec2 {}} + : position {Renderer::getScreenWidth() * 0.012f, + Renderer::getScreenHeight() * + (Renderer::getIsVerticalOrientation() ? 0.975f : 0.9515f)} + , origin {glm::vec2 {0.0f, 0.0f}} , textColor {0x777777FF} , textColorDimmed {0x777777FF} , iconColor {0x777777FF} , iconColorDimmed {0x777777FF} + , font {Renderer::getIsVerticalOrientation() ? Font::get(0.025f * Renderer::getScreenWidth()) : + Font::get(FONT_SIZE_SMALL)} , entrySpacing {0.00833f} , iconTextSpacing {0.00416f} , opacity {1.0f} , legacyTheme {false} , letterCase {"uppercase"} { - if (FONT_SIZE_SMALL != 0) - font = Font::get(FONT_SIZE_SMALL); - else - font = nullptr; } void HelpStyle::applyTheme(const std::shared_ptr& theme, const std::string& view)