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

Implemented Scrollable class, to server as common base for such classes

This commit is contained in:
Ivan Savenko
2023-05-30 18:10:22 +03:00
parent 6fe00ad55c
commit 052d0d314a
14 changed files with 197 additions and 151 deletions

View File

@ -202,7 +202,7 @@ void InfoCard::changeSelection()
mapDescription->label->scrollTextTo(0, false);
if(mapDescription->slider)
mapDescription->slider->moveToMin();
mapDescription->slider->scrollToMin();
if(SEL->screenType == ESelectionScreen::campaignList)
return;
@ -337,7 +337,7 @@ void CChatBox::addNewMessage(const std::string & text)
CCS->soundh->playSound("CHAT");
chatHistory->setText(chatHistory->label->getText() + text + "\n");
if(chatHistory->slider)
chatHistory->slider->moveToMax();
chatHistory->slider->scrollToMax();
}
CFlagBox::CFlagBox(const Rect & rect)