WoWInterface SVN PortalBox

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

Read Me!.rtf
1,10 → 1,10
{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf350
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf290
\readonlydoc1{\fonttbl\f0\fnil\fcharset0 TrebuchetMS;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww9620\viewh11740\viewkind0
\margl1440\margr1440\vieww10980\viewh16880\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc\pardirnatural
 
\f0\b\fs28 \cf0 \ul \ulc0 PortalBox 0.6\
\f0\b\fs28 \cf0 \ul \ulc0 PortalBox 0.8\
\
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\qc\pardirnatural
 
32,11 → 32,12
\
\ul Version History\
\pard\tx0\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\li520\fi-520\ql\qnatural\pardirnatural
\cf0 \ulnone 0.6 - Added Dalaran support, minimap button hiding, window closure upon casting, and untrained portal dimming. Fixed an error that occurs upon first run of addon. Also fixed bug of eating keystrokes while window was open and made a couple of aesthetic changes. Version number 0.6 used to avoid any possible confusion caused by the 0.5 fan update\
\cf0 \ulnone 0.7 - Changed under-the-hood code to work on non-English clients, added compact mode, made the main window movable, and changed window closure upon casting to close at the start of a cast instead of afterwards. Also changed the strata level of the main window and minimap button to something more appropriate.\ul \
\ulnone 0.6 - Added Dalaran support, minimap button hiding, window closure upon casting, and untrained portal dimming. Fixed an error that occurs upon first run of addon. Also fixed bug of eating keystrokes while window was open and made a couple of aesthetic changes. Version number 0.6 used to avoid any possible confusion caused by the 0.5 fan update.\
\pard\tx0\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
\cf0 \strike \strikec0 0.5\strike0\striked0 - This was not an official release, but rather a fan update created by a different author\
0.2 - Added support for Horde mages, changed close button aesthetics\
0.1 - Initial Public Release\
\cf0 \strike \strikec0 0.5\strike0\striked0 - This was not an official release, but rather a fan update created by a different author.\
0.2 - Added support for Horde mages, changed close button aesthetics.\
0.1 - Initial Public Release.\
\
\
\pard\tx0\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural
portalbox.xml
28,7 → 28,7
</Anchor>
</Anchors>
</FontString>
<FontString inherits="GameFontWhite" text="Keep Window Open After Casting Portal or Teleport">
<FontString inherits="GameFontWhite" text="Detach Minimap Button from Minimap">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
37,6 → 37,15
</Anchor>
</Anchors>
</FontString>
<FontString inherits="GameFontWhite" text="Keep Window Open After Casting Portal or Teleport">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="41" y="-107"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
53,13 → 62,24
if ( this:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
PortalBox_MinimapButton:Hide();
PortalBoxChecbox3:Disable();
HideMMIcon = "1";
if (MinimapButtonUnbind == "1") then
PortalBox_MinimapButtonUnbound:Hide();
end
else
PlaySound("igMainMenuOptionCheckBoxOff");
PortalBox_MinimapButton:Show();
PortalBoxChecbox3:Enable();
 
HideMMIcon = "0";
if (MinimapButtonUnbind == "0") then
PortalBox_MinimapButton:Show();
else
PortalBox_MinimapButtonUnbound:Show();
end
end
 
 
</OnClick>
<OnShow>
if (HideMMIcon == "1") then
68,7 → 88,7
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="PortalBoxChecbox2" inherits="OptionsCheckButtonTemplate">
<CheckButton name="PortalBoxChecbox3" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
80,6 → 100,38
<OnClick>
if ( this:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
 
PortalBox_MinimapButton:Hide();
PortalBox_MinimapButtonUnbound:Show();
MinimapButtonUnbind = "1";
else
PlaySound("igMainMenuOptionCheckBoxOff");
 
PortalBox_MinimapButton:Show();
PortalBox_MinimapButtonUnbound:Hide();
MinimapButtonUnbind = "0";
end
 
</OnClick>
<OnShow>
if (MinimapButtonUnbind == "1") then
this:SetChecked(true);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="PortalBoxChecbox2" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="15" y="-100"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
if ( this:GetChecked() ) then
PlaySound("igMainMenuOptionCheckBoxOn");
KeepWindowOpen = "1";
else
PlaySound("igMainMenuOptionCheckBoxOff");
2281,4 → 2333,75
</Scripts>
</Button>
 
<Button name="PortalBox_MinimapButtonUnbound" parent="UIParent" frameStrata="MEDIUM" enableMouse="true" movable="true" hidden="false">
 
<Size>
<AbsDimension x="33" y="33"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
<Layers>
<Layer level="HIGH">
<Texture name="PortalBox_MinimapButton_Icon" file="Interface\Icons\Spell_Arcane_PortalIronforge">
<Size>
<AbsDimension x="21" y="21"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="7" y="-6"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
<Layer level="OVERLAY">
<Texture file="Interface\Minimap\MiniMap-TrackingBorder">
<Size>
<AbsDimension x="56" y="56"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Frame name="PortalBox_MinimapButtonUnbound_DraggingFrame" hidden="true">
<Scripts>
<OnUpdate>
PortalBox_MinimapButtonUnbound_DraggingFrame_OnUpdate()
</OnUpdate>
</Scripts>
</Frame>
</Frames>
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
<Scripts>
<OnLoad>
this:RegisterForClicks("LeftButtonUp","RightButtonUp")
this:RegisterForDrag("LeftButton","RightButton")
</OnLoad>
<OnEnter>
GameTooltip:SetOwner(this, ANCHOR_TOPLEFT);
GameTooltip:AddLine("PortalBox")
GameTooltip:Show()
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnDragStart>
this:LockHighlight()
PortalBox_MinimapButtonUnbound_DraggingFrame:Show()
</OnDragStart>
<OnDragStop>
this:UnlockHighlight()
PortalBox_MinimapButtonUnbound_DraggingFrame:Hide()
</OnDragStop>
<OnClick>
PortalBox_MinimapButton_OnClick() -- do your thing in here, arg1 is mouse button clicked
</OnClick>
</Scripts>
</Button>
 
</Ui>
\ No newline at end of file
portalbox.lua
1,8 → 1,34
HideMMIcon = "0"
KeepWindowOpen = "0"
MinimapButtonUnbind = "0"
 
function PortalBox_MinimapButton_Reposition()
local playerClass, englishClass = UnitClass("player");
PortalBox_MinimapButton:SetPoint("TOPLEFT","Minimap","TOPLEFT",52-(80*cos(MinimapPos)),(80*sin(MinimapPos))-52)
if(englishClass ~= "MAGE") then
PortalBox_MinimapButton:Hide();
end
if (MinimapButtonUnbind == "0") then
PortalBox_MinimapButtonUnbound:Hide();
end
end
 
function PortalBox_MinimapButtonUnbound_Reposition()
local xpos,ypos = PortalBox_MinimapButton:GetLeft(), PortalBox_MinimapButton:GetBottom()
 
PortalBox_MinimapButtonUnbound:ClearAllPoints();
PortalBox_MinimapButtonUnbound:SetPoint("BOTTOMLEFT","UIParent","BOTTOMLEFT", MinimapPosUnboundX, MinimapPosUnboundY)
if (MinimapButtonUnbind == "1") then
PortalBox_MinimapButton:Hide();
end
if (MinimapPosUnboundY == NIL) then
PortalBox_MinimapButtonUnbound:SetPoint("BOTTOMLEFT","UIParent","BOTTOMLEFT", xpos-16, ypos-16)
MinimapPosUnboundY = ypos-16
MinimapPosUnboundX = xpos-16
end
 
end
 
function PortalBox_LoadPrefsPane(panel)
panel.name = "PortalBox";
 
13,7 → 39,7
this:RegisterEvent("VARIABLES_LOADED");
this:RegisterEvent("UNIT_SPELLCAST_START");
out("• PortalBox 0.7 Loaded •");
SLASH_PORTALBOX1 = "/portals";
SLASH_PORTALBOX1 = "/portalbox";
SLASH_PORTALBOX2 = "/port";
SlashCmdList["PORTALBOX"] = function(msg)
portalbox_SlashCommandHandler(msg);
27,6 → 53,7
MinimapPos = 1
end
PortalBox_MinimapButton_Reposition();
PortalBox_MinimapButtonUnbound_Reposition();
if (HideMMIcon == "1") then
PortalBox_MinimapButton:Hide();
end
50,6 → 77,18
PortalBox_MinimapButton_Reposition() -- move the button
end
 
function PortalBox_MinimapButtonUnbound_DraggingFrame_OnUpdate()
 
local xpos,ypos = GetCursorPosition()
 
xpos = xpos/UIParent:GetScale()
ypos = ypos/UIParent:GetScale()
 
MinimapPosUnboundY = ypos
MinimapPosUnboundX = xpos
PortalBox_MinimapButtonUnbound_Reposition() -- move the button
end
 
function PortalBox_MinimapButton_OnClick()
portalbox_toggle(msg);
end
portalbox.toc
1,8 → 1,8
## Interface: 30100
## Title: PortalBox v0.7
## Interface: 30300
## Title: PortalBox |cFF0FF0FFv0.8
## Notes: A simple teleport and portal spell manager invoked by /port.
## Version: 0.7
## Version: 0.8
## Dependencies:
## SavedVariables: MinimapPos, HideMMIcon, KeepWindowOpen, windowCollapseState
## SavedVariables: MinimapPos, MinimapPosUnboundY, MinimapPosUnboundX, HideMMIcon, KeepWindowOpen, windowCollapseState, MinimapButtonUnbind
portalbox.lua
portalbox.xml
\ No newline at end of file