1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Apply suggestions from code review

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
Laserlicht 2024-05-14 12:44:08 +02:00 committed by GitHub
parent e06c09d709
commit f596fbc9b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View File

@ -214,7 +214,7 @@ void BattleConsole::clear()
write({});
}
BattleConsoleWindow::BattleConsoleWindow(std::string text)
BattleConsoleWindow::BattleConsoleWindow(const std::string & text)
: CWindowObject(BORDERED)
{
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
@ -225,8 +225,6 @@ BattleConsoleWindow::BattleConsoleWindow(std::string text)
updateShadow();
center();
addUsedEvents(LCLICK);
backgroundTexture = std::make_shared<CFilledTexture>(ImagePath::builtin("DiBoxBck"), Rect(0, 0, pos.w, pos.h));
buttonOk = std::make_shared<CButton>(Point(183, 388), AnimationPath::builtin("IOKAY"), CButton::tooltip(), [this](){ close(); }, EShortcut::GLOBAL_ACCEPT);
Rect textArea(18, 17, 393, 354);

View File

@ -99,7 +99,7 @@ private:
std::shared_ptr<TransparentFilledRectangle> textBoxBackgroundBorder;
std::shared_ptr<CTextBox> textBox;
public:
BattleConsoleWindow(std::string text);
BattleConsoleWindow(const std::string & text);
};
/// Hero battle animation