Skip to content

Commit 2dd7014

Browse files
tatoyoda600myk002
andauthored
Update library/lua/gui/widgets.lua
Co-authored-by: Myk <myk.taylor@gmail.com>
1 parent 5c4ab15 commit 2dd7014

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

library/lua/gui/widgets.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1708,7 +1708,7 @@ end
17081708
local function get_button_token_base_pens(spec, x, y)
17091709
local pen, pen_hover = COLOR_GRAY, COLOR_WHITE
17101710
if spec.pens then
1711-
pen = type(spec.pens) == 'table' and #spec.pens > 0 and (#spec.pens[y] > 0 and spec.pens[y][x] or spec.pens[y]) or spec.pens
1711+
pen = type(spec.pens) == 'table' and safe_index(spec.pens, y, x) or spec.pens[y] or spec.pens
17121712
if spec.pens_hover then
17131713
pen_hover = type(spec.pens_hover) == 'table' and #spec.pens_hover > 0 and (#spec.pens_hover[y] > 0 and spec.pens_hover[y][x] or spec.pens_hover[y]) or spec.pens_hover
17141714
else

0 commit comments

Comments
 (0)