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
|
||||
---@param rootPage Page
|
||||
function PageView:replace(rootPage)
|
||||
--clear pageStack
|
||||
while self:get() do
|
||||
self:back()
|
||||
end
|
||||
|
||||
self:clear()
|
||||
self:navigate(rootPage)
|
||||
end
|
||||
|
||||
|
@ -70,6 +66,14 @@ function PageView:back()
|
|||
popStack(self.pageStack)
|
||||
end
|
||||
|
||||
---Clear the pageStack
|
||||
function PageView:clear()
|
||||
--clear pageStack
|
||||
while self:get() do
|
||||
self:back()
|
||||
end
|
||||
end
|
||||
|
||||
---@param deltaTime number # frametime in seconds
|
||||
function PageView:render(deltaTime)
|
||||
if self:get() then
|
||||
|
|
Loading…
Reference in New Issue