1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-15 01:24:45 +02:00

Refactoring & deduplication of infowindow code

This commit is contained in:
Ivan Savenko
2024-02-26 18:32:15 +02:00
parent 658cc14cd0
commit e6b339448f
10 changed files with 75 additions and 311 deletions

View File

@ -116,6 +116,9 @@ public:
CTextBox(std::string Text, const Rect & rect, int SliderStyle, EFonts Font = FONT_SMALL, ETextAlignment Align = ETextAlignment::TOPLEFT, const ColorRGBA & Color = Colors::WHITE);
void resize(Point newSize);
/// Resizes text box to minimal size needed to fit current text
/// No effect if text is too large to fit and requires slider
void trimToFit();
void setText(const std::string & Txt);
void sliderMoved(int to);
};