1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Separated battle control panel into new class, refactoring of

CGStatusBar to allow shared API with battle console
This commit is contained in:
Ivan Savenko
2022-11-18 17:54:10 +02:00
parent 3c5858f01e
commit 7a6ad671ab
20 changed files with 522 additions and 503 deletions

View File

@@ -34,9 +34,9 @@
void CHoverableArea::hover (bool on)
{
if (on)
GH.statusbar->setText(hoverText);
else if (GH.statusbar->getText()==hoverText)
GH.statusbar->clear();
GH.statusbar->write(hoverText);
else
GH.statusbar->clearMatching(hoverText);
}
CHoverableArea::CHoverableArea()
@@ -150,7 +150,7 @@ void CHeroArea::clickRight(tribool down, bool previousState)
void CHeroArea::hover(bool on)
{
if (on && hero)
GH.statusbar->setText(hero->getObjectName());
GH.statusbar->write(hero->getObjectName());
else
GH.statusbar->clear();
}