ldoc return fixes

This commit is contained in:
2026-02-26 17:41:06 +01:00
parent e56662f6ad
commit 337f1fc132
21 changed files with 279 additions and 262 deletions

View File

@@ -3,8 +3,8 @@ local _windows = {}
--- Registers a window table.
--- @within Window
--- @param id string The ID of the window (e.g., "splash", "menu").
--- @param window_table table The actual window module table (e.g., SplashWindow).
--- @param id string The ID of the window (e.g., "splash", "menu").</br>
--- @param window_table table The actual window module table (e.g., SplashWindow).</br>
function Window.register(id, window_table)
_windows[id] = window_table
end
@@ -12,21 +12,23 @@ end
--- Retrieves a registered window table by its ID.
--- @within Window
--- @param id string The ID of the window.
--- @return result table The window module table.
--- @return result.update function Called each frame to update window logic.
--- @return result.draw function Called each frame to draw the window.
--- @return result table The window module table or nil. </br>
--- Fields: </br>
--- * update (function) Called each frame to update window logic.<br/>
--- * draw (function) Called each frame to draw the window.<br/>
function Window.get(id)
return _windows[id]
end
--- Sets the currently active window.
--- @within Window
--- @param id string The ID of the window to activate.
--- @param id string The ID of the window to activate.</br>
function Window.set_current(id)
Context.current_window = id
end
--- Gets the ID of the currently active window.
--- This function is used by the main game loop to update and draw the active window.
--- @within Window
--- @return string The ID of the active window.
function Window.get_current_id()