add clear() to PageView
This commit is contained in:
parent
9cab4201c6
commit
eb55b8ffa0
|
@ -51,11 +51,7 @@ end
|
||||||
---Replace the current pageStack with a new root page
|
---Replace the current pageStack with a new root page
|
||||||
---@param rootPage Page
|
---@param rootPage Page
|
||||||
function PageView:replace(rootPage)
|
function PageView:replace(rootPage)
|
||||||
--clear pageStack
|
self:clear()
|
||||||
while self:get() do
|
|
||||||
self:back()
|
|
||||||
end
|
|
||||||
|
|
||||||
self:navigate(rootPage)
|
self:navigate(rootPage)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -70,6 +66,14 @@ function PageView:back()
|
||||||
popStack(self.pageStack)
|
popStack(self.pageStack)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---Clear the pageStack
|
||||||
|
function PageView:clear()
|
||||||
|
--clear pageStack
|
||||||
|
while self:get() do
|
||||||
|
self:back()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---@param deltaTime number # frametime in seconds
|
---@param deltaTime number # frametime in seconds
|
||||||
function PageView:render(deltaTime)
|
function PageView:render(deltaTime)
|
||||||
if self:get() then
|
if self:get() then
|
||||||
|
|
Loading…
Reference in New Issue