graphics element hidden on creation option, changed hide/show logic to only hide/show current element

This commit is contained in:
Mikayla Fischler
2023-05-25 17:40:16 -04:00
parent e313b77abc
commit f9aa75a105
36 changed files with 69 additions and 33 deletions

View File

@@ -10,6 +10,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new waiting animation element
---@param args waiting_args

View File

@@ -9,6 +9,7 @@ local element = require("graphics.element")
---@field id? string element id
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field hidden? boolean true to hide on initial draw
-- new color map
---@param args colormap_args

View File

@@ -16,6 +16,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new hazard button
---@param args hazard_button_args

View File

@@ -23,6 +23,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field height? integer parent height if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new multi button (latch selection, exclusively one button at a time)
---@param args multi_button_args

View File

@@ -19,6 +19,7 @@ local CLICK_TYPE = core.events.CLICK_TYPE
---@field y? integer 1 if omitted
---@field height? integer parent height if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new push button
---@param args push_button_args

View File

@@ -15,6 +15,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new radio button list (latch selection, exclusively one button at a time)
---@param args radio_button_args

View File

@@ -20,6 +20,7 @@ local CLICK_TYPE = core.events.CLICK_TYPE
---@field y? integer 1 if omitted
---@field height? integer parent height if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new sidebar tab selector
---@param args sidebar_args

View File

@@ -18,6 +18,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new spinbox control (minimum value is 0)
---@param args spinbox_args

View File

@@ -15,6 +15,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field height? integer parent height if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new switch button (latch high/low)
---@param args switch_button_args

View File

@@ -21,6 +21,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field width? integer parent width if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new tab selector
---@param args tabbar_args

View File

@@ -10,6 +10,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new root display box
---@nodiscard

View File

@@ -11,6 +11,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new div element
---@nodiscard

View File

@@ -18,6 +18,7 @@ local flasher = require("graphics.flasher")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new alarm indicator light
---@nodiscard

View File

@@ -17,6 +17,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field width integer length
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new data indicator
---@nodiscard

View File

@@ -15,6 +15,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new horizontal bar
---@nodiscard

View File

@@ -18,6 +18,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new icon indicator
---@nodiscard

View File

@@ -16,6 +16,7 @@ local flasher = require("graphics.flasher")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new indicator LED
---@nodiscard

View File

@@ -18,6 +18,7 @@ local flasher = require("graphics.flasher")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new dual LED indicator light
---@nodiscard

View File

@@ -11,6 +11,7 @@ local element = require("graphics.element")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new RGB LED indicator light
---@nodiscard

View File

@@ -16,6 +16,7 @@ local flasher = require("graphics.flasher")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new indicator light
---@nodiscard

View File

@@ -16,6 +16,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field width integer length
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new power indicator
---@nodiscard

View File

@@ -17,6 +17,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field width integer length
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new radiation indicator
---@nodiscard

View File

@@ -18,6 +18,7 @@ local element = require("graphics.element")
---@field y? integer 1 if omitted
---@field height? integer 1 if omitted, must be an odd number
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new state indicator
---@nodiscard

View File

@@ -18,6 +18,7 @@ local flasher = require("graphics.flasher")
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new tri-state indicator light
---@nodiscard

View File

@@ -13,6 +13,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new vertical bar
---@nodiscard

View File

@@ -12,6 +12,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new multipane element
---@nodiscard

View File

@@ -12,6 +12,7 @@ local element = require("graphics.element")
---@field id? string element id
---@field x? integer 1 if omitted
---@field y? integer 1 if omitted
---@field hidden? boolean true to hide on initial draw
-- new pipe network
---@param args pipenet_args

View File

@@ -16,6 +16,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new rectangle
---@param args rectangle_args

View File

@@ -18,6 +18,7 @@ local TEXT_ALIGN = core.TEXT_ALIGN
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new text box
---@param args textbox_args

View File

@@ -16,6 +16,7 @@ local element = require("graphics.element")
---@field height? integer parent height if omitted
---@field gframe? graphics_frame frame instead of x/y/width/height
---@field fg_bg? cpair foreground/background colors
---@field hidden? boolean true to hide on initial draw
-- new tiling box
---@param args tiling_args