Added popup frames

This commit is contained in:
Cooldude2606
2019-05-24 20:02:18 +01:00
parent bda4750871
commit 23b54913d4
8 changed files with 460 additions and 94 deletions

View File

@@ -6,6 +6,7 @@
Slider._prototype:on_element_update(callback) --- Registers a handler for when an element instance updates
Slider._prototype:on_store_update(callback) --- Registers a handler for when the stored value updates
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) --- Enables auto draw of the label, the label will share the same parent element as the slider
@@ -114,6 +115,17 @@ function Slider.new_slider(name)
return self
end
--- Adds notches to the slider
-- @tparam[opt] state boolean when true will draw notches onto the slider
function Slider._prototype:use_notches(state)
if state == false then
self.draw_data.style = nil
else
self.draw_data.style = 'notched_slider'
end
return self
end
--- Sets the range of a slider, if not used will use default values for a slider
-- @tparam[opt] min number the minimum value that the slider can take
-- @tparam[opt] max number the maximum value that the slider can take