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

Refactoring. Regressions fixing.

This commit is contained in:
SoundSSGood
2024-03-02 20:30:29 +02:00
parent 433d55cac3
commit cc14f85445
33 changed files with 321 additions and 262 deletions

View File

@@ -216,6 +216,12 @@ void CButton::setActOnDown(bool on)
actOnDown = on;
}
void CButton::setHelp(const std::pair<std::string, std::string> & help)
{
hoverTexts[0] = help.first;
helpBox = help.second;
}
void CButton::block(bool on)
{
if(on || getState() == EButtonState::BLOCKED) //dont change button state if unblock requested, but it's not blocked