diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index 1786c9028..7ead7e374 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -3757,6 +3757,12 @@ Misc Wraps ``dfhack.screen.getKeyDisplay`` in order to allow using strings for the keycode argument. +* ``invert_color(color, bold)`` + + This inverts the brightness of ``color``. If this color is coming from a pen's + foreground color, include ``pen.bold`` in ``bold`` for this to work properly. + + ViewRect class -------------- diff --git a/library/lua/gui/widgets.lua b/library/lua/gui/widgets.lua index 6a1726115..3ef27a651 100644 --- a/library/lua/gui/widgets.lua +++ b/library/lua/gui/widgets.lua @@ -1461,7 +1461,7 @@ end function HotkeyLabel:shouldHover() -- When on_activate is set, text should also hover on mouseover - return HotkeyLabel.super.shouldHover(self) or self.on_activate + return self.on_activate or HotkeyLabel.super.shouldHover(self) end function HotkeyLabel:initializeLabel()