Added button's scale option
This commit is contained in:
+6
-3
@@ -11,6 +11,7 @@ MBB_DefaultOptions = {
|
||||
["ExpandDirection"] = 1,
|
||||
["MaxButtonsPerLine"] = 0,
|
||||
["AltExpandDirection"] = 4,
|
||||
["Scale"] = 100,
|
||||
["Version"] = MBB_Version
|
||||
};
|
||||
|
||||
@@ -35,7 +36,8 @@ MBB_Ignore = {
|
||||
[14] = "FWGMinimapPOI",
|
||||
[15] = "MBB_MinimapButtonFrame",
|
||||
[16] = "QuestieNote",
|
||||
[17] = "MetaMap"
|
||||
[17] = "MetaMap",
|
||||
[18] = "LootLinkMinimapButton"
|
||||
|
||||
};
|
||||
|
||||
@@ -268,7 +270,7 @@ function MBB_PrepareButton(name)
|
||||
end
|
||||
|
||||
if( not MBB_IsInArray(MBB_IgnoreSize, name) ) then
|
||||
frame:SetScale(1/Minimap:GetEffectiveScale());
|
||||
frame:SetScale(MBB_Options.Scale * (1/Minimap:GetEffectiveScale())/100);
|
||||
end
|
||||
frame.isvisible = frame:IsVisible();
|
||||
frame.oshow = frame.Show;
|
||||
@@ -458,6 +460,7 @@ function MBB_SetPositions()
|
||||
else
|
||||
frame:SetHeight(31); -- 33
|
||||
frame:SetWidth(31);
|
||||
frame:SetScale(MBB_Options.Scale * (1/Minimap:GetEffectiveScale())/100);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -571,7 +574,7 @@ end
|
||||
|
||||
function MBB_SetButtonPosition()
|
||||
if (not MBB_Options) then MBB_Debug("NO MBB_Options");return; end
|
||||
MBB_MinimapButtonFrame:SetScale(1/Minimap:GetEffectiveScale());
|
||||
MBB_MinimapButtonFrame:SetScale(MBB_Options.Scale* (1/Minimap:GetEffectiveScale())/100);
|
||||
if( MBB_Options.AttachToMinimap == 1 ) then
|
||||
MBB_MinimapButtonFrame:ClearAllPoints();
|
||||
MBB_MinimapButtonFrame:SetPoint("TOPLEFT", Minimap, "TOPLEFT", MBB_Options.ButtonPos[1], MBB_Options.ButtonPos[2]);
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
## Interface: 11200
|
||||
## Title: MinimapButtonBag
|
||||
## Version: 0.504
|
||||
## Version: 0.505
|
||||
## Author: Tunhadil, LaYt - continue
|
||||
## Notes: Reduces minimap buttons and makes them accessible through a menu!
|
||||
## Notes-deDE: Reduziert die Minimap Knöpfe und erlaubt den Zugriff auf diese über ein Menü!
|
||||
|
||||
+51
-5
@@ -109,7 +109,7 @@
|
||||
|
||||
<Frame name="MBB_OptionsFrame" toplevel="true" enableMouse="true" movable="true" parent="UIParent" hidden="true">
|
||||
<Size>
|
||||
<AbsDimension x="300" y="290" />
|
||||
<AbsDimension x="300" y="330" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="CENTER" />
|
||||
@@ -600,14 +600,58 @@
|
||||
</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="TOP" relativeTo="$parent" relativeFrom="TOPLEFT">
|
||||
<Anchor point="BOTTOMLEFT" relativeTo="$parent" relativeFrom="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="-75" y="-245" />
|
||||
<AbsDimension x="20" y="15" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -615,6 +659,7 @@
|
||||
<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
|
||||
@@ -637,6 +682,7 @@
|
||||
MBB_Options.AltExpandDirection = 4;
|
||||
end
|
||||
MBB_SetPositions();
|
||||
MBB_SetButtonPosition();
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
@@ -645,9 +691,9 @@
|
||||
<AbsDimension x="125" y="21" />
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOP" relativeTo="$parent" relativeFrom="TOPLEFT">
|
||||
<Anchor point="LEFT" relativeTo="$parent_OKButton" relativeFrom="LEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="75" y="-245" />
|
||||
<AbsDimension x="130" y="0" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
|
||||
@@ -14,6 +14,7 @@ if( GetLocale() == "deDE" ) then
|
||||
MBB_OPTIONS_MAXBUTTONSLABEL = "Max. Knöpfe/Zeile:";
|
||||
MBB_OPTIONS_MAXBUTTONSINFO = "(0=unendlich)";
|
||||
MBB_OPTIONS_ALTEXPANSIONLABEL = "Alt. Ausklappen nach:";
|
||||
MBB_OPTIONS_SCALE="Knopfmaßstab";
|
||||
MBB_HELP1 = "Gib \"/mbb <cmd>\" ein, wobei <cmd> folgendes sein kann:";
|
||||
MBB_HELP2 = " |c00ffffffbuttons|r: Zeigt eine Liste aller Frames in der MBB Leiste";
|
||||
MBB_HELP3 = " |c00ffffffreset position|r: Setzt den MBB Minimap Button an seine ursprüngliche Position";
|
||||
|
||||
@@ -13,6 +13,7 @@ MBB_OPTIONS_EXPANSIONBOTTOM = "Bottom";
|
||||
MBB_OPTIONS_MAXBUTTONSLABEL = "Max. Buttons/Line:";
|
||||
MBB_OPTIONS_MAXBUTTONSINFO = "(0=infinity)";
|
||||
MBB_OPTIONS_ALTEXPANSIONLABEL = "Alt. Expand to:";
|
||||
MBB_OPTIONS_SCALE="Button's scale";
|
||||
MBB_HELP1 = "Type \"/mbb <cmd>\" where <cmd> is one of the following:";
|
||||
MBB_HELP2 = " |c00ffffffbuttons|r: Shows a list of all frames in the MBB bar";
|
||||
MBB_HELP3 = " |c00ffffffreset position|r: resets the position of the MBB minimap button";
|
||||
|
||||
@@ -14,6 +14,7 @@ if( GetLocale() == "ruRU" ) then
|
||||
MBB_OPTIONS_MAXBUTTONSLABEL = "Max. кнопок на строку:";
|
||||
MBB_OPTIONS_MAXBUTTONSINFO = "(0=бесконечно)";
|
||||
MBB_OPTIONS_ALTEXPANSIONLABEL = "Расширять строки в:";
|
||||
MBB_OPTIONS_SCALE="Масштаб кнопок";
|
||||
MBB_HELP1 = "Напечатайте \"/mbb <cmd>\" где <cmd> есть одна из команд:";
|
||||
MBB_HELP2 = " |c00ffffffbuttons|r: Показать список всех кнопок в MBB";
|
||||
MBB_HELP3 = " |c00ffffffreset position|r: Сбросить позицию кнопки МBB у миникарты";
|
||||
|
||||
Reference in New Issue
Block a user