-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSlash.lua
More file actions
33 lines (29 loc) · 947 Bytes
/
Slash.lua
File metadata and controls
33 lines (29 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---@type BFI
local BFI = select(2, ...)
local L = BFI.L
local F = BFI.funcs
---@type AbstractFramework
local AF = _G.AbstractFramework
SLASH_BFI1 = "/bfi"
function SlashCmdList.BFI(msg, editbox)
local command, rest = msg:match("^(%S*)%s*(.-)$")
command = strlower(command or "")
rest = strlower(rest or "")
if command == "mover" then
AF.ToggleMovers()
elseif command == "reset" then
AF.ShowGlobalDialog(L["Are you sure you want to reset all BFI settings?"] .. "\n" .. AF.WrapTextInColor(L["This action cannot be undone"], "firebrick"), function()
-- reset BFI
BFIConfig = nil
BFIProfile = nil
BFIPlayer = nil
-- reset some AF settings
AFConfig.accentColor = nil
AFConfig.fontSizeDelta = nil
AFConfig.scale = nil
ReloadUI()
end, nil, true)
else
F.ToggleOptionsFrame()
end
end