some preparations and fixes
This commit is contained in:
+7
-5
@@ -419,6 +419,12 @@ function MBB_RestoreButton(name)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function ResizeButton(frame)
|
||||||
|
frame:SetHeight(31);
|
||||||
|
frame:SetWidth(31);
|
||||||
|
frame:SetScale(MBB_Options.Scale * (1/Minimap:GetEffectiveScale())/100);
|
||||||
|
end
|
||||||
|
|
||||||
function MBB_SetPositions()
|
function MBB_SetPositions()
|
||||||
local directions = {
|
local directions = {
|
||||||
[1] = {"RIGHT", "LEFT"},
|
[1] = {"RIGHT", "LEFT"},
|
||||||
@@ -458,9 +464,7 @@ function MBB_SetPositions()
|
|||||||
local func = MBB_ExtraSize[name];
|
local func = MBB_ExtraSize[name];
|
||||||
func();
|
func();
|
||||||
else
|
else
|
||||||
frame:SetHeight(31); -- 33
|
ResizeButton(frame);
|
||||||
frame:SetWidth(31);
|
|
||||||
frame:SetScale(MBB_Options.Scale * (1/Minimap:GetEffectiveScale())/100);
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -529,9 +533,7 @@ function MBB_OnUpdate(elapsed)
|
|||||||
if( MBB_DragFlag == 1 and MBB_Options.AttachToMinimap == 1 ) then
|
if( MBB_DragFlag == 1 and MBB_Options.AttachToMinimap == 1 ) then
|
||||||
local xpos,ypos = GetCursorPosition();
|
local xpos,ypos = GetCursorPosition();
|
||||||
local xmin,ymin,xm,ym = Minimap:GetLeft(), Minimap:GetBottom(), Minimap:GetRight(), Minimap:GetTop();
|
local xmin,ymin,xm,ym = Minimap:GetLeft(), Minimap:GetBottom(), Minimap:GetRight(), Minimap:GetTop();
|
||||||
|
|
||||||
local scale = Minimap:GetEffectiveScale();
|
local scale = Minimap:GetEffectiveScale();
|
||||||
|
|
||||||
local xdelta, ydelta = (xm - xmin)/2*scale, (ym - ymin) /2 * scale;
|
local xdelta, ydelta = (xm - xmin)/2*scale, (ym - ymin) /2 * scale;
|
||||||
|
|
||||||
MBB_Debug( xmin..","..ymin..","..xm..","..ym)
|
MBB_Debug( xmin..","..ymin..","..xm..","..ym)
|
||||||
|
|||||||
@@ -79,6 +79,7 @@
|
|||||||
<OnDragStart>
|
<OnDragStart>
|
||||||
if (IsShiftKeyDown()) then
|
if (IsShiftKeyDown()) then
|
||||||
GameTooltip:Hide();
|
GameTooltip:Hide();
|
||||||
|
MBB_ShowTimeout = 0;
|
||||||
if( MBB_Options.AttachToMinimap == 1 ) then
|
if( MBB_Options.AttachToMinimap == 1 ) then
|
||||||
MBB_DragFlag = 1;
|
MBB_DragFlag = 1;
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user