diff options
| author | ruki <[email protected]> | 2018-01-24 00:49:02 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-01-23 22:54:12 +0800 |
| commit | 08b707b41d5b0c98713812be50d03ea2b021385c (patch) | |
| tree | 173caa18ab365feea0fce53879c89e3ba71dea0a /xmake/core/ui/view.lua | |
| parent | b10e053feb5d657b9c76b50b5907480edf637163 (diff) | |
insert bool config to menuconf
Diffstat (limited to 'xmake/core/ui/view.lua')
| -rw-r--r-- | xmake/core/ui/view.lua | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/core/ui/view.lua b/xmake/core/ui/view.lua index 6e73d2336..b49e53d66 100644 --- a/xmake/core/ui/view.lua +++ b/xmake/core/ui/view.lua @@ -78,6 +78,9 @@ function view:init(name, bounds) -- init actions self._ACTIONS = object() + -- init extras + self._EXTRAS = object() + -- init name self._NAME = name @@ -339,6 +342,17 @@ function view:attr_set(name, value) return self end +-- get extra data +function view:extra(name) + return self._EXTRAS[name] +end + +-- set extra data +function view:extra_set(name, value) + self._EXTRAS[name] = value + return self +end + -- get action function view:action(name) return self._ACTIONS[name] |
