#405 #340 reactor plc configurator control of theme and color mode

This commit is contained in:
Mikayla Fischler
2024-03-07 18:00:33 -05:00
parent 510995b04f
commit 48a8eadc55
8 changed files with 186 additions and 29 deletions

View File

@@ -18,11 +18,15 @@ local ui = {
}
-- try to start the UI
---@param theme integer front panel theme ID (1 = sandstone, 2 = basalt)
---@return boolean success, any error_msg
function renderer.try_start_ui()
function renderer.try_start_ui(theme)
local status, msg = true, nil
if ui.display == nil then
-- set theme
style.set_theme(theme)
-- reset terminal
term.setTextColor(colors.white)
term.setBackgroundColor(colors.black)