You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
83 lines
2.7 KiB
83 lines
2.7 KiB
<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/
|
|
..\FrameXML\UI.xsd">
|
|
<Script file="BtWQuestsMinimapButton.lua"/>
|
|
|
|
<Button name="BtWQuestsMinimapButton" parent="Minimap" frameStrata="MEDIUM" frameLevel="8" enableMouse="true" movable="true" hidden="false">
|
|
<Size>
|
|
<AbsDimension x="33" y="33"/>
|
|
</Size>
|
|
<Anchors>
|
|
<Anchor point="CENTER" x="-12" y="-80"/>
|
|
</Anchors>
|
|
<Layers>
|
|
<Layer level="BACKGROUND">
|
|
<Texture name="$parentIcon" file="Interface\QuestFrame\UI-QuestLog-BookIcon">
|
|
<Size>
|
|
<AbsDimension x="21" y="21"/>
|
|
</Size>
|
|
<Anchors>
|
|
<Anchor point="TOPLEFT" x="7" y="-6"/>
|
|
</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="$parentDraggingFrame" hidden="true">
|
|
<Scripts>
|
|
<OnUpdate function="BtWQuestsMinimapButtonDraggingFrame_OnUpdate"/>
|
|
</Scripts>
|
|
</Frame>
|
|
</Frames>
|
|
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
|
|
<Scripts>
|
|
<OnLoad>
|
|
self:RegisterForClicks("anyUp")
|
|
self:RegisterForDrag("LeftButton")
|
|
self:RegisterEvent("PLAYER_LOGIN")
|
|
</OnLoad>
|
|
<OnEvent>
|
|
self:SetShown(BtWQuests.Settings.minimapShown)
|
|
if BtWQuests_Settings.minimapAngle == nil and BtWQuests_Settings.minimapX ~= nil then
|
|
local px,py = BtWQuests_Settings.minimapX, BtWQuests_Settings.minimapY;
|
|
local mx,my = Minimap:GetCenter();
|
|
|
|
local scale = Minimap:GetEffectiveScale();
|
|
px, py = px / scale, py / scale;
|
|
|
|
local angle = deg(atan2(py - my, px - mx));
|
|
BtWQuests_Settings.minimapAngle = angle;
|
|
BtWQuestsMinimapButton_Reposition(angle);
|
|
else
|
|
BtWQuestsMinimapButton_Reposition(BtWQuests_Settings.minimapAngle)
|
|
end
|
|
BtWQuests_Settings.minimapX, BtWQuests_Settings.minimapY = nil, nil
|
|
|
|
local button = self;
|
|
Minimap:HookScript("OnSizeChanged", function ()
|
|
BtWQuestsMinimapButton_Reposition(BtWQuests_Settings.minimapAngle);
|
|
end)
|
|
</OnEvent>
|
|
<OnDragStart>
|
|
self:LockHighlight()
|
|
BtWQuestsMinimapButtonDraggingFrame:Show()
|
|
</OnDragStart>
|
|
<OnDragStop>
|
|
self:UnlockHighlight()
|
|
BtWQuestsMinimapButtonDraggingFrame:Hide()
|
|
</OnDragStop>
|
|
<OnClick function="BtWQuestsMinimapButton_OnClick"/>
|
|
<OnEnter function="BtWQuestsMinimapButton_OnEnter"/>
|
|
<OnLeave function="BtWQuestsMinimapButton_OnLeave"/>
|
|
</Scripts>
|
|
</Button>
|
|
</Ui>
|