Fixes for Mapster and Worldmap skin (#87)
This commit is contained in:
committed by
GitHub
parent
494ebbd885
commit
411aa7d604
@@ -102,13 +102,27 @@ S:AddCallbackForAddon("Mapster", "Mapster", function()
|
||||
WorldMapDetailFrame.backdrop:Hide()
|
||||
end
|
||||
|
||||
-- Position Mapster Options Button based on map size
|
||||
local function updateMapsterButtonPosition()
|
||||
MapsterOptionsButton:ClearAllPoints()
|
||||
if Mapster.miniMap or (WORLDMAP_SETTINGS and WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE) then
|
||||
-- Minimized map - anchor to SizeUpButton
|
||||
MapsterOptionsButton:Point("RIGHT", WorldMapFrameSizeUpButton, "LEFT", -4, 0)
|
||||
else
|
||||
-- Maximized map - anchor to SizeDownButton
|
||||
MapsterOptionsButton:Point("RIGHT", WorldMapFrameSizeDownButton, "LEFT", -4, 0)
|
||||
end
|
||||
end
|
||||
|
||||
local function sizeDown()
|
||||
WorldMapFrame.backdrop:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -14, 27)
|
||||
WorldMapDetailFrame.backdrop:Hide()
|
||||
updateMapsterButtonPosition()
|
||||
end
|
||||
local function sizeUp()
|
||||
WorldMapFrame.backdrop:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -14, 70)
|
||||
WorldMapDetailFrame.backdrop:Show()
|
||||
updateMapsterButtonPosition()
|
||||
end
|
||||
|
||||
S:SecureHook(Mapster, "SizeDown", sizeDown)
|
||||
@@ -128,12 +142,10 @@ S:AddCallbackForAddon("Mapster", "Mapster", function()
|
||||
end
|
||||
end)
|
||||
|
||||
MapsterOptionsButton:Point("TOPRIGHT", WorldMapPositioningGuide, "TOPRIGHT", -50, -3)
|
||||
MapsterOptionsButton.SetPoint = E.noop
|
||||
S:HandleButton(MapsterOptionsButton)
|
||||
updateMapsterButtonPosition()
|
||||
|
||||
MapsterQuestObjectivesDropDown:Point("BOTTOMRIGHT", WorldMapPositioningGuide, "BOTTOMRIGHT", -7, -4)
|
||||
|
||||
S:HandleButton(MapsterOptionsButton)
|
||||
S:HandleDropDownBox(MapsterQuestObjectivesDropDown)
|
||||
|
||||
do -- Scaler
|
||||
|
||||
Reference in New Issue
Block a user