forked from ThornyFFXI/tCrossBar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommands.lua
More file actions
38 lines (34 loc) · 1.24 KB
/
Copy pathcommands.lua
File metadata and controls
38 lines (34 loc) · 1.24 KB
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
34
35
36
37
38
ashita.events.register('command', 'command_cb', function (e)
local args = e.command:args();
if (#args == 0 or string.lower(args[1]) ~= '/tc') then
return;
end
e.blocked = true;
if (#args == 1) then
gConfigGUI:Show();
return;
end
if (#args > 1) and (string.lower(args[2]) == 'bindmode') then
if (gBindingGUI:GetActive()) then
gBindingGUI:Close();
gController.BindMenuState.Active = false;
elseif (not gController.BindMenuState.Active) then
if (gSingleDisplay) then
gController.BindMenuState.Active = true;
else
Error('Cannot open bind menu without a valid single display. Please enter "/tc" to open the menu and select a valid layout.')
end
else
gController.BindMenuState.Active = false;
end
end
if (#args > 1) and (string.lower(args[2]) == 'palette') then
gBindings:HandleCommand(args);
return;
end
if (#args > 1) and (string.lower(args[2]) == 'hide') then
gToggleHide = not gToggleHide;
Message(string.format("Display is now $H%s$R.", gToggleHide and "hidden" or "visible"));
return;
end
end);