mirror of
https://codeberg.org/1414codeforge/yui.git
synced 2025-06-05 22:19:11 +02:00
[*] General code improvement.
* Rework navigation allowing direct management and triggering for grabkeyboard widgets. * Navigation code now behaves better with deeply nested layouts. * Allow widget hierarchies deeper than 2 (__call() is implemented for every Widget metatable). * Make BASE locals more secure (match '<filename>$' in regexp)
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
local BASE = (...):gsub('label', '')
|
||||
local BASE = (...):gsub('label$', '')
|
||||
|
||||
local Widget = require(BASE..'widget')
|
||||
local core = require(BASE..'core')
|
||||
@ -7,7 +7,10 @@ local shadowtext = require 'lib.gear.shadowtext'
|
||||
local T = require('lib.moonspeak').translate
|
||||
|
||||
-- Labels don't accept focus
|
||||
local Label = setmetatable({ nofocus = true }, Widget)
|
||||
local Label = setmetatable({
|
||||
nofocus = true,
|
||||
__call = function(cls, args) return cls.new(args) end
|
||||
}, Widget)
|
||||
Label.__index = Label
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user