Moved to folder MBB to easy install (need to exit WOW if you upgrading to this version).

Changed from Drag to Shift-Drag to move MBB button.

More compatibility w/ simpleMinimap
This commit is contained in:
LaYt
2017-01-28 13:53:35 +07:00
parent 59b0a62ac5
commit e8132634d0
8 changed files with 1457 additions and 1436 deletions
+13 -17
View File
@@ -1,5 +1,5 @@
MBB_Version = GetAddOnMetadata("MBB", "Version");
MBB_DebugFlag = 0;
MBB_DebugFlag = 1;
MBB_DragFlag = 0;
MBB_ShowTimeout = -1;
MBB_Buttons = {};
@@ -111,16 +111,16 @@ function MBB_SlashHandler(cmd)
MBB_Debug(" has no OnLeave script");
end
elseif( cmd == "reset position" ) then
MBB_Options.AttachToMinimap = MBB_DefaultOptions.AttachToMinimap;
MBB_Options.ButtonPos = MBB_DefaultOptions.ButtonPos;
MBB_SetButtonPosition();
MBB_ResetPosition();
elseif( cmd == "reset all" ) then
MBB_Options = MBB_DefaultOptions;
for opt,val in pairs(MBB_DefaultOptions) do
MBB_Options[opt] = val;
end
for i=1,table.getn(MBB_Exclude) do
MBB_AddButton(MBB_Exclude[1]);
end
MBB_SetPositions();
MBB_SetButtonPosition();
MBB_ResetPosition();
else
MBB_Print("MBB v" .. MBB_Version .. ":");
MBB_Print(MBB_HELP1);
@@ -181,18 +181,16 @@ function MBB_OnEvent()
MBB_SetButtonPosition();
end
if ( event == "VARIABLES_LOADED" ) then
if( MBB_Options ) then
for opt,val in pairs(MBB_DefaultOptions) do
if( not MBB_Options[opt] ) then
if( not MBB_Options or not MBB_Options[opt] ) then
MBB_Debug(opt .. " option set to default: " .. tostring(val));
MBB_Options[opt] = val;
else
MBB_Debug(opt .. " option exists: " .. tostring(MBB_Options[opt]));
end
end
else
MBB_Options = MBB_DefaultOptions;
end
@@ -488,9 +486,7 @@ function MBB_OnClick(arg1)
--(xpos/scale)-10, (ypos/scale)-10};
MBB_SetButtonPosition();
else
MBB_Options.AttachToMinimap = 1;
MBB_Options.ButtonPos = MBB_DefaultOptions.ButtonPos;
MBB_SetButtonPosition();
MBB_ResetPosition();
end
elseif( arg1 and arg1 == "RightButton" ) then
MBB_OptionsFrame:Show();
@@ -567,17 +563,17 @@ function MBB_OnUpdate(elapsed)
end
function MBB_ResetPosition()
MBB_Options.ButtonPos = MBB_DefaultOptions.ButtonPos;
MBB_Options.ButtonPos[1] = MBB_DefaultOptions.ButtonPos[1];
MBB_Options.ButtonPos[2] = MBB_DefaultOptions.ButtonPos[2];
MBB_Options.AttachToMinimap = MBB_DefaultOptions.AttachToMinimap;
MBB_SetButtonPosition();
end
function MBB_SetButtonPosition()
if (not MBB_Options) then return; end
if (not MBB_Options) then MBB_Debug("NO MBB_Options");return; end
MBB_MinimapButtonFrame:SetScale(1/Minimap:GetEffectiveScale());
--MBB_Debug(MBB_Options.ButtonPos[1].." " .. MBB_Options.ButtonPos[2])
if( MBB_Options.AttachToMinimap == 1 ) then
MBB_MinimapButtonFrame:ClearAllPoints();
View File
+3
View File
@@ -77,11 +77,14 @@
GameTooltip:Hide();
</OnLeave>
<OnDragStart>
if (IsShiftKeyDown()) then
GameTooltip:Hide();
if( MBB_Options.AttachToMinimap == 1 ) then
MBB_DragFlag = 1;
else
this:StartMoving();
end
end
</OnDragStart>
<OnDragStop>
View File
@@ -1,5 +1,5 @@
if( GetLocale() == "deDE" ) then
MBB_TOOLTIP1 = "Strg + Rechtsklick auf einen Button, um ihn aus der Leiste zu lösen.";
MBB_TOOLTIP1 = "Strg + Rechtsklick auf einen Button, um ihn aus der Leiste zu lösen.\nUmschalt + Linke Ziehen-Taste zum Verschieben.";
MBB_OPTIONS_HEADER = "Einstellungen";
MBB_OPTIONS_OKBUTTON = "Ok";
MBB_OPTIONS_CANCELBUTTON = "Abbrechen";
@@ -1,4 +1,4 @@
MBB_TOOLTIP1 = "Ctrl + Right click on a button to reattach it to the minimap.";
MBB_TOOLTIP1 = "Ctrl + Right click on a button to detach from or reattach it to the minimap.\nShift + Left drag to move button.";
MBB_OPTIONS_HEADER = "Options";
MBB_OPTIONS_OKBUTTON = "Ok";
MBB_OPTIONS_CANCELBUTTON = "Cancel";
@@ -1,5 +1,5 @@
if( GetLocale() == "ruRU" ) then
MBB_TOOLTIP1 = "Ctrl + ПКМ на кнопке чтобы приаттачить ее к миникарте.";
MBB_TOOLTIP1 = "Ctrl + ПКМ на кнопке чтобы оторвать от или приаттачить ее к миникарте.\nShift + Left Drag чтобы перемещать ее.";
MBB_OPTIONS_HEADER = "Настройки";
MBB_OPTIONS_OKBUTTON = "Ok";
MBB_OPTIONS_CANCELBUTTON = "Отмена";
+23 -1
View File
@@ -11,6 +11,8 @@ I started new trank from original addon MBB by Tunhadil for vanilla wow servers.
If you ctrl-Right click the MBB button - it will be freely moveble. One more time ctrl-Right click - will put it back to minimap.
Shift-Drag to move MBB button.
If you want to reattach any button to the minimap just use Ctrl + Right click on it.
Use Ctrl + Right click again on the button to put it back into the bar.
@@ -19,6 +21,26 @@ Or hold the Ctrl key down and move the mouse cursor over the button. A button to
Use Right click on the MinimapButtonBag button to open the options dialog.
#Last changes
v0.503
+ Fix for #3
+ Moved to folder "MBB" to easy install (need to exit WOW if you upgrading to this version)
+ Changed from Drag to Shift-Drag to move MBB button.
+ More compatibility w/ simpleMinimap
v0.502
+ Fix for WIM icon. But you need to use this version of WIM https://github.com/shirsig/WIM
v0.501
+ Fixed some position issues.
+ Added square minimap support (Squeenix & simpleMiniMap)
+ Added russian localization
+ Multiline support
# Download
#<a href="https://github.com/laytya/MinimapButtonBag-vanilla/releases/latest">Download HERE</a>
@@ -35,5 +57,5 @@ Use Right click on the MinimapButtonBag button to open the options dialog.
# Basic install instructions
- Extract the archive
- Rename the "MinimapButtonBag-vanilla-master" folder to "MBB" and copy into your "<WOW FOLDER>/Interface/Addons/" directory
- Copy "MBB" folder into your "<WOW FOLDER>/Interface/Addons/" directory