expcore.gui.elements.slider module

Gui class define for sliders [[

Dependencies

expcore.gui.core
expcore.gui.prototype
expcore.gui.instances
utils.game

Functions

Slider.new_slider([name]) Creates a new slider element define
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

Dependencies

# expcore.gui.core
# expcore.gui.prototype
# expcore.gui.instances
# utils.game

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: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 label 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