Menu

#1377 TitanLocation - Worldmap Coords in Wotlk

New
nobody
None
Low
Defect
2023-12-30
2023-12-28
Anonymous
No

Latest version of TP
Moved from an old TitanClassic version to the latest Titan combined one.
TitanLocation no longer cares for maximized Map coords location. It now defaults TOPRIGHT. (I looked a bit at your code and it seems the position is now hardcoded in line 609 instead of using the global variable like in the old version. - Intentional maybe? options in the game are still there though)

Also on a different bug, the minimized map shows no coords at all.
(Again looking at the code, the script in 661 that runs your "onUpdate" for when the map is displayed depends on 656 "WorldMapFrame.BorderFrame" which exists only for the maximized map. The minimized map frame is called "WorldMapFrame.MiniBorderFrame".)

I hope i did not impose,
For now as a workaround I copied the "bottom" settings from the old code to move mine at the bottom

1 Attachments

Discussion

  • urnati

    urnati - 2023-12-28

    Thanks for posting - I do not play Classic much and thought coords only on the large map was normal. Or I made a mistake :).
    It is now on my to-do list to better combine the Location versions.

    Just to clarify - the 'old' code you copied was the current Wrath only Location?

     
  • Dosmod

    Dosmod - 2023-12-29

    Yes the Wrath only TitanClassicLocation.lua (I probably didn't have the latest version)
    And not the full file. Just made changes directly to move coords where i wanted them.
    I mean I didn't fix it for general use.
    Still doesn't use the savedvariable (which exists - that didnt change)
    And in 656 I replaced BorderFrame with MiniBorderFrame so it now only works with the minimized version which is the one I mostly use.
    Also the WorldMapFrame.MiniBorderFrame.Tutorial frame doesn't exist in classic WotlK so the cursor coords need somewhere else to anchor

            -- Potision the text
            if MapMinMaxFrame.MaximizeButton:IsShown() then
    --      if WorldMapFrame.MaximizeMinimizeFrame.MaximizeButton:IsShown() then
                if WorldMapFrame.TitanSizePrev == "small" then
                    -- no change
                else
                    TitanMapPlayerLocation:ClearAllPoints();
                    TitanMapCursorLocation:ClearAllPoints();
                    TitanMapPlayerLocation:SetPoint("RIGHT", MapMinMaxFrame, "LEFT", 0, 0)
    --              TitanMapCursorLocation:SetPoint("LEFT", WorldMapFrame.MiniBorderFrame.Tutorial, "RIGHT", 0, 0)
                    TitanMapCursorLocation:SetPoint("BOTTOM", WorldMapFrame, "BOTTOM", 0, 10)   --DOSMOD
                    WorldMapFrame.TitanSize = "small"
                end
            else -- map should be 'full' screen
                if WorldMapFrame.TitanSizePrev == "large" then
                    -- no change
                else
                    WorldMapFrame.TitanSize = "large"
                    TitanMapPlayerLocation:ClearAllPoints();
                    TitanMapCursorLocation:ClearAllPoints();
                    TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOM", -5, 10) --DOSMOD
                    TitanMapCursorLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOM", 0, 10)   --DOSMOD
                end
            end
    
    end
    
        --[[ --ORIGINAL FROM TITAN CLASSIC
        TitanMapPlayerLocation:ClearAllPoints()
        TitanMapCursorLocation:ClearAllPoints()
    
        local xbuff = 10 -- to get away from the frame border
        local buff  = 5  -- between the player and cursor frames
        local mloc = TitanGetVar(TITAN_LOCATION_ID, "MapLocation") or "TOPRIGHT"
    
        if (mloc == "TOPRIGHT") then
            TitanMapPlayerLocation:SetPoint("TOPRIGHT", WorldMapFrame, "TOPRIGHT", -10, -28)
            TitanMapCursorLocation:SetPoint("TOPRIGHT", TitanMapPlayerLocation, "BOTTOMRIGHT", 0, 0)
        elseif (mloc == "TOPLEFT") then
            TitanMapPlayerLocation:SetPoint("TOPLEFT", WorldMapFrame, "TOPLEFT", 10, -28)
            TitanMapCursorLocation:SetPoint("TOPLEFT", TitanMapPlayerLocation, "BOTTOMLEFT", 0, 0)
        elseif (mloc == "BOTTOMLEFT") then
            TitanMapPlayerLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOMLEFT", 10, 10)
            TitanMapCursorLocation:SetPoint("BOTTOMLEFT", TitanMapPlayerLocation, "BOTTOMRIGHT", buff, 0)
        elseif (mloc == "BOTTOMRIGHT") then
            TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", TitanMapCursorLocation, "BOTTOMLEFT", -buff, 0)
            TitanMapCursorLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOMRIGHT", -xbuff, 10)
        elseif (mloc == "BOTTOM") then
            TitanMapPlayerLocation:SetPoint("BOTTOMRIGHT", WorldMapFrame, "BOTTOM", -buff, 10)
            TitanMapCursorLocation:SetPoint("BOTTOMLEFT", WorldMapFrame, "BOTTOM", 0, 10)
        end
    end
    --]]
    
     

    Last edit: Dosmod 2023-12-29
  • urnati

    urnati - 2023-12-29

    I believe the mini (no show) vs large (show) map is from line 638.
    The create frame has WorldMapFrame.BorderFrame as the parent. Make it just WorldMapFrame and the coords should be on both - positioning may not be where you want though.

    Thanks for sharing your changes - it helped see what was up.
    It is starting to work - I need to see what makes sense across all three WoW versions.

     
  • Dosmod

    Dosmod - 2023-12-30

    Yes this is line 656 in my file (next one from the comment)
    Making it just WorldMapFrame should fire the script below for both

            -- create the frame to hold the font strings, and simulate an "OnUpdate" script handler using C_Timer for efficiency
            local frame = CreateFrame("FRAME", "TitanMapFrame", WorldMapFrame.BorderFrame)
    

    Thanks.

     

Log in to post a comment.