1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-11 05:47:43 +00:00

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

@@ -7,12 +7,13 @@ UI.SlideOut.defaults = {
UIElement = 'SlideOut',
pageType = 'modal',
}
function UI.SlideOut:setParent()
-- TODO: size should be set at this point
self:layout()
self.canvas = self:addLayer()
UI.Window.setParent(self)
function UI.SlideOut: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.SlideOut:enable()

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()