Add files via upload
This commit is contained in:
+57
-2
@@ -34,6 +34,9 @@ function MM_Button_Initialize()
|
||||
if (MiniMageOptions.MMButtonPosition == nil) then
|
||||
MiniMageOptions.MMButtonPosition = 0;
|
||||
end
|
||||
if (MiniMageOptions.HidePortals == nil) then
|
||||
MiniMageOptions.HidePortals = false;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -124,6 +127,8 @@ end
|
||||
function MM_DropDown_ForTheHorde()
|
||||
local appender = ': ';
|
||||
|
||||
-- PORTAL SECTION (hidden if HidePortals is true)
|
||||
if not MiniMageOptions.HidePortals then
|
||||
local info = { };
|
||||
info.text = MINIMAGE_LABEL_PORTAL;
|
||||
info.isTitle = 1;
|
||||
@@ -149,8 +154,10 @@ function MM_DropDown_ForTheHorde()
|
||||
info.text = MINIMAGE_LABEL_UC;
|
||||
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_UC); end;
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
|
||||
info = { };
|
||||
-- TELEPORT SECTION
|
||||
local info = { };
|
||||
info.text = MINIMAGE_LABEL_TELEPORT;
|
||||
info.isTitle = 1;
|
||||
info.notCheckable = 1;
|
||||
@@ -180,6 +187,8 @@ end
|
||||
function MM_DropDown_ForTheAlliance()
|
||||
local appender = ': ';
|
||||
|
||||
-- PORTAL SECTION (hidden if HidePortals is true)
|
||||
if not MiniMageOptions.HidePortals then
|
||||
local info = { };
|
||||
info.text = MINIMAGE_LABEL_PORTAL;
|
||||
info.isTitle = 1;
|
||||
@@ -210,8 +219,10 @@ function MM_DropDown_ForTheAlliance()
|
||||
info.text = MINIMAGE_LABEL_THERAMORE;
|
||||
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_THERAMORE); end;
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
|
||||
info = { };
|
||||
-- TELEPORT SECTION
|
||||
local info = { };
|
||||
info.text = MINIMAGE_LABEL_TELEPORT;
|
||||
info.isTitle = 1;
|
||||
info.notCheckable = 1;
|
||||
@@ -242,3 +253,47 @@ function MM_DropDown_ForTheAlliance()
|
||||
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_THERAMORE); end;
|
||||
UIDropDownMenu_AddButton(info);
|
||||
end
|
||||
|
||||
--
|
||||
-- Slash Commands
|
||||
--
|
||||
|
||||
SLASH_MINIMAGE1 = "/mmage"
|
||||
|
||||
SlashCmdList["MINIMAGE"] = function(msg)
|
||||
msg = string.lower(msg or "")
|
||||
|
||||
if msg == "reset" then
|
||||
MiniMageOptions = {}
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: options reset.|r")
|
||||
|
||||
elseif msg == "icon" then
|
||||
if MM_ButtonFrame:IsShown() then
|
||||
MM_ButtonFrame:Hide()
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: minimap button hidden.|r")
|
||||
else
|
||||
MM_ButtonFrame:Show()
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: minimap button shown.|r")
|
||||
end
|
||||
|
||||
elseif msg == "portals" then
|
||||
MiniMageOptions.HidePortals = not MiniMageOptions.HidePortals
|
||||
|
||||
if MiniMageOptions.HidePortals then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: Portal hidden.|r")
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage: Portal shown.|r")
|
||||
end
|
||||
|
||||
elseif msg == "help" or msg == "" then
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffffff00MiniMage commands:|r")
|
||||
DEFAULT_CHAT_FRAME:AddMessage("/mmage help - Show this help")
|
||||
DEFAULT_CHAT_FRAME:AddMessage("/mmage icon - Show/Hide minimap button")
|
||||
DEFAULT_CHAT_FRAME:AddMessage("/mmage reset - Reset addon saved options")
|
||||
DEFAULT_CHAT_FRAME:AddMessage("/mmage portals - Show/Hide portal in dropdown")
|
||||
|
||||
else
|
||||
DEFAULT_CHAT_FRAME:AddMessage("|cffff0000MiniMage: unknown command.|r")
|
||||
DEFAULT_CHAT_FRAME:AddMessage("Type /mmage help for options.")
|
||||
end
|
||||
end
|
||||
|
||||
+2
-1
@@ -3,5 +3,6 @@
|
||||
## Version: 1.0
|
||||
## Notes: Forked version of MiniMage 1.2b. No original GitHub Repo found, only found in Wow1.12.1_Addons_Collection
|
||||
## SavedVariables: MiniMageOptions
|
||||
MiniMage_TWOW.xml
|
||||
localization.lua
|
||||
MiniMage_TWOW.lua
|
||||
MiniMage_TWOW.xml
|
||||
Reference in New Issue
Block a user