From 7f9d80ba6c76b00076f696ef7125019699db9f97 Mon Sep 17 00:00:00 2001 From: jinivus Date: Fri, 1 Jul 2016 10:36:42 +1000 Subject: [PATCH] Made /ag options and /ag open the UI --- Autogratzer.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Autogratzer.lua b/Autogratzer.lua index 30c68fd..24bae8f 100644 --- a/Autogratzer.lua +++ b/Autogratzer.lua @@ -193,6 +193,7 @@ end function AG_ShowHelp() print("AutoGratzer usage:"); + print("'/ag' or '/ag options' to show options ui"); print("'/ag {msg}' or '/autogratzer {msg}'"); print("'/ag delay {delay}' or '/autogratzer {delay}', with delay in milliseconds to set delay"); print("'/ag guild' or '/autogratzer guild' to enable/disable guild gratzing"); @@ -256,11 +257,15 @@ end function AG_Command(msg) local Cmd, SubCmd = AG_GetCmd(msg); if (Cmd == "")then - AG_ShowHelp(); + --If the interface options aren't already loaded this doesn't work fully(just opens to non addons tab) + --but apparently if you call it twice it works fine! + InterfaceOptionsFrame_OpenToCategory(AutoGratzer.ui.panel); + InterfaceOptionsFrame_OpenToCategory(AutoGratzer.ui.panel); elseif (Cmd == "help")then AG_ShowHelp(); elseif (Cmd == "options")then - AG_ShowHelp(); + InterfaceOptionsFrame_OpenToCategory(AutoGratzer.ui.panel); + InterfaceOptionsFrame_OpenToCategory(AutoGratzer.ui.panel); elseif (Cmd == "guild")then AG_ToggleGuild(); elseif (Cmd == "say")then -- 1.7.9.5