fix: Prevent gamemode slider movement when hardcore mode is enabled

Add virtual `canMoveSlider` method to UIScene base class and override it
in both LoadMenu and CreateWorldMenu scenes. The method returns false
when attempting to move the gamemode slider while hardcore mode is active,
effectively locking the slider in that state.

The UIController now checks `canMoveSlider` before initiating a slider
drag and during ongoing drag updates.
This commit is contained in:
George V. committed 2026-04-13 17:18:15 +03:00
1 parent 4b147be21d
commit 6d98c4ebf6
6 files changed
+28 -3

No files matched your search

@@ -1040,6 +1040,14 @@ void UIScene_LoadMenu::handleSliderMove(F64 sliderId, F64 currentValue)
}
}
bool UIScene_LoadMenu::canMoveSlider(F64 sliderId)
{
if (sliderId == eControl_GameMode && m_bHardcore)
return false;
return true;
}
void UIScene_LoadMenu::handleTouchBoxRebuild()
{
m_bRebuildTouchBoxes = true;