📄 mapnotesmininoteframe.xml
字号:
<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="MapNotes.lua"/>
<!-- This is stuff for WorldMapFrame.xml -->
<!-- Map Notes Begin Insert [ 1/ 7]-->
<Button name="MapNotesPOIButtonTemplate" virtual="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parentTexture" file="Interface\AddOns\MapNotes\POIIcons\Icon1">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
this:SetFrameLevel(this:GetFrameLevel() + 1);
this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
</OnLoad>
<OnEnter>
MapNotes_OnEnter(this:GetID());
</OnEnter>
<OnLeave>
MapNotes_OnLeave(this:GetID());
</OnLeave>
<OnClick>
MapNotes_Note_OnClick(arg1, this:GetID());
</OnClick>
</Scripts>
</Button>
<Button name="MapNotesButtonTemplate" inherits="UIPanelButtonTemplate" virtual="true">
<Size>
<AbsDimension x="144" y="21"/>
</Size>
<NormalText inherits="GameFontHighlight"/>
<DisabledText inherits="GameFontDisable"/>
<HighlightText inherits="GameFontHighlight"/>
</Button>
<!-- Map Notes End Insert [ 1/ 7]-->
<!-- Map Notes Begin Change [ 2/ 7]-->
<Button name="WorldMapMapNotesUnitTemplate" hidden="true" virtual="true">
<!-- Map Notes End Change [ 2/ 7]-->
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentIcon" file="Interface\WorldMap\WorldMapPlayerIcon" setAllPoints="true"/>
</Layer>
</Layers>
<Scripts>
<OnLoad>
this:SetFrameLevel(this:GetFrameLevel() + 1);
if ( this:GetID() == 0 ) then
this.unit = "player";
else
this.unit = "party"..this:GetID();
getglobal(this:GetName().."Icon"):SetTexture("Interface\\WorldMap\\WorldMapPartyIcon");
end
--[[<!-- Map Notes Begin Insert [ 3/ 7]-->]]
this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
--[[<!-- Map Notes End Insert [ 3/ 7]-->]]
</OnLoad>
<OnEnter>
local x, y = this:GetCenter();
local parentX, parentY = this:GetParent():GetCenter();
if ( x > parentX ) then
WorldMapTooltip:SetOwner(this, "ANCHOR_LEFT");
else
WorldMapTooltip:SetOwner(this, "ANCHOR_RIGHT");
end
WorldMapTooltip:SetText(UnitName(this.unit));
WorldMapTooltip:Show();
</OnEnter>
<OnLeave>
WorldMapTooltip:Hide();
</OnLeave>
<!-- Map Notes Begin Insert [ 4/ 7]-->
<OnClick>
if (arg1 == "LeftButton") then
local x, y = this:GetCenter();
local centerX, centerY = WorldMapButton:GetCenter();
local width = WorldMapButton:GetWidth();
local height = WorldMapButton:GetHeight();
local adjustedY = (centerY + (height/2) - y) / height;
local adjustedX = (x - (centerX - (width/2))) / width;
if (GetCurrentMapZone() ~= 0) then
if (MapNotes_CheckNearNotes(GetCurrentMapContinent(), GetCurrentMapZone(), adjustedX, adjustedY)) then
MapNotesButtonNewNote:Disable();
else
MapNotesButtonNewNote:Enable();
end
MapNotes_ShowNewFrame(adjustedX, adjustedY);
end
end
</OnClick>
<!-- Map Notes Begin Insert [ 4/ 7]-->
</Scripts>
<!-- Map Notes Begin Change [ 5/ 7]-->
</Button>
<!-- Map Notes End Change [ 5/ 7]-->
<Button name="WorldMapMapNotesMiscTemplate" hidden="true" virtual="true">
<Size>
<AbsDimension x="16" y="16"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parentTexture" file="Interface\AddOns\MapNotes\POIIcons\Icontloc" setAllPoints="true"/>
</Layer>
</Layers>
<Scripts>
<OnLoad>
this:SetFrameLevel(this:GetFrameLevel() + 1);
this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
if (this:GetID() == 1) then
MapNotesPOIpartyTexture:SetTexture("Interface\\AddOns\\MapNotes\\POIIcons\\Iconparty");
end
</OnLoad>
<OnEnter>
local x, y = this:GetCenter();
local parentX, parentY = this:GetParent():GetCenter();
if ( x > parentX ) then
WorldMapTooltip:SetOwner(this, "ANCHOR_LEFT");
else
WorldMapTooltip:SetOwner(this, "ANCHOR_RIGHT");
end
if (this:GetID() == 0) then
WorldMapTooltip:SetText(MAPNOTES_THOTTBOTLOC);
elseif (this:GetID() == 1) then
WorldMapTooltip:SetText(MAPNOTES_PARTYNOTE);
end
WorldMapTooltip:Show();
</OnEnter>
<OnLeave>
WorldMapTooltip:Hide();
</OnLeave>
<OnClick>
MapNotes_Misc_OnClick(arg1);
</OnClick>
</Scripts>
</Button>
<!-- Here are the buttons, that need to be added to the WorldMapFrame.xml -->
<Button name="WorldMapMapNotesPlayer" inherits="WorldMapMapNotesUnitTemplate" id="0" parent="WorldMapButton"/> <!-- The New "Button" PlayerPOI -->
<Button name="MapNotesPOI1" inherits="MapNotesPOIButtonTemplate" id="1" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI2" inherits="MapNotesPOIButtonTemplate" id="2" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI3" inherits="MapNotesPOIButtonTemplate" id="3" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI4" inherits="MapNotesPOIButtonTemplate" id="4" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI5" inherits="MapNotesPOIButtonTemplate" id="5" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI6" inherits="MapNotesPOIButtonTemplate" id="6" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI7" inherits="MapNotesPOIButtonTemplate" id="7" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI8" inherits="MapNotesPOIButtonTemplate" id="8" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI9" inherits="MapNotesPOIButtonTemplate" id="9" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI10" inherits="MapNotesPOIButtonTemplate" id="10" hidden="true" parent="WorldMapButton"/>
<Button name="MapNotesPOI11" inherits="MapNotesPOIButtonTemplate" id="11" hidden="true" parent="WorldMapButton"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -