Browse Source

InfoBar: disable scrollbar

Konstantin 2 years ago
parent
commit
f8c15f3a4b
2 changed files with 3 additions and 3 deletions
  1. 1 1
      client/adventureMap/CInfoBar.cpp
  2. 2 2
      client/adventureMap/CInfoBar.h

+ 1 - 1
client/adventureMap/CInfoBar.cpp

@@ -214,7 +214,7 @@ CInfoBar::VisibleComponentInfo::VisibleComponentInfo(const std::vector<Component
 		font = tiny ? FONT_TINY : font;
 
 	if(!message.empty())
-		text = std::make_shared<CTextBox>(message, textRect, 0, font, ETextAlignment::CENTER, Colors::WHITE);
+		text = std::make_shared<CMultiLineLabel>(textRect, font, ETextAlignment::CENTER, Colors::WHITE, message);
 }
 
 void CInfoBar::playNewDaySound()

+ 2 - 2
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<CComponentBox> comps;
-		std::shared_ptr<CTextBox> text;
+		std::shared_ptr<CMultiLineLabel> text;
 	public:
 		struct Cache 
 		{