WoWInterface SVN AlphaMapFansUpdate

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /branches/AlphaMapBeta/AlphaMap
    from Rev 4 to Rev 5
    Reverse comparison

Rev 4 → Rev 5

AlphaMap.xml
888,28 → 888,13
<Frames>
<Frame name="AlphaMapMovementFrameTop" hidden="true" enableMouse="true">
<Size>
<AbsDimension x="1002" y="24"/>
<AbsDimension x="1002" y="32"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT"/>
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="AMMFTopH" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
</Layer>
</Layers>
<Scripts>
<OnEnter>
<!-- if ( ( not AlphaMapConfig.lock ) or ( AlphaMapConfig.lock == false ) ) then
AMMFBottomH:Show();
AMMFTopH:Show();
end -->
</OnEnter>
<OnLeave>
<!-- AMMFTopH:Hide();
AMMFBottomH:Hide(); -->
</OnLeave>
<OnShow>
this:SetFrameLevel( this:GetParent():GetFrameLevel() + 3 );
</OnShow>
930,36 → 915,19
</Frame>
<Frame name="AlphaMapMovementFrameBottom" hidden="true" enableMouse="true">
<Size>
<AbsDimension x="1002" y="24"/>
<AbsDimension x="1002" y="32"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="AMMFBottomH" file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
</Layer>
</Layers>
<Scripts>
<OnEnter>
<!-- if ( ( not AlphaMapConfig.lock ) or ( AlphaMapConfig.lock == false ) ) then
AMMFBottomH:Show();
AMMFTopH:Show();
end -->
</OnEnter>
<OnShow>
this:SetFrameLevel( this:GetParent():GetFrameLevel() + 3 );
</OnShow>
<OnLeave>
<!-- AMMFBottomH:Hide();
AMMFTopH:Hide(); -->
</OnLeave>
<OnMouseDown>
<!-- if( not AlphaMapConfig.lock or AlphaMapConfig.lock == false ) then -->
this:GetParent():StartMoving();
this:GetParent().isMoving = true;
<!-- end -->
this:GetParent():StartMoving();
this:GetParent().isMoving = true;
</OnMouseDown>
<OnMouseUp>
this:GetParent():StopMovingOrSizing();
6620,5 → 6588,39
</Scripts>
</Frame>
 
<Frame name="AM_topOverlay" parent="UIParent" hidden="true" enableMouse="false">
<Size>
<AbsDimension x="1002" y="32"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" relativeTo="AlphaMapMovementFrameTop"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="AlphaMapMovementFrameTop"/>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="AlphaMapMovementFrameTop"/>
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="AlphaMapMovementFrameTop"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
</Layer>
</Layers>
</Frame>
 
<Frame name="AM_botOverlay" parent="UIParent" hidden="true" enableMouse="false">
<Size>
<AbsDimension x="1002" y="32"/>
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativePoint="BOTTOMLEFT" relativeTo="AlphaMapMovementFrameBottom"/>
<Anchor point="BOTTOMRIGHT" relativePoint="BOTTOMRIGHT" relativeTo="AlphaMapMovementFrameBottom"/>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT" relativeTo="AlphaMapMovementFrameBottom"/>
<Anchor point="TOPRIGHT" relativePoint="TOPRIGHT" relativeTo="AlphaMapMovementFrameBottom"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture file="Interface\QuestFrame\UI-QuestTitleHighlight" alphaMode="ADD"/>
</Layer>
</Layers>
</Frame>
 
</Ui>
 
AlphaMap.lua
1309,8 → 1309,9
end)
note:SetScript("OnClick", function(self, mouseButton)
if ( mouseButton == "LeftButton" ) then
if ( self.toMap ) then
local map = AML.AlphaMap_GetMap(self.toMap);
local map = AML.AlphaMap_GetMap(self.toMap);
 
if ( map ) then
AlphaMapFrame_Update( map );
 
elseif ( self.toWorldMap ) then
2019,7 → 2020,7
----------------------------------------------------------------------------------------------------------
 
local i = #(AML.CustomPOIControls) + 1;
local controlButton = CreateFrame("Button", "AM_POIC"..i, AlphaMapDetailFrame, "AM_GenPOIControl_Template");
local controlButton = CreateFrame("Button", "AM_POIC"..i, UIParent, "AM_GenPOIControl_Template");
controlButton.id = i;
local controlButtonT = getglobal("AM_POIC"..i.."Texture");
controlButtonT:SetTexture("Interface\\AddOns\\AlphaMap\\Artwork\\Raid");
6347,15 → 6348,14
local keyID = parent:GetID();
 
if ( mBttn == "LeftButton" ) then
if ( parent.toMap ) then
local bttnName = parent:GetName(); -- ??? Should this be before the ...Frame_Update(...
getglobal(bttnName.."Highlight"):Hide(); -- ???
bttnName = AML.AlphaMap_GetMap(parent.toMap);
if ( bttnName ) then
AlphaMapFrame_Update( bttnName );
end
local bttnName = parent:GetName();
local iMap = AML.AlphaMap_GetMap(parent.toMap);
if ( iMap ) then
getglobal(bttnName.."Highlight"):Hide();
AlphaMapFrame_Update( iMap );
 
elseif ( parent.toWorldMap ) then
getglobal(bttnName.."Highlight"):Hide();
local cont, zone = AML.AlphaMap_GetWorldMap(parent.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
6515,13 → 6515,17
local parent = note:GetParent();
local keyID = parent.control:GetID();
if ( mBttn == "LeftButton" ) then
if ( parent.toMap ) then
local iMap = AML.AlphaMap_GetMap(parent.toMap);
if ( iMap ) then
for n=1, amNotesPerPage, 1 do
getglobal("AlphaMapAlphaMapButtonDtl"..n.."Highlight"):Hide();
end
AlphaMapFrame_Update( AML.AlphaMap_GetMap(parent.toMap) );
AlphaMapFrame_Update( iMap );
 
elseif ( parent.toWorldMap ) then
for n=1, amNotesPerPage, 1 do
getglobal("AlphaMapAlphaMapButtonDtl"..n.."Highlight"):Hide();
end
local cont, zone = AML.AlphaMap_GetWorldMap(parent.toWorldMap);
if ( cont ~= "error" ) then
SetMapZoom(cont, zone); -- ))((
7779,6 → 7783,8
CloseDropDownMenus();
if ( AlphaMapAlphaMapFrame:IsVisible() ) then
if ( ( amAlphaMapMap ) and ( not AM_Minimap_Data[amAlphaMapMap.filename] ) and ( MouseIsOver(AlphaMapAlphaMapFrame) ) ) then
local iMap = AML.AlphaMap_GetMap(amAlphaMapMap.toMap);
 
if ( ( mouseButton == "LeftButton" ) and ( not amAlphaMapMap.zoomed ) ) then
local x, y = GetCursorPosition();
x = x / AlphaMapAlphaMapFrame:GetEffectiveScale();
7794,10 → 7800,9
elseif ( ( mouseButton == "RightButton" ) and ( amAlphaMapMap.zoomed ) ) then
AM_ZoomOut();
 
elseif ( amAlphaMapMap.toMap ) then
local map = AML.AlphaMap_GetMap(amAlphaMapMap.toMap);
AlphaMapFrame_Update( map );
 
elseif ( iMap ) then
AlphaMapFrame_Update( iMap );
 
elseif ( amAlphaMapMap.toWorldMap ) then
local cont, zone = AML.AlphaMap_GetWorldMap(amAlphaMapMap.toWorldMap);
if ( cont ~= "error" ) then
8049,25 → 8054,46
end
end
 
if ( ( IsControlKeyDown() ) and ( IsAltKeyDown() ) and ( not AlphaMapMovementFrameTop:IsVisible() ) ) then
AML.tmpAlpha = AlphaMapFrame:GetAlpha();
if ( AML.tmpAlpha > 0.5 ) then
AlphaMapFrame:SetAlpha(0.5);
end
AlphaMapSliderFrame:Disable();
AM_Alpha:Disable();
AlphaMapMovementFrameTop:Show();
AlphaMapMovementFrameBottom:Show();
AM_topOverlay:Show();
AM_botOverlay:Show();
elseif ( ( ( not IsControlKeyDown() ) or ( not IsAltKeyDown() ) ) and ( AlphaMapMovementFrameTop:IsVisible() ) ) then
if ( AML.tmpAlpha > 0.5 ) then
AlphaMapFrame:SetAlpha(AML.tmpAlpha);
end
AlphaMapSliderFrame:Enable();
AM_Alpha:Enable();
AlphaMapMovementFrameTop:Hide();
AlphaMapMovementFrameBottom:Hide();
AM_topOverlay:Hide();
AM_botOverlay:Hide();
end
 
if ( ( IsControlKeyDown() ) and ( IsAltKeyDown() ) and ( not AlphaMapAlphaMapFrame:IsVisible() )
and ( not AML.controlsVisible ) ) then
 
local b, controls = 1, #(AML.CustomPOIControls);
local xO = ( controls - 1 ) * 22;
local control, prevC = AML.CustomPOIControls[b];
local amUnitScale = AlphaMap_GetUnitScale(0.9, 1.1);
 
if ( control ) then
control:ClearAllPoints();
control:SetScale( amUnitScale );
control:SetPoint("CENTER", "AlphaMapDetailFrame", "CENTER", -xO/amUnitScale, 0);
control:SetPoint("CENTER", "AlphaMapDetailFrame", "CENTER", -xO, 0);
control:Show();
prevC = control;
b = b + 1;
control = AML.CustomPOIControls[b];
while ( control ) do
control:ClearAllPoints();
control:SetScale( amUnitScale );
control:SetPoint("LEFT", prevC:GetName(), "RIGHT", 1/amUnitScale, 0);
control:SetPoint("LEFT", prevC:GetName(), "RIGHT", 1, 0);
control:Show();
prevC = control;
b = b + 1;
8077,20 → 8103,13
AML.controlsVisible = true;
 
elseif ( ( ( not IsControlKeyDown() ) or ( not IsAltKeyDown() ) or ( AlphaMapAlphaMapFrame:IsVisible() ) )
and ( AlphaMapMovementFrameTop:IsVisible() ) ) then
and ( AML.controlsVisible ) ) then
for _, control in ipairs(AML.CustomPOIControls) do
control:Hide();
end
AML.controlsVisible = false;
end
 
if ( ( IsControlKeyDown() ) and ( IsAltKeyDown() ) and ( not AlphaMapMovementFrameTop:IsVisible() ) ) then
AlphaMapMovementFrameTop:Show();
AlphaMapMovementFrameBottom:Show();
elseif ( ( ( not IsControlKeyDown() ) or ( not IsAltKeyDown() ) ) and ( AlphaMapMovementFrameTop:IsVisible() ) ) then
AlphaMapMovementFrameTop:Hide();
AlphaMapMovementFrameBottom:Hide();
end
end