Weighted Pages and Back Method

This commit is contained in:
ClintUNI 2024-05-02 14:25:34 +02:00
parent e6fc3210ca
commit d65d4d260f

View file

@ -8,6 +8,8 @@ local module = {}
function module.new(name: string): types.Page function module.new(name: string): types.Page
local self = setmetatable({ local self = setmetatable({
Name= name, Name= name,
Weight = 0,
Buttons = { Buttons = {
Active = {}, Active = {},
Stored = {}, Stored = {},
@ -174,6 +176,12 @@ function page:Open()
end end
end end
function page:Back()
if self.Parent then
self.Parent:OpenLastPage()
end
end
function page:Close() function page:Close()
if self.Frame then if self.Frame then
self.Frame.Visible = false self.Frame.Visible = false