From f8c15f3a4b499297ece447436d11c2558c7a8992 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Fri, 7 Apr 2023 20:50:47 +0300 Subject: [PATCH 1/2] InfoBar: disable scrollbar --- client/adventureMap/CInfoBar.cpp | 2 +- client/adventureMap/CInfoBar.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/adventureMap/CInfoBar.cpp b/client/adventureMap/CInfoBar.cpp index d1c1b1b6e..d5ceb969d 100644 --- a/client/adventureMap/CInfoBar.cpp +++ b/client/adventureMap/CInfoBar.cpp @@ -214,7 +214,7 @@ CInfoBar::VisibleComponentInfo::VisibleComponentInfo(const std::vector(message, textRect, 0, font, ETextAlignment::CENTER, Colors::WHITE); + text = std::make_shared(textRect, font, ETextAlignment::CENTER, Colors::WHITE, message); } void CInfoBar::playNewDaySound() diff --git a/client/adventureMap/CInfoBar.h b/client/adventureMap/CInfoBar.h index 3a507e879..63ec62991 100644 --- a/client/adventureMap/CInfoBar.h +++ b/client/adventureMap/CInfoBar.h @@ -27,7 +27,7 @@ class CComponentBox; class CHeroTooltip; class CTownTooltip; class CLabel; -class CTextBox; +class CMultiLineLabel; /// Info box which shows next week/day information, hold the current date class CInfoBar : public CIntObject @@ -112,7 +112,7 @@ private: class VisibleComponentInfo : public CVisibleInfo { std::shared_ptr comps; - std::shared_ptr text; + std::shared_ptr text; public: struct Cache { From 50c9a571335cf2616b5986fb278981816a7dbde8 Mon Sep 17 00:00:00 2001 From: Konstantin Date: Sat, 8 Apr 2023 01:44:08 +0300 Subject: [PATCH 2/2] InfoBar: fix tiny selection with data --- client/adventureMap/CInfoBar.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/adventureMap/CInfoBar.cpp b/client/adventureMap/CInfoBar.cpp index d5ceb969d..d5249d096 100644 --- a/client/adventureMap/CInfoBar.cpp +++ b/client/adventureMap/CInfoBar.cpp @@ -173,7 +173,7 @@ CInfoBar::VisibleComponentInfo::VisibleComponentInfo(const std::vector(vect, imageRect, 4, 4, 1, maxComponents); } - else - font = tiny ? FONT_TINY : font; if(!message.empty()) text = std::make_shared(textRect, font, ETextAlignment::CENTER, Colors::WHITE, message);