return table details in docs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Zsolt Tasnadi
2026-02-26 11:25:20 +01:00
parent 8f34cbf875
commit 226d75d905
19 changed files with 379 additions and 233 deletions

View File

@@ -2,12 +2,12 @@
--- Prints text with shadow.
--- @within Print
-- @param text string The text to print.
-- @param x number The x-coordinate.
-- @param y number The y-coordinate.
-- @param color number The color of the text.
-- @param[opt] fixed boolean If true, uses fixed-width font.
-- @param[opt] scale number The scaling factor.
--- @param text string The text to print.
--- @param x number The x-coordinate.
--- @param y number The y-coordinate.
--- @param color number The color of the text.
--- @param[opt] fixed boolean If true, uses fixed-width font.
--- @param[opt] scale number The scaling factor.
function Print.text(text, x, y, color, fixed, scale)
local shadow_color = Config.colors.black
if color == shadow_color then shadow_color = Config.colors.light_grey end
@@ -18,12 +18,12 @@ end
--- Prints centered text with shadow.
--- @within Print
-- @param text string The text to print.
-- @param x number The x-coordinate for centering.
-- @param y number The y-coordinate.
-- @param color number The color of the text.
-- @param[opt] fixed boolean If true, uses fixed-width font.
-- @param[opt] scale number The scaling factor.
--- @param text string The text to print.
--- @param x number The x-coordinate for centering.
--- @param y number The y-coordinate.
--- @param color number The color of the text.
--- @param[opt] fixed boolean If true, uses fixed-width font.
--- @param[opt] scale number The scaling factor.
function Print.text_center(text, x, y, color, fixed, scale)
scale = scale or 1
local text_width = print(text, 0, -6, 0, fixed, scale)