Files
MinimapButtonBag_Octo/MBB.xml
T
2025-08-30 20:58:40 +01:00

696 lines
20 KiB
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/
..\FrameXML\UI.xsd">
<Script file="MBB.lua"/>
<Frame name="MBBFrame" toplevel="true" parent="UIParent" frameStrata="DIALOG" hidden="true" enableMouse="true">
<Scripts>
<OnLoad>
MBB_OnLoad();
</OnLoad>
<OnEvent>
MBB_OnEvent();
</OnEvent>
</Scripts>
</Frame>
<Button name="MBB_MinimapButtonFrame" toplevel="true" frameStrata="MEDIUM" parent="Minimap" enableMouse="true" movable="true" hidden="false">
<Size>
<AbsDimension x="33" y="33"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-18" y="-100"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<Texture name="$parent_Texture" file="Interface\AddOns\MinimapButtonBag\icon">
<Size>
<AbsDimension x="17" y="17"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="8" y="-8"/>
</Offset>
</Anchor>
</Anchors>
<TexCoords left="0.075" right="0.925" top="0.075" bottom="0.925"/>
</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>
<HighlightTexture alphaMode="ADD" file="Interface\Minimap\UI-Minimap-ZoomButton-Highlight"/>
<Scripts>
<OnLoad>
this:RegisterForClicks("LeftButtonUp","RightButtonUp");
this:RegisterForDrag("LeftButton");
</OnLoad>
<OnMouseDown>
MBB_MinimapButtonFrame_Texture:SetTexCoord(0,1,0,1);
</OnMouseDown>
<OnMouseUp>
MBB_MinimapButtonFrame_Texture:SetTexCoord(.075,.925,.075,.925);
</OnMouseUp>
<OnClick>
MBB_OnClick(arg1);
</OnClick>
<OnEnter>
MBB_ShowTimeout = -1;
GameTooltip:SetOwner(this, "ANCHOR_LEFT");
GameTooltip:AddLine("MinimapButtonBag v" .. MBB_Version);
GameTooltip:AddLine(MBB_TOOLTIP1, 0, 1, 0);
GameTooltip:Show();
</OnEnter>
<OnLeave>
MBB_ShowTimeout = 0;
GameTooltip:Hide();
</OnLeave>
<OnDragStart>
MBB_DragStart();
</OnDragStart>
<OnDragStop>
MBB_DragStop();
</OnDragStop>
<OnUpdate>
MBB_OnUpdate(arg1);
</OnUpdate>
</Scripts>
</Button>
<Frame name="MBB_OptionsFrame" toplevel="true" enableMouse="true" movable="true" parent="UIParent" hidden="true">
<Size>
<AbsDimension x="300" y="330" />
</Size>
<Anchors>
<Anchor point="CENTER" />
</Anchors>
<Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
<BackgroundInsets>
<AbsInset left="11" right="12" top="12" bottom="11" />
</BackgroundInsets>
<TileSize>
<AbsValue val="32" />
</TileSize>
<EdgeSize>
<AbsValue val="32" />
</EdgeSize>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<Texture name="$parent_Header" file="Interface\DialogFrame\UI-DialogBox-Header">
<Size>
<AbsDimension x="370" y="64"/>
</Size>
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="12"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
<FontString name="$parent_HeaderText" inherits="GameFontNormal" text="MBB_OPTIONS_HEADER">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_Header">
<Offset>
<AbsDimension x="0" y="-14"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parent_ExpansionLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONLABEL">
<Size>
<AbsDimension x="130" y="15" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="20" y="-85" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parent_MaxButtonsLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_MAXBUTTONSLABEL">
<Size>
<AbsDimension x="130" y="15" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="20" y="-155" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
<Layer level="ARTWORK">
<FontString name="$parent_AltExpansionLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_ALTEXPANSIONLABEL">
<Size>
<AbsDimension x="130" y="15" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parent">
<Offset>
<AbsDimension x="20" y="-175" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Slider name="$parent_TimeoutSlider" inherits="OptionsSliderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="$parent" relativeFrom="TOPLEFT">
<Offset>
<AbsDimension x="150" y="-45" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_SLIDERLABEL">
<Size>
<AbsDimension x="130" y="15" />
</Size>
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnValueChanged>
if( this:GetValue() == 0 ) then
getglobal(this:GetName().."Text"):SetText(MBB_OPTIONS_SLIDEROFF);
else
getglobal(this:GetName().."Text"):SetText(this:GetValue() .. " " .. MBB_OPTIONS_SLIDERSEK);
end
</OnValueChanged>
<OnLoad>
this:SetMinMaxValues(0,5);
this:SetValueStep(1);
getglobal(this:GetName().."High"):SetText("5 " .. MBB_OPTIONS_SLIDERSEK);
getglobal(this:GetName().."Low"):SetText(MBB_OPTIONS_SLIDEROFF);
</OnLoad>
<OnShow>
this:SetValue(MBB_Options.CollapseTimeout);
if( MBB_Options.CollapseTimeout == 0 ) then
getglobal(this:GetName().."Text"):SetText(MBB_OPTIONS_SLIDEROFF);
else
getglobal(this:GetName().."Text"):SetText(this:GetValue() .. " " .. MBB_OPTIONS_SLIDERSEK);
end
</OnShow>
</Scripts>
</Slider>
<CheckButton name="$parent_LeftRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_ExpansionLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONLEFT">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(1);
MBB_UpdateAltRadioButtons();
</OnClick>
<OnShow>
if( MBB_Options.ExpandDirection == 1 ) then
MBB_RadioButton_OnClick(1);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_TopRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_LeftRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONTOP">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(2);
MBB_UpdateAltRadioButtons();
</OnClick>
<OnShow>
if( MBB_Options.ExpandDirection == 2 ) then
MBB_RadioButton_OnClick(2);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_RightRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_TopRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONRIGHT">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(3);
MBB_UpdateAltRadioButtons();
</OnClick>
<OnShow>
if( MBB_Options.ExpandDirection == 3 ) then
MBB_RadioButton_OnClick(3);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_BottomRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_RightRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONBOTTOM">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(4);
MBB_UpdateAltRadioButtons();
</OnClick>
<OnShow>
if( MBB_Options.ExpandDirection == 4 ) then
MBB_RadioButton_OnClick(4);
end
</OnShow>
</Scripts>
</CheckButton>
<EditBox name="$parent_MaxButtonsTextBox" enableMouse="true" ignoreArrows="false" letters="3" autoFocus="false">
<Backdrop edgeFile="Interface\Tooltips\UI-Tooltip-Border" tile="true">
<TileSize>
<AbsValue val="8" />
</TileSize>
<EdgeSize>
<AbsValue val="8" />
</EdgeSize>
</Backdrop>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentInfo" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_MAXBUTTONSINFO">
<Size>
<AbsDimension x="100" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="5" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Size>
<AbsDimension x="30" y="20" />
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_MaxButtonsLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<FontString inherits="ChatFontNormal" justifyH="RIGHT">
<FontHeight>
<AbsValue val="14" />
</FontHeight>
<Color r="1" g="1" b="1" />
<Shadow>
<Color r="0" g="0" b="0" />
<Offset>
<AbsDimension x="1" y="-1" />
</Offset>
</Shadow>
</FontString>
<Scripts>
<OnEscapePressed>
this:SetText(MBB_Options.MaxButtonsPerLine);
this:ClearFocus();
</OnEscapePressed>
<OnTextChanged>
MBB_UpdateAltRadioButtons();
</OnTextChanged>
<OnEnterPressed>
if( not tonumber(this:GetText()) ) then
this:SetText(MBB_Options.MaxButtonsPerLine);
end
MBB_UpdateAltRadioButtons();
this:ClearFocus();
</OnEnterPressed>
<OnLoad>
this:SetTextInsets(2, 4, 2, 2);
</OnLoad>
<OnShow>
this:SetText(MBB_Options.MaxButtonsPerLine);
</OnShow>
</Scripts>
</EditBox>
<CheckButton name="$parent_LeftAltRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_AltExpansionLabel" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONLEFT">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(1, true);
</OnClick>
<OnShow>
if( MBB_Options.AltExpandDirection == 1 ) then
MBB_RadioButton_OnClick(1, true);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_TopAltRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_LeftAltRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONTOP">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(2, true);
</OnClick>
<OnShow>
if( MBB_Options.AltExpandDirection == 2 ) then
MBB_RadioButton_OnClick(2, true);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_RightAltRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_TopAltRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONRIGHT">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(3, true);
</OnClick>
<OnShow>
if( MBB_Options.AltExpandDirection == 3 ) then
MBB_RadioButton_OnClick(3, true);
end
</OnShow>
</Scripts>
</CheckButton>
<CheckButton name="$parent_BottomAltRadio" inherits="UIRadioButtonTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_RightAltRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_EXPANSIONBOTTOM">
<Size>
<AbsDimension x="50" y="15" />
</Size>
<Anchors>
<Anchor point="LEFT" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnClick>
MBB_RadioButton_OnClick(4, true);
</OnClick>
<OnShow>
if( MBB_Options.AltExpandDirection == 4 ) then
MBB_RadioButton_OnClick(4, true);
end
</OnShow>
</Scripts>
</CheckButton>
<Slider name="$parent_Scale" inherits="OptionsSliderTemplate">
<Anchors>
<Anchor point="TOP" relativeTo="$parent_BottomAltRadio" relativePoint="BOTTOM">
<Offset>
<AbsDimension x="55" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<FontString name="$parentLabel" inherits="GameFontHighlight" justifyH="LEFT" text="MBB_OPTIONS_SCALE">
<Size>
<AbsDimension x="125" y="15" />
</Size>
<Anchors>
<Anchor point="RIGHT" relativePoint="LEFT">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnValueChanged>
getglobal(this:GetName().."Text"):SetText(this:GetValue() .. "%");
MBB_Options.Scale = MBB_OptionsFrame_Scale:GetValue();
MBB_SetPositions();
MBB_SetButtonPosition();
</OnValueChanged>
<OnLoad>
this:SetMinMaxValues(50,150);
this:SetValueStep(1);
getglobal(this:GetName().."High"):SetText("150%");
getglobal(this:GetName().."Low"):SetText("50%");
</OnLoad>
<OnShow>
this:SetValue(MBB_Options.Scale);
getglobal(this:GetName().."Text"):SetText(this:GetValue() .. "%");
</OnShow>
</Scripts>
</Slider>
<Button name="$parent_OKButton" inherits="UIPanelButtonTemplate" text="MBB_OPTIONS_OKBUTTON">
<Size>
<AbsDimension x="125" y="21" />
</Size>
<Anchors>
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativeFrom="BOTTOMLEFT">
<Offset>
<AbsDimension x="20" y="15" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
MBB_OptionsFrame:Hide();
MBB_Options.CollapseTimeout = MBB_OptionsFrame_TimeoutSlider:GetValue();
MBB_Options.Scale = MBB_OptionsFrame_Scale:GetValue();
if( MBB_OptionsFrame_LeftRadio:GetChecked() ) then
MBB_Options.ExpandDirection = 1;
elseif( MBB_OptionsFrame_TopRadio:GetChecked() ) then
MBB_Options.ExpandDirection = 2;
elseif( MBB_OptionsFrame_RightRadio:GetChecked() ) then
MBB_Options.ExpandDirection = 3;
elseif( MBB_OptionsFrame_BottomRadio:GetChecked() ) then
MBB_Options.ExpandDirection = 4;
end
if( tonumber(MBB_OptionsFrame_MaxButtonsTextBox:GetText()) ) then
MBB_Options.MaxButtonsPerLine = tonumber(MBB_OptionsFrame_MaxButtonsTextBox:GetText());
end
if( MBB_OptionsFrame_LeftAltRadio:GetChecked() ) then
MBB_Options.AltExpandDirection = 1;
elseif( MBB_OptionsFrame_TopAltRadio:GetChecked() ) then
MBB_Options.AltExpandDirection = 2;
elseif( MBB_OptionsFrame_RightAltRadio:GetChecked() ) then
MBB_Options.AltExpandDirection = 3;
elseif( MBB_OptionsFrame_BottomAltRadio:GetChecked() ) then
MBB_Options.AltExpandDirection = 4;
end
MBB_SetPositions();
MBB_SetButtonPosition();
</OnClick>
</Scripts>
</Button>
<Button name="$parent_CancelButton" inherits="UIPanelButtonTemplate" text="MBB_OPTIONS_CANCELBUTTON">
<Size>
<AbsDimension x="125" y="21" />
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="$parent_OKButton" relativeFrom="LEFT">
<Offset>
<AbsDimension x="130" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
MBB_OptionsFrame:Hide();
</OnClick>
</Scripts>
</Button>
</Frames>
<Scripts>
<OnShow>
MBB_OptionsFrame_HeaderText:SetText("MBB v" .. MBB_Version .. " " .. MBB_OPTIONS_HEADER);
MBB_UpdateAltRadioButtons();
</OnShow>
</Scripts>
</Frame>
</Ui>