#91 get and set values for all controls/indicators and textbox

This commit is contained in:
Mikayla Fischler
2022-09-12 12:59:28 -04:00
parent d9be5ccb47
commit 10c53ac4b3
16 changed files with 192 additions and 60 deletions

View File

@@ -37,6 +37,7 @@ function element.new(args)
---@class graphics_template
local protected = {
value = nil, ---@type any
window = nil, ---@type table
fg_bg = core.graphics.cpair(colors.white, colors.black),
frame = core.graphics.gframe(1, 1, 1, 1)
@@ -136,11 +137,27 @@ function element.new(args)
function protected.on_update(...)
end
-- get control value
-- get value
function protected.get_value()
return protected.value
end
-- set value
---@param value any value to set
function protected.set_value(value)
return nil
end
-- custom recolor command, varies by element if implemented
---@vararg cpair|color color(s)
function protected.recolor(...)
end
-- custom resize command, varies by element if implemented
---@vararg integer sizing
function protected.resize(...)
end
-- start animations
function protected.start_anim()
end