diff --git a/src/plugins/lua/bindings/gui.cpp b/src/plugins/lua/bindings/gui.cpp index 703666721b7..0b73dc5a16d 100644 --- a/src/plugins/lua/bindings/gui.cpp +++ b/src/plugins/lua/bindings/gui.cpp @@ -676,6 +676,8 @@ void setupGuiModule() sol::property([](Widget *self) { return self->emerge()->hasFocus(); }), "setFocus", [](Widget *self) { self->emerge()->setFocus(); }, + "toolTip", + sol::property(&Widget::setToolTip), sol::base_classes, sol::bases()); diff --git a/src/plugins/lua/meta/gui.lua b/src/plugins/lua/meta/gui.lua index f53e244f616..2fe25662ab3 100644 --- a/src/plugins/lua/meta/gui.lua +++ b/src/plugins/lua/meta/gui.lua @@ -13,6 +13,8 @@ gui.layout = {} ---@class Widget : Object ---@field visible boolean Whether the widget is visible or not. ---@field enabled boolean Whether the widget is enabled or not. +---@field focus boolean Whether the widget has focus or not. +---@field toolTip string The tooltip of the widget. gui.widget = {} ---@alias LayoutChild string|BaseAspect|Layout|Widget|function @@ -26,6 +28,7 @@ gui.widget = {} ---@field widgetAttributes? WidgetAttributeMapT The widget attributes of the widget. ---@field autoFillBackground? boolean A boolean, representing whether the widget should automatically fill its background. ---@field sizePolicy? SizePolicy.Policy[] Two size policies of the widget, horizontal and vertical. +---@field toolTip string The tooltip of the widget. gui.baseWidgetOptions = {} ---@class (exact) WidgetOptions : BaseWidgetOptions