Module expcore.gui.slider
Gui class define for silders [[
Functions
Slider.new_slider ([name]) | Creates a new slider element define |
Slider._prototype:use_notches ([state]) | Adds notches to the slider |
Slider._prototype:set_range ([min[, max]]) | Sets the range of a slider, if not used will use default values for a slider |
Slider._prototype:draw_label (element) | Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player |
Slider._prototype:enable_auto_draw_label ([state=true]) | Enables auto draw of the label, the label will share the same parent element as the slider |
Functions
- Slider.new_slider ([name])
-
Creates a new slider element define
Parameters:
- name string the optional debug name that can be added (optional)
Returns:
-
table
the new slider element define
- Slider._prototype:use_notches ([state])
-
Adds notches to the slider
Parameters:
- state boolean when true will draw notches onto the slider (optional)
- Slider._prototype:set_range ([min[, max]])
-
Sets the range of a slider, if not used will use default values for a slider
Parameters:
- min number the minimum value that the slider can take (optional)
- max number the maximum value that the slider can take (optional)
Returns:
-
self
the define to allow chaining
- Slider._prototype:draw_label (element)
-
Draws a new label and links its value to the value of this slider, if no store then it will only show one value per player
Parameters:
- element LuaGuiElement the parent element that the lable will be drawn to
Returns:
-
LuaGuiElement
the new label element so that styles can be applied
- Slider._prototype:enable_auto_draw_label ([state=true])
-
Enables auto draw of the label, the label will share the same parent element as the slider
Parameters:
- state boolean when false will disable the auto draw of the label (default true)
Returns:
-
self
the define to allow chaining