Skip to content

Commit 866e03d

Browse files
committed
Fix control type hint and toastnotification constructor syntax
1 parent 4dc2ad7 commit 866e03d

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

src/Classes/Control.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ local rect = {
4040
---@field onFocusLost? fun()
4141
local ControlClass = newClass("Control")
4242

43-
---@alias ControlAnchor [AnchorPoint, Control|ControlHost, AnchorPoint, number|nil]
43+
---@alias ControlAnchor [AnchorPoint, Control|ControlHost, AnchorPoint, boolean|nil]
4444
---@alias ControlRect [number|nil, number|nil, number|nil, number]
4545

4646
---@param anchor? ControlAnchor

src/Modules/ToastNotification.lua

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,17 +171,14 @@ function ToastNotification:Render()
171171
if not toast.mode then
172172
toast.mode = "SHOWING"
173173
toast.start = GetTime()
174-
toast.dismissButton = new(
175-
"ButtonControl",
176-
{ "BOTTOMLEFT", anchorMain, "BOTTOMLEFT" },
174+
toast.dismissButton = new("ButtonControl"):ButtonControl({ "BOTTOMLEFT", anchorMain, "BOTTOMLEFT" },
177175
{ 4, 0, 80, 20 },
178176
"Dismiss",
179177
function()
180178
dismissedIds[toast.id] = true
181179
toast.mode = "HIDING"
182180
toast.start = GetTime()
183-
end
184-
)
181+
end)
185182
end
186183

187184
local now = GetTime()

0 commit comments

Comments
 (0)