Add files via upload

This commit is contained in:
totalllyswede
2025-11-20 19:55:02 -08:00
committed by GitHub
parent 1f65ea1695
commit 5d6f258469
6 changed files with 379 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

+224
View File
@@ -0,0 +1,224 @@
--
-- Global variable for storage of settings/options
--
MiniMageOptions = { };
--
-- Initialization functions
--
function class_OnLoad()
MM_class = UnitClass("player");
if (MM_class ~= "Mage") then
this:Hide();
end
end
function MM_Initialize()
MM_fac = UnitFactionGroup('player');
M_class = UnitClass("player");
if (M_class == "Mage") then
if (DEFAULT_CHAT_FRAME) then
DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_ENABLED);
end
else
if (DEFAULT_CHAT_FRAME) then
DEFAULT_CHAT_FRAME:AddMessage(MINIMAGE_ANNOUNCE_GREETING..M_class..MINIMAGE_ANNOUNCE_DISABLED);
end
end
end
function MM_Button_Initialize()
if(event == "VARIABLES_LOADED") then
if (MiniMageOptions.MMButtonPosition == nil) then
MiniMageOptions.MMButtonPosition = 0;
end
end
end
function MM_DropDown_Initialize()
local dropdown;
if ( UIDROPDOWNMENU_OPEN_MENU ) then
dropdown = getglobal(UIDROPDOWNMENU_OPEN_MENU);
else
dropdown = this;
end
MM_DropDown_InitButtons();
end
function MM_DropDown_OnLoad()
UIDropDownMenu_Initialize(this, MM_DropDown_Initialize, "MENU");
end
--
-- Minimap button drag/drop functions
--
-- Thanks to Atlas for the button dragging code
function MM_Button_BeingDragged()
local xpos,ypos = GetCursorPosition();
local xmin,ymin = Minimap:GetLeft(), Minimap:GetBottom();
xpos = xmin-xpos/UIParent:GetScale()+70;
ypos = ypos/UIParent:GetScale()-ymin-70;
MM_Button_SetPosition(math.deg(math.atan2(ypos,xpos)));
end
function MM_Button_OnClick()
MM_ToggleDropDown();
end
function MM_Button_OnEnter()
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:SetText(MINIMAGE_BUTTON_TOOLTIP0);
GameTooltip:AddLine(MINIMAGE_BUTTON_TOOLTIP1);
GameTooltip:AddLine(MINIMAGE_BUTTON_TOOLTIP2);
GameTooltip:Show();
end
function MM_Button_SetPosition(v)
if(v < 0) then
v = v + 360;
end
MiniMageOptions.MMButtonPosition = v;
MM_Button_UpdatePosition();
end
function MM_Button_UpdatePosition()
MM_ButtonFrame:SetPoint(
"TOPLEFT",
"Minimap",
"TOPLEFT",
54 - (78 * cos(MiniMageOptions.MMButtonPosition)),
(78 * sin(MiniMageOptions.MMButtonPosition)) - 55
);
end
--
-- Drop down menu functions
--
function MM_ToggleDropDown()
MM_DropDownFrame.point = "TOPRIGHT";
MM_DropDownFrame.relativePoint = "BOTTOMLEFT";
ToggleDropDownMenu(1, nil, MM_DropDownFrame);
end
function MM_DropDown_InitButtons()
local info = {};
info.text = MINIMAGE_LABEL_TITLE;
info.isTitle = 1;
info.justifyH = "CENTER";
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
local fact = UnitFactionGroup('player');
if (fact == "Horde") then
MM_DropDown_ForTheHorde();
else
MM_DropDown_ForTheAlliance();
end
end
function MM_DropDown_ForTheHorde()
local appender = ': ';
local info = { };
info.text = MINIMAGE_LABEL_PORTAL;
info.isTitle = 1;
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE0;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_HORDE0); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE1;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_HORDE1); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE2;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_HORDE2); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_TELEPORT;
info.isTitle = 1;
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE0;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_HORDE0); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE1;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_HORDE1); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_HORDE2;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_HORDE2); end;
UIDropDownMenu_AddButton(info);
end
function MM_DropDown_ForTheAlliance()
local appender = ': ';
local info = { };
info.text = MINIMAGE_LABEL_PORTAL;
info.isTitle = 1;
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE0;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALLIANCE0); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE1;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALLIANCE1); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE2;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_PORTAL..appender..MINIMAGE_LABEL_ALLIANCE2); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_TELEPORT;
info.isTitle = 1;
info.notCheckable = 1;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE0;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALLIANCE0); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE1;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALLIANCE1); end;
UIDropDownMenu_AddButton(info);
info = { };
info.text = MINIMAGE_LABEL_ALLIANCE2;
info.func = function(msg) CastSpellByName(MINIMAGE_LABEL_TELEPORT..appender..MINIMAGE_LABEL_ALLIANCE2); end;
UIDropDownMenu_AddButton(info);
-- Custom Teleport: Alah'Thalas
local info = { };
info.text = "Alah'Thalas";
info.func = function(msg)
CastSpellByName("Teleport: Alah'Thalas");
end;
UIDropDownMenu_AddButton(info);
end
BIN
View File
Binary file not shown.
+5
View File
@@ -0,0 +1,5 @@
## Interface: 11200
## Title: MiniMage_TWOW
## 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
+116
View File
@@ -0,0 +1,116 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/ C:\Projects\WoW\Bin\Interface\FrameXML\UI.xsd">
<Script file="MiniMage_TWOW.lua"/>
<Script file="localization.lua"/>
<!-- Empty core frame used for initialization and such -->
<Frame name="MM_CoreFrame" parent="Minimap" frameStrata="MEDIUM" enableMouse="true" hidden="false">
<Scripts>
<OnLoad>
this:RegisterEvent("PLAYER_ENTERING_WORLD");
</OnLoad>
<OnEvent>
if (event == "PLAYER_ENTERING_WORLD") then
MM_Initialize();
end
</OnEvent>
</Scripts>
</Frame>
<!-- Button frame for minimap button and drop down menu -->
<Frame name="MM_ButtonFrame" parent="Minimap" enableMouse="true" hidden="false" frameStrata="LOW">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="Minimap" relativePoint="RIGHT">
<Offset>
<AbsDimension x="2" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Frames>
<Button name="MM_Button">
<Size>
<AbsDimension x="32" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<NormalTexture file="Interface\AddOns\MiniMage_TWOW\Images\mm"/>
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
<Scripts>
<OnLoad>
this:RegisterForDrag("RightButton");
this.dragme = false;
</OnLoad>
<OnDragStart>
this.dragme = true;
</OnDragStart>
<OnDragStop>
this.dragme = false;
</OnDragStop>
<OnUpdate>
if(this.dragme == true) then
MM_Button_BeingDragged();
end
</OnUpdate>
<OnClick>
MM_Button_OnClick();
</OnClick>
<OnEnter>
MM_Button_OnEnter();
</OnEnter>
<OnLeave>
GameTooltip:Hide();
</OnLeave>
</Scripts>
</Button>
<Frame name="MM_DropDownFrame" inherits="UIDropDownMenuTemplate" hidden="true">
<Size>
<AbsDimension x="10" y="10"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="MM_Button">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
MM_DropDown_OnLoad();
</OnLoad>
</Scripts>
</Frame>
</Frames>
<Scripts>
<OnLoad>
this:RegisterEvent("VARIABLES_LOADED");
</OnLoad>
<OnEvent>
MM_Button_Initialize();
MM_Button_UpdatePosition();
</OnEvent>
</Scripts>
</Frame>
</Ui>
+34
View File
@@ -0,0 +1,34 @@
--the only place MINIMAGE_VERSION should be set
MINIMAGE_VERSION = "1.18";
--[[
-- MiniMage (English)
-- Compiled by Robert Fernandes
-- warcraft@bovilexics.com
-- Last Update on 11/20/2025
--]]
MINIMAGE_ANNOUNCE_DISABLED = ". MiniMage AddOn Disabled.";
MINIMAGE_ANNOUNCE_ENABLED = ". MiniMage AddOn Enabled.";
MINIMAGE_ANNOUNCE_GREETING = "Greetings, ";
MINIMAGE_BUTTON_TOOLTIP0 = "MiniMage";
MINIMAGE_BUTTON_TOOLTIP1 = "Left-click to open MiniMage Cast Menu.";
MINIMAGE_BUTTON_TOOLTIP2 = "Right-click and drag to move this button.";
MINIMAGE_LABEL_TITLE = "Select Destination";
MINIMAGE_LABEL_PORTAL = "Portal";
MINIMAGE_LABEL_TELEPORT = "Teleport";
MINIMAGE_LABEL_ALLIANCE0 = "Darnassus";
MINIMAGE_LABEL_ALLIANCE1 = "Ironforge";
MINIMAGE_LABEL_ALLIANCE2 = "Stormwind";
MINIMAGE_LABEL_HORDE0 = "Orgrimmar";
MINIMAGE_LABEL_HORDE1 = "Thunder Bluff";
MINIMAGE_LABEL_HORDE2 = "Undercity";