diff options
| author | ruki <[email protected]> | 2020-11-21 00:48:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-11-21 00:48:31 +0800 |
| commit | 6aa64df1ce672b5d2cd37707d5673089c0a33e3f (patch) | |
| tree | 41f213925bfe1e7f6d489a5da052bf08aa174c7e /xmake/core/ui/button.lua | |
| parent | 96ce788dce7a63ab62c47750214f355c9c2eeced (diff) | |
support mouse for menuconf
Diffstat (limited to 'xmake/core/ui/button.lua')
| -rw-r--r-- | xmake/core/ui/button.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/core/ui/button.lua b/xmake/core/ui/button.lua index 6ef5b0723..674bc7496 100644 --- a/xmake/core/ui/button.lua +++ b/xmake/core/ui/button.lua @@ -41,8 +41,13 @@ function button:init(name, bounds, text, on_action) -- show cursor self:cursor_show(true) - -- init action + -- init actions + self:option_set("mouseable", true) self:action_set(action.ac_on_enter, on_action) + self:action_set(action.ac_on_clicked, function (v) + v:action_on(action.ac_on_enter) + return true + end) end -- draw button |
