1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Simplify TextInput constructor

This commit is contained in:
Ivan Savenko
2024-05-12 14:52:20 +00:00
parent 93c3cf372b
commit 7790b8969d
9 changed files with 22 additions and 13 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::CENTERLEFT, true);
inputBox = std::make_shared<CTextInput>(textInputArea, EFonts::FONT_SMALL, ETextAlignment::CENTERLEFT, true);
inputBox->removeUsedEvents(KEYBOARD);
chatHistory = std::make_shared<CTextBox>("", chatHistoryArea, 1);