Update Button to Modern V2
This commit is contained in:
parent
bf2709874a
commit
0c0b71d20a
1 changed files with 11 additions and 2 deletions
|
@ -1,12 +1,13 @@
|
|||
local types = require(script.Parent.Types)
|
||||
|
||||
local button: types.ButtonClass = {} :: types.ButtonClass
|
||||
local button = {} :: types.ButtonClass
|
||||
button["__index"] = button
|
||||
|
||||
local module = {}
|
||||
|
||||
function module.new(name: string): types.Button
|
||||
local self = setmetatable({
|
||||
Status = "Stored",
|
||||
Name= name,
|
||||
_ = {},
|
||||
}, button)
|
||||
|
@ -34,6 +35,14 @@ function button:Build(parent: types.Page | types.Component)
|
|||
end
|
||||
end
|
||||
|
||||
function button:GetStatus(): "Built" | "Stored"
|
||||
return self._.Status
|
||||
end
|
||||
|
||||
function button:StatusIs(status: "Built" | "Stored")
|
||||
return status == self._.Status
|
||||
end
|
||||
|
||||
function button:Open()
|
||||
if self.ButtonGui then
|
||||
self.ButtonGui.Active = true
|
||||
|
|
Loading…
Reference in a new issue