docs
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful

This commit is contained in:
2026-02-21 23:53:36 +01:00
parent 3b137fd48e
commit 76964f872d
28 changed files with 301 additions and 28 deletions

View File

@@ -1,4 +1,10 @@
--- Prints text with shadow.
-- @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
@@ -7,6 +13,13 @@ function Print.text(text, x, y, color, fixed, scale)
print(text, x, y, color, fixed, scale)
end
--- Prints centered text with shadow.
-- @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)