class
GUISliderHandle
A handle that can be dragged from its predefined minimum and maximum position, either horizontally or vertically.
Public
Methods
staticGetGuiTypeName
Returns type name of the GUI element used for finding GUI element styles.
GetStyleSheetElement
Returns the name of the GUI element type to be used for style lookup in the style sheet.
GetHandlePositionInPercent
Gets the current position of the handle, in percent ranging [0.0f, 1.0f].
GetMinimumStepIncrement
Gets the minimum percentual variation of the handle position
GetHandlePositionInPixels
Returns the position of the slider handle, in pixels.
Relative to this object.
GetScrollableLength
Returns remaining length of the scrollable area not covered by the handle, in pixels.
GetTotalLength
Returns the total length of the area the handle can move in, in pixels.
SetMinimumStepIncrement
Sets a step that defines the minimal increment the value can be increased/decreased by.
Set to zero to have no step. In percent.
MoveOneStep
Moves the slider handle one step forwards or backwards.
Step size is determined by step (if set) or handle size otherwise. If is true the handle is moved one step forward, otherwise one step backward.
staticCreate
Creates a new GUI element.
- contents
- Structure describing the contents of the GUI element to create.
- styleClass
- Style class that will be used for determining GUI element visuals from the current style sheet. If no class is provided, default style is determined based on GUI element type.
- options
- Additional options that control GUI element size and position. This will override options set in the style sheet.
Fields
OnHandleMovedOrResized
Triggered when the user drags the handle.
Internal
Constructors
GUISliderHandle
Methods
GetHandleSizeInPercent
Returns the size of the slider handle, in percent of the total area.
GetHandleSizeInPixels
Returns the size of the handle button, in pixels.
SetHandleSizeInPercent
Size of the handle in percent of the total draggable area, along the handle drag direction.
- percent
- Size of the handle, in percent ranging [0.0f, 1.0f]
SetHandlePositionInPercent
Moves the handle the the specified position in the handle area.
- percent
- Position to move the handle to, in percent ranging [0.0f, 1.0f]
SetHandlePositionInPixels
Sets the position of the slider handle, in pixels.
Relative to this object.
CalculateUnconstrainedOptimalSize
Calculates the optimal size for the GUI element, ignoring size constraints.
Protected
Methods
UpdateRenderElements
Recreates the internal render elements.
Must be called before GetRenderElementVertexAndIndexData/FillBuffer if element is dirty. Marks the element as non dirty.
Private
Methods
DoOnMouseEvent
Called when a mouse event is received on any GUI element the mouse is interacting with.
Return true if you have processed the event and don't want other elements to process it.
IsOnHandle
Checks are the specified over the scroll handle.
Coordinates are relative to the parent widget.