Skip to content

Commit

Permalink
Fix WorldMap (moving, and /rl) on Classic.
Browse files Browse the repository at this point in the history
  • Loading branch information
tukz committed Jul 15, 2024
1 parent eb46960 commit 53cd7aa
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
3 changes: 3 additions & 0 deletions Tukui/Core/Temp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,6 @@ end
Temp:RegisterEvent("PLAYER_LOGIN")
Temp:SetScript("OnEvent", Temp.Enable)


--hooksecurefunc("SetCVar", function(a, b, c) print(a,b,c) end)

27 changes: 19 additions & 8 deletions Tukui/Modules/Maps/Worldmap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -388,13 +388,15 @@ else
local Borders = Frame.BorderFrame
local Map = Frame.ScrollContainer.Child
local CloseButton = WorldMapFrameCloseButton
local MinimizeButton = WorldMapFrame.MaximizeMinimizeFrame.MinimizeButton
local ContinentButton = WorldMapContinentDropDown
local ZoneButton = WorldMapZoneDropDown
local ZoneMinimapButton = WorldMapZoneMinimapDropDown
local ZoonButton = WorldMapZoomOutButton
local MagnifyButton = WorldMapMagnifyingGlassButton
local QuestieToggleQuest = Questie_Toggle

Frame:SetParent(UIParent)
Frame:CreateBackdrop()
Frame.Backdrop:ClearAllPoints()
Frame.Backdrop:SetAllPoints(Map)
Expand All @@ -415,13 +417,18 @@ else
WorldMapZoomOutButton:SetParent(T.Hider)

MagnifyButton:SetParent(T.Hider)

CloseButton:StripTextures()
CloseButton:ClearAllPoints()
CloseButton:SetPoint("TOPRIGHT", -10, -72)
CloseButton:SetFrameStrata("FULLSCREEN")
CloseButton:SetFrameLevel(Map:GetFrameLevel() + 1)
CloseButton:SkinCloseButton()

CloseButton:SetParent(T.Hider)

MinimizeButton:SetParent(T.Hider)

self.CloseButton = CreateFrame("Button", nil, WorldMapFrame)
self.CloseButton:SetSize(18, 18)
self.CloseButton:SetPoint("TOPRIGHT", -20, -78)
self.CloseButton:SetFrameLevel(CloseButton:GetFrameLevel())
self.CloseButton:SetFrameStrata("FULLSCREEN")
self.CloseButton:SetScript("OnClick", function() WorldMapFrame:Hide() end)
self.CloseButton:SkinCloseButton()
end

function WorldMap:SizeMap()
Expand All @@ -442,6 +449,7 @@ else
self.MoveButton:SetSize(18, 18)
self.MoveButton:SetPoint("TOPRIGHT", -40, -80)
self.MoveButton:SetFrameLevel(WorldMapFrameCloseButton:GetFrameLevel())
self.MoveButton:SetFrameStrata("FULLSCREEN")
self.MoveButton:EnableMouse(true)
self.MoveButton:RegisterForDrag("LeftButton")
self.MoveButton:SetScript("OnLeave", GameTooltip_Hide)
Expand Down Expand Up @@ -484,11 +492,14 @@ else
if not C.Misc.WorldMapEnable then
return
end

SetCVar("miniWorldMap", 0)

local Data = TukuiDatabase.Variables[T.MyRealm][T.MyName]

if Data.WorldMapPosition then
WorldMapFrame:SetPoint(unpack(Data.WorldMapPosition))
-- FIX ME : Error on RL when custom position
--WorldMapFrame:SetPoint(unpack(Data.WorldMapPosition))
end

self.Interval = 0.1
Expand Down

0 comments on commit 53cd7aa

Please sign in to comment.