resizing + injector fixes

This commit is contained in:
kepler155c@gmail.com
2019-02-08 19:21:20 -05:00
parent 72b3c7bac9
commit 8c1abb21ca
10 changed files with 59 additions and 33 deletions

View File

@@ -19,9 +19,13 @@ UI.Viewport.defaults = {
[ 'control-f' ] = 'scroll_pageDown',
},
}
function UI.Viewport:setParent()
UI.Window.setParent(self)
self.canvas = self:addLayer()
function UI.Viewport:layout()
UI.Window.layout(self)
if not self.canvas then
self.canvas = self:addLayer()
else
self.canvas:resize(self.width, self.height)
end
end
function UI.Viewport:enable()