diff --git a/ElvUI_EltreumUI/Core/Options.lua b/ElvUI_EltreumUI/Core/Options.lua index 9016c1905..2936a18eb 100644 --- a/ElvUI_EltreumUI/Core/Options.lua +++ b/ElvUI_EltreumUI/Core/Options.lua @@ -1030,8 +1030,9 @@ function ElvUI_EltreumUI:Configtable() _G["WorldMapFrame"]:SetScale(value) end end,function() return not E.db.ElvUI_EltreumUI.otherstuff.worldmapscale end) - ElvUI_EltreumUI.Options.args.map.args.general.args.description3 = ACH:Description(L["Flight Frame"], 6, nil, 'Interface\\AddOns\\ElvUI_EltreumUI\\Media\\Textures\\EltreumHeader', nil, 3240, 1, "full") - ElvUI_EltreumUI.Options.args.map.args.general.args.RotateMinimap = ACH:Toggle(_G.ROTATE_MINIMAP, nil, 7, nil, false,nil,function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate end,function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate = value E:StaticPopup_Show('CONFIG_RL') end) + ElvUI_EltreumUI.Options.args.map.args.general.args.description3 = ACH:Description(_G.MINIMAP_LABEL or L["Minimap"], 6, nil, 'Interface\\AddOns\\ElvUI_EltreumUI\\Media\\Textures\\EltreumHeader', nil, 3240, 1, "full") + ElvUI_EltreumUI.Options.args.map.args.general.args.circleMinimap = ACH:Toggle(E.NewSign..L["Circle Minimap"], nil, 7, nil, false,nil,function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.circle end,function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.circle = value E:StaticPopup_Show('CONFIG_RL') end) + ElvUI_EltreumUI.Options.args.map.args.general.args.RotateMinimap = ACH:Toggle(_G.ROTATE_MINIMAP, nil, 8, nil, false,nil,function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate end,function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate = value E:StaticPopup_Show('CONFIG_RL') end, function() return not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.circle end) ElvUI_EltreumUI.Options.args.map.args.eta = ACH:Group(L["Time to Arrive"], nil, 2, "tab", nil, nil, nil, not E.Retail) ElvUI_EltreumUI.Options.args.map.args.eta.args.description1 = ACH:Description(L["Add a time to arrive below the waypoint"], 1, nil, 'Interface\\AddOns\\ElvUI_EltreumUI\\Media\\Textures\\EltreumHeader', nil, 3240, 1, "full") ElvUI_EltreumUI.Options.args.map.args.eta.args.description2 = ACH:Description(L["The time will be calculated based on player speed and distance"], 2, nil, nil, nil, nil, nil, "full") @@ -1059,7 +1060,7 @@ function ElvUI_EltreumUI:Configtable() ElvUI_EltreumUI.Options.args.map.args.cardinal.args.enable = ACH:Toggle(L["Enable Cardinal Directions"], L["Add North, East, South, West to Minimap"], 2, nil, false,'full',function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable end,function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable = value ElvUI_EltreumUI:MinimapCardinalDirections() end) ElvUI_EltreumUI.Options.args.map.args.cardinal.args.cardinaloffset = ACH:Range(L["Cardinal Text Offset"], nil, 3, { min = -100, max = 100, step = 1 }, 'full', function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset end, function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset = value ElvUI_EltreumUI:MinimapCardinalDirections() end, function() return not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable end) ElvUI_EltreumUI.Options.args.map.args.cardinal.args.description2 = ACH:Description(" ", 4, nil, nil, nil, nil, nil, "full") - ElvUI_EltreumUI.Options.args.map.args.cardinal.args.fontsize = ACH:Range(L["Font Size"], nil, 5, { min = 4, max = 64, step = 1 }, 'full', function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize end, function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize = value ElvUI_EltreumUI:MinimapCardinalDirections() end, function() return GetCVar("rotateMinimap") == "1" or not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable end, function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate end) + ElvUI_EltreumUI.Options.args.map.args.cardinal.args.fontsize = ACH:Range(L["Font Size"], nil, 5, { min = 4, max = 64, step = 1 }, 'full', function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize end, function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize = value ElvUI_EltreumUI:MinimapCardinalDirections() end, function() return GetCVar("rotateMinimap") == "1" or not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable end) ElvUI_EltreumUI.Options.args.map.args.cardinal.args.description3 = ACH:Description(" ", 6, nil, nil, nil, nil, nil, "full") ElvUI_EltreumUI.Options.args.map.args.cardinal.args.classcolor = ACH:Toggle(L["Use Class Colors"], nil, 7, nil, false,nil,function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.classcolor end,function(_, value) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.classcolor = value ElvUI_EltreumUI:MinimapCardinalDirections() end, function() return not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable end) ElvUI_EltreumUI.Options.args.map.args.cardinal.args.customcolor = ACH:Color(L["Custom Color"], nil, 8, false, nil, function() return E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r, E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g, E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b, 1 end, function(_, r, g, b) E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r, E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g, E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b = r, g, b ElvUI_EltreumUI:MinimapCardinalDirections() end, function() return not E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable or E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.classcolor end) diff --git a/ElvUI_EltreumUI/Modules/Misc/Maps.lua b/ElvUI_EltreumUI/Modules/Misc/Maps.lua index 32c4eeb38..2a44ce32f 100644 --- a/ElvUI_EltreumUI/Modules/Misc/Maps.lua +++ b/ElvUI_EltreumUI/Modules/Misc/Maps.lua @@ -444,11 +444,18 @@ local ONUPDATE_INTERVAL2 = 0.01 --smooth for 60fps local Cardinals = CreateFrame("FRAME", "Eltruism Cardinal Directions") Cardinals:SetParent(Minimap) function ElvUI_EltreumUI:MinimapCardinalDirections() - if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate then - if E.Retail then - Enum.EditModeMinimapSetting.RotateMinimap = 1 + if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.circle then + if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate then + if E.Retail then + Enum.EditModeMinimapSetting.RotateMinimap = 1 + end + SetCVar("rotateMinimap",1) + else + if E.Retail then + Enum.EditModeMinimapSetting.RotateMinimap = 0 + end + SetCVar("rotateMinimap",0) end - SetCVar("rotateMinimap",1) if Minimap.backdrop then Minimap.backdrop:Hide() @@ -471,7 +478,7 @@ function ElvUI_EltreumUI:MinimapCardinalDirections() return 'ROUND' end - if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable then + if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable and E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.rotate then if not Minimap.EltruismRotate then Minimap.EltruismRotate = Minimap:CreateTexture() Minimap.EltruismRotate:SetTexture("Interface\\AddOns\\ElvUI_EltreumUI\\Media\\Textures\\cardinals.tga") @@ -528,6 +535,47 @@ function ElvUI_EltreumUI:MinimapCardinalDirections() end Cardinals:SetScript("OnUpdate",nil) onupdatesetup = false + + if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.enable then + if not Cardinals.N then + Cardinals.N = Cardinals:CreateFontString("EltruismNorth", "ARTWORK", "GameFontNormal") + end + Cardinals.N:SetText("N") + if not Cardinals.E then + Cardinals.E = Cardinals:CreateFontString("EltruismEast", "ARTWORK", "GameFontNormal") + end + Cardinals.E:SetText("E") + if not Cardinals.S then + Cardinals.S = Cardinals:CreateFontString("EltruismSouth", "ARTWORK", "GameFontNormal") + end + Cardinals.S:SetText("S") + if not Cardinals.W then + Cardinals.W = Cardinals:CreateFontString("EltruismWest", "ARTWORK", "GameFontNormal") + end + Cardinals.W:SetText("W") + + Cardinals.N:SetPoint("BOTTOM", Minimap, "TOP", 0, -E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset) + Cardinals.E:SetPoint("LEFT", Minimap, "RIGHT", -E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset, 0) + Cardinals.S:SetPoint("TOP", Minimap, "BOTTOM", 0, E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset) + Cardinals.W:SetPoint("RIGHT", Minimap, "LEFT", E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.offset, 0) + + Cardinals.N:SetFont(E.LSM:Fetch("font", E.db.general.font), E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize, ElvUI_EltreumUI:FontFlag(E.db.general.fontStyle)) + Cardinals.E:SetFont(E.LSM:Fetch("font", E.db.general.font), E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize, ElvUI_EltreumUI:FontFlag(E.db.general.fontStyle)) + Cardinals.S:SetFont(E.LSM:Fetch("font", E.db.general.font), E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize, ElvUI_EltreumUI:FontFlag(E.db.general.fontStyle)) + Cardinals.W:SetFont(E.LSM:Fetch("font", E.db.general.font), E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.fontsize, ElvUI_EltreumUI:FontFlag(E.db.general.fontStyle)) + + if E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.classcolor then + Cardinals.N:SetTextColor(valuecolors.r,valuecolors.g,valuecolors.b) + Cardinals.E:SetTextColor(valuecolors.r,valuecolors.g,valuecolors.b) + Cardinals.S:SetTextColor(valuecolors.r,valuecolors.g,valuecolors.b) + Cardinals.W:SetTextColor(valuecolors.r,valuecolors.g,valuecolors.b) + else + Cardinals.N:SetTextColor(E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b) + Cardinals.E:SetTextColor(E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b) + Cardinals.S:SetTextColor(E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b) + Cardinals.W:SetTextColor(E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.r,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.g,E.db.ElvUI_EltreumUI.otherstuff.minimapcardinaldirections.colors.b) + end + end end else if E.Retail then diff --git a/ElvUI_EltreumUI/Settings/Profile.lua b/ElvUI_EltreumUI/Settings/Profile.lua index 599e522db..8d1c404f7 100644 --- a/ElvUI_EltreumUI/Settings/Profile.lua +++ b/ElvUI_EltreumUI/Settings/Profile.lua @@ -1714,6 +1714,7 @@ P.ElvUI_EltreumUI = { offset = 23, fontsize = 12, rotate = false, + circle = false, }, archeology = { archeologyfontsize = 12,