This commit is contained in:
Robert Jelic
2025-02-09 18:06:38 +01:00
parent a6613b76d9
commit 255e120257
2 changed files with 10 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ description = "A Basalt UI Framework Documentation"
format = "markdown"
dir = "docs"
file = "src"
style = "dark"
style = "!new"
template = true
sort = true
all = true

View File

@@ -96,8 +96,8 @@ function basalt.removeSchedule(id)
basalt._schedule[id] = nil
end
-- Internal event handler
-- @local
--- Internal event handler
--- @local
local function updateEvent(event, ...)
if(event=="terminate")then basalt.stop() end
@@ -120,8 +120,8 @@ local function updateEvent(event, ...)
end
end
-- Internal render function
-- @local
--- Internal render function
--- @local
local function renderFrames()
if(mainFrame)then
mainFrame:render()
@@ -129,8 +129,7 @@ local function renderFrames()
end
--- Updates all scheduled functions
-- @function update
-- @usage basalt.update()
--- @usage basalt.update()
function basalt.update()
for k,v in pairs(basalt._schedule) do
if type(v)=="function" then
@@ -140,8 +139,7 @@ function basalt.update()
end
--- Stops the Basalt runtime
-- @function stop
-- @usage basalt.stop()
--- @usage basalt.stop()
function basalt.stop()
term.clear()
term.setCursorPos(1,1)
@@ -149,10 +147,9 @@ function basalt.stop()
end
--- Starts the Basalt runtime
-- @function run
-- @param[opt] isActive boolean Whether to start active (default: true)
-- @usage basalt.run()
-- @usage basalt.run(false)
--- @param isActive boolean Whether to start active (default: true)
--- @usage basalt.run()
--- @usage basalt.run(false)
function basalt.run(isActive)
updaterActive = isActive
if(isActive==nil)then updaterActive = true end