cleanup + theme editor

This commit is contained in:
kepler155c@gmail.com
2020-04-14 14:12:04 -06:00
parent 9eeec8719c
commit 3e41996b9b
16 changed files with 199 additions and 95 deletions

View File

@@ -24,17 +24,10 @@ function UI.Page:postInit()
self.__target = self
end
function UI.Page:enable()
UI.Window.enable(self)
if not self.focused or not self.focused.enabled then
self:focusFirst()
end
end
function UI.Page:sync()
if self.enabled then
self:checkFocus()
self.parent:setCursorBlink(self.focused and self.focused.cursorBlink)
self.parent:sync()
end
end
@@ -137,15 +130,7 @@ end
function UI.Page:checkFocus()
if not self.focused or not self.focused.enabled then
local el = self.__target
while el do
local focusables = el:getFocusables()
if focusables[1] then
self:setFocus(focusables[1])
break
end
el = el.parent
end
self.__target:focusFirst()
end
end