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:
@@ -253,6 +253,8 @@ protected:
|
||||
virtual void handleCheckboxToggled(F64 controlId, bool selected) {}
|
||||
virtual void handleSliderMove(F64 sliderId, F64 currentValue) {}
|
||||
virtual void handleAnimationEnd() {}
|
||||
public:
|
||||
virtual bool canMoveSlider(F64 sliderId) { return true; }
|
||||
virtual void handleSelectionChanged(F64 selectedId) {}
|
||||
virtual void handleRequestMoreData(F64 startIndex, bool up) {}
|
||||
virtual void handleTouchBoxRebuild() {}
|
||||
|
||||
Reference in New Issue
Block a user