We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58f16ed commit f2c0e11Copy full SHA for f2c0e11
1 file changed
Src/Elements/Button.luau
@@ -8,7 +8,7 @@ local Element = {}
8
Element.__index = Element
9
Element.__type = "Button"
10
11
-function Element:New(Config)
+function Element:New(Idx, Config)
12
local Library = self.Library
13
assert(Config.Title, "Button - Missing Title")
14
Config.Callback = Config.Callback or function() end
@@ -36,15 +36,10 @@ function Element:New(Config)
36
37
function ButtonFrame:Destroy()
38
ButtonFrame.Frame:Destroy()
39
-
40
- for i, v in ipairs(Library.Buttons) do
41
- if v == ButtonFrame then
42
- table.remove(Library.Buttons, i)
43
- end
44
+ Library.Buttons[Idx] = nil
45
end
46
47
- table.insert(Library.Buttons, ButtonFrame)
+ Library.Buttons[Idx] = ButtonFrame
48
ButtonFrame.Instance = ButtonFrame
49
50
return ButtonFrame
0 commit comments