1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-17 00:07:41 +02:00

Reworked TextInput to allow text overflow support

This commit is contained in:
Ivan Savenko
2024-05-12 14:17:49 +00:00
parent 1abe9007bc
commit 93c3cf372b
11 changed files with 228 additions and 169 deletions

View File

@ -363,7 +363,7 @@ CChatBox::CChatBox(const Rect & rect)
Rect textInputArea(1, rect.h - height, rect.w - 1, height);
Rect chatHistoryArea(3, 1, rect.w - 3, rect.h - height - 1);
inputBackground = std::make_shared<TransparentFilledRectangle>(textInputArea, ColorRGBA(0,0,0,192));
inputBox = std::make_shared<CTextInput>(textInputArea, EFonts::FONT_SMALL, nullptr, ETextAlignment::TOPLEFT, true);
inputBox = std::make_shared<CTextInput>(textInputArea, EFonts::FONT_SMALL, nullptr, ETextAlignment::CENTERLEFT, true);
inputBox->removeUsedEvents(KEYBOARD);
chatHistory = std::make_shared<CTextBox>("", chatHistoryArea, 1);