|
@@ -410,7 +410,7 @@ void OptionsTab::CPlayerOptionTooltipBox::genBonusWindow()
|
|
|
}
|
|
|
|
|
|
OptionsTab::SelectedBox::SelectedBox(Point position, PlayerSettings & settings, SelType type)
|
|
|
- : CIntObject(RCLICK, position), CPlayerSettingsHelper(settings, type)
|
|
|
+ : CIntObject(RCLICK | WHEEL, position), CPlayerSettingsHelper(settings, type)
|
|
|
{
|
|
|
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
|
|
|
|
|
@@ -440,6 +440,25 @@ void OptionsTab::SelectedBox::clickRight(tribool down, bool previousState)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+void OptionsTab::SelectedBox::wheelScrolled(int distance, bool isInside)
|
|
|
+{
|
|
|
+ if (!isInside)
|
|
|
+ return;
|
|
|
+
|
|
|
+ switch(CPlayerSettingsHelper::type)
|
|
|
+ {
|
|
|
+ case TOWN:
|
|
|
+ CSH->setPlayerOption(LobbyChangePlayerOption::TOWN, distance, settings.color);
|
|
|
+ break;
|
|
|
+ case HERO:
|
|
|
+ CSH->setPlayerOption(LobbyChangePlayerOption::HERO, distance, settings.color);
|
|
|
+ break;
|
|
|
+ case BONUS:
|
|
|
+ CSH->setPlayerOption(LobbyChangePlayerOption::BONUS, distance, settings.color);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
OptionsTab::PlayerOptionsEntry::PlayerOptionsEntry(const PlayerSettings & S, const OptionsTab & parent)
|
|
|
: pi(std::make_unique<PlayerInfo>(SEL->getPlayerInfo(S.color.getNum())))
|
|
|
, s(std::make_unique<PlayerSettings>(S))
|