1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-05 00:49:09 +02:00

Some refactoring of text display widgets:

- renamed some methods/classes with better names + some consistency (no more print, setTxt and setText that do exactly same thing)
- TextBox now contains label widget instead of inheriting it
- smooth scrolling support (up/down buttons still scroll one line)
This commit is contained in:
Ivan Savenko
2013-08-29 13:46:27 +00:00
parent fb4fb79be2
commit 6bee105d7d
14 changed files with 347 additions and 325 deletions

View File

@ -71,7 +71,7 @@ void CList::CListItem::clickLeft(tribool down, bool previousState)
void CList::CListItem::hover(bool on)
{
if (on)
GH.statusbar->print(getHoverText());
GH.statusbar->setText(getHoverText());
else
GH.statusbar->clear();
}
@ -561,7 +561,7 @@ void CMinimap::clickRight(tribool down, bool previousState)
void CMinimap::hover(bool on)
{
if (on)
GH.statusbar->print(CGI->generaltexth->zelp[291].first);
GH.statusbar->setText(CGI->generaltexth->zelp[291].first);
else
GH.statusbar->clear();
}
@ -872,7 +872,7 @@ void CInfoBar::clickRight(tribool down, bool previousState)
void CInfoBar::hover(bool on)
{
if (on)
GH.statusbar->print(CGI->generaltexth->zelp[292].first);
GH.statusbar->setText(CGI->generaltexth->zelp[292].first);
else
GH.statusbar->clear();
}