First step in redesigning lua widgets

This commit is contained in:
2026-04-09 14:43:11 -04:00
parent 6be07679d2
commit 3b6207f7a1
6 changed files with 62 additions and 73 deletions

View File

@@ -23,10 +23,9 @@
-- At this point, if you were to pprint(keys), the output would
-- look like this:
--
-- { "hotkeys", "X", "Light Oven", "A", "Add Fuel" }
-- { "X", "Light Oven", "A", "Add Fuel" }
--
-- The first array element is always the word "hotkeys". Notice
-- also that a hotkeylist doesn't store the closures, they are
-- Notice that a hotkeylist doesn't store the closures, they are
-- silently ignored. The resulting array is in a format that can
-- be returned directly to Unreal.
--
@@ -58,7 +57,7 @@ makeclass("hotkeylist")
makeclass("hotkeypress")
function hotkeylist.create()
local result = { "hotkeys" }
local result = {}
setmetatable(result, hotkeylist)
return result
end
@@ -79,4 +78,3 @@ function hotkeypress.add(self, key, action, closure)
self.closure = closure
end
end