Returns the singleton instance, or creates and returns one. Initializes references to control buttons and register singleton.
Event handler for slider value changes.
Required/precondition states.
States that are deactivated when this state activates.
Name/identifier for the state.
Function to deregister LEFT_CLICK input action.
States that should be restored when this state ends.
Slider input for adjusting water level height.
Associated control button for toggling water display.
Button/element for activating/deactivating water level mode.
Activates water level editing mode: wires button, sets info window, adjusts controls, and manages scene toggles.
Deactivates water level editing mode, unwires click and slider handlers, disables controls.
Removes slider and click event handlers for water level interaction.
Sets up event handlers for water level slider and click, including height setting from picked position.
WaterLevelState – UI interaction state for modifying or visualizing the scene's water level.
Implements singleton pattern (only one instance at a time). Handles button/click/slider events for setting water height, toggling water visibility, and positioning. Integrates with in-scene picking (LEFT_CLICK) to extract height and update the global water level model.
Static
instance - Singleton reference.
Example