Skip to content

Commit f36f27f

Browse files
authored
Add what color formats are acceptable in places it is missing in Geyser ldoc comments (#5471)
1 parent a9ca6d2 commit f36f27f

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/mudlet-lua/lua/geyser/GeyserGauge.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ function Geyser.Gauge:setAlignment(alignment)
142142
end
143143

144144
--- Sets the color of the text on the gauge
145-
-- @param color the color you want the text to be
145+
-- @param color the color you want the text to be. Can use color names such as "red", decho codes such as "<255,0,0>" and hex codes such as "#ff0000"
146146
function Geyser.Gauge:setFgColor(color)
147147
self.text:setFgColor(color)
148148
end

src/mudlet-lua/lua/geyser/GeyserLabel.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Geyser.Label.scrollH = {}
2121
--- Prints a message to the window. All parameters are optional and if not
2222
-- specified will use the last set value.
2323
-- @param message The message to print. Can contain html formatting.
24-
-- @param color The color to use. If no color formatting is needed it is possible to use 'nocolor' which allows color formatting by using :setStyleSheet
24+
-- @param color The color to use. Accepts color names like "red", decho codes like "<255,0,0>", and hex codes like "#ff0000". If no color formatting is needed it is possible to use 'nocolor' which allows color formatting by using :setStyleSheet
2525
-- @param format A format list to use. 'c' - center, 'l' - left, 'r' - right, 'b' - bold, 'i' - italics, 'u' - underline, 's' - strikethrough, '##' - font size. For example, "cb18" specifies center bold 18pt font be used. Order doesn't matter.
2626
function Geyser.Label:echo(message, color, format)
2727
message = message or self.message
@@ -71,6 +71,8 @@ function Geyser.Label:rawEcho(message)
7171
echo(self.name, message)
7272
end
7373

74+
--- sets the color of the text on the label
75+
-- @param color the color you want the text to be. Can use color names such as "red", decho codes such as "<255,0,0>" and hex codes such as "#ff0000"
7476
function Geyser.Label:setFgColor(color)
7577
self:echo(nil, color, nil)
7678
end

src/mudlet-lua/lua/geyser/GeyserWindow.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ end
6868

6969
--- Sets the background color of this window primitive. If this primitive
7070
-- was using a shared color, then it creates a new, personal color.
71-
-- @param r The red value, or a quoted color name, like "green".
71+
-- @param r The red value, or a quoted color name, like "green", or a decho color like "<0,255,0>", or hex color like "#00ff00"
7272
-- @param g The green value, or nil if using a name.
7373
-- @param b The blue value, or nil if using a name.
7474
function Geyser.Window:setBgColor (r, g, b)
@@ -77,7 +77,7 @@ end
7777

7878
--- Sets the foreground color of this window primitive. If this primitive
7979
-- was using a shared color, then it creates a new, personal color.
80-
-- @param r The red value, or a quoted color name, like "green".
80+
-- @param r The red value, or a quoted color name, like "green", or a decho color like "<0,255,0>", or hex color like "#00ff00"
8181
-- @param g The green value, or nil if using a name.
8282
-- @param b The blue value, or nil if using a name.
8383
function Geyser.Window:setFgColor (r, g, b)
@@ -86,7 +86,7 @@ end
8686

8787
--- Sets the background color and alpha. If this primitive
8888
-- was using a shared color, then it creates a new, personal color.
89-
-- @param r The red component of the color, or a named color like "green".
89+
-- @param r The red component of the color, or a named color like "green", or a decho color like "<0,255,0>", or hex color like "#00ff00"
9090
-- @param g The green component, or nil if using named colors.
9191
-- @param b The blue component, or nil if using named colors.
9292
-- @param a The alpha component. If nil, uses current alpha value.

0 commit comments

Comments
 (0)