mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-07-18 15:09:29 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user