diff --git a/api/config.lua b/api/config.lua index 2b959f7b..21a1cf6d 100644 --- a/api/config.lua +++ b/api/config.lua @@ -66,6 +66,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("appearance", "bags", "borderlimit", "1") pfUI:UpdateConfig("appearance", "bags", "borderonlygear", "0") pfUI:UpdateConfig("appearance", "minimap", "mouseoverzone", "0") + pfUI:UpdateConfig("appearance", "minimap", "coordsloc", "bottomleft") pfUI:UpdateConfig("loot", nil, "autoresize", "1") pfUI:UpdateConfig("loot", nil, "autopickup", "1") diff --git a/env/translations_deDE.lua b/env/translations_deDE.lua index dcd44c8c..85364da5 100644 --- a/env/translations_deDE.lua +++ b/env/translations_deDE.lua @@ -24,6 +24,8 @@ pfUI_translation["deDE"] = { ["Bagspace"] = nil, ["Border Color"] = nil, ["Bottom"] = nil, + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = nil, ["Buff Position"] = nil, ["Buff Size"] = nil, @@ -63,6 +65,7 @@ pfUI_translation["deDE"] = { ["Cooldown"] = nil, ["Cooldown Text Font Size"] = nil, ["Cooldown Text Threshold"] = nil, + ["Coordinates Location"] = nil, ["Count"] = nil, ["Create Profile"] = nil, ["Ctrl-Click Action"] = nil, @@ -333,6 +336,8 @@ pfUI_translation["deDE"] = { ["Tooltip"] = nil, ["Tooltip Position"] = nil, ["Top"] = nil, + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = nil, ["Unit Frame Border Size"] = nil, ["Unit Frame Layout"] = nil, diff --git a/env/translations_enUS.lua b/env/translations_enUS.lua index 0f78bf7b..4047d8e0 100644 --- a/env/translations_enUS.lua +++ b/env/translations_enUS.lua @@ -24,6 +24,8 @@ pfUI_translation["enUS"] = { ["Bagspace"] = nil, ["Border Color"] = nil, ["Bottom"] = nil, + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = nil, ["Buff Position"] = nil, ["Buff Size"] = nil, @@ -63,6 +65,7 @@ pfUI_translation["enUS"] = { ["Cooldown"] = nil, ["Cooldown Text Font Size"] = nil, ["Cooldown Text Threshold"] = nil, + ["Coordinates Location"] = nil, ["Count"] = nil, ["Create Profile"] = nil, ["Ctrl-Click Action"] = nil, @@ -333,6 +336,8 @@ pfUI_translation["enUS"] = { ["Tooltip"] = nil, ["Tooltip Position"] = nil, ["Top"] = nil, + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = nil, ["Unit Frame Border Size"] = nil, ["Unit Frame Layout"] = nil, diff --git a/env/translations_esES.lua b/env/translations_esES.lua index 1388384b..8aa8c41d 100644 --- a/env/translations_esES.lua +++ b/env/translations_esES.lua @@ -24,6 +24,8 @@ pfUI_translation["esES"] = { ["Bagspace"] = nil, ["Border Color"] = nil, ["Bottom"] = nil, + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = nil, ["Buff Position"] = nil, ["Buff Size"] = nil, @@ -63,6 +65,7 @@ pfUI_translation["esES"] = { ["Cooldown"] = nil, ["Cooldown Text Font Size"] = nil, ["Cooldown Text Threshold"] = nil, + ["Coordinates Location"] = nil, ["Count"] = nil, ["Create Profile"] = nil, ["Ctrl-Click Action"] = nil, @@ -333,6 +336,8 @@ pfUI_translation["esES"] = { ["Tooltip"] = nil, ["Tooltip Position"] = nil, ["Top"] = nil, + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = nil, ["Unit Frame Border Size"] = nil, ["Unit Frame Layout"] = nil, diff --git a/env/translations_frFR.lua b/env/translations_frFR.lua index 6a089e7c..07dce9ed 100644 --- a/env/translations_frFR.lua +++ b/env/translations_frFR.lua @@ -24,6 +24,8 @@ pfUI_translation["frFR"] = { ["Bagspace"] = "Place libre des sacs", ["Border Color"] = "Couleur de la bordure", ["Bottom"] = "Bas", + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = "Limite des améliorations", ["Buff Position"] = "Position des améliorations", ["Buff Size"] = "Taille des améliorations", @@ -63,6 +65,7 @@ pfUI_translation["frFR"] = { ["Cooldown"] = "Temps de recharge", ["Cooldown Text Font Size"] = "Taille du texte des temps de recharge", ["Cooldown Text Threshold"] = "Seuil du texte des temps de recharge", + ["Coordinates Location"] = nil, ["Count"] = "Compter", ["Create Profile"] = "Créer un profil", ["Ctrl-Click Action"] = "Action du Ctrl+Clic", @@ -333,6 +336,8 @@ pfUI_translation["frFR"] = { ["Tooltip"] = "Infobulle", ["Tooltip Position"] = "Position de l'infobulle", ["Top"] = "Haut", + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = "Echelle de l'interface", ["Unit Frame Border Size"] = "Taille de la bordure des cadres d'unité", ["Unit Frame Layout"] = "Position des cadres d'unité", diff --git a/env/translations_koKR.lua b/env/translations_koKR.lua index 30bdcd5e..90e50d87 100644 --- a/env/translations_koKR.lua +++ b/env/translations_koKR.lua @@ -24,6 +24,8 @@ pfUI_translation["koKR"] = { ["Bagspace"] = "가방 공간", ["Border Color"] = "테두리 색상", ["Bottom"] = "아래", + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = "버프 한도", ["Buff Position"] = "버프 위치", ["Buff Size"] = "버프 크기", @@ -63,6 +65,7 @@ pfUI_translation["koKR"] = { ["Cooldown Color (Seconds)"] = "재사용 대기시간 컬러(초)", ["Cooldown Text Font Size"] = "재사용 대기시간 텍스트 폰트 크기", ["Cooldown Text Threshold"] = "재사용 대기시간 텍스트 임계 값", + ["Coordinates Location"] = nil, ["Count"] = "카운트", ["Create Profile"] = "프로파일 생성", ["Ctrl-Click Action"] = "컨트롤-클릭 액션", @@ -333,6 +336,8 @@ pfUI_translation["koKR"] = { ["Tooltip"] = "툴팁", ["Tooltip Position"] = "툴팁위치", ["Top"] = "상단", + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = "UI-크기", ["Unit Frame Border Size"] = "유닛프레임 테두리 크기", ["Unit Frame Layout"] = "유닛프레임 레이아웃", diff --git a/env/translations_ruRU.lua b/env/translations_ruRU.lua index a0416809..8c7961b7 100644 --- a/env/translations_ruRU.lua +++ b/env/translations_ruRU.lua @@ -24,6 +24,8 @@ pfUI_translation["ruRU"] = { ["Bagspace"] = "Место в сумках", ["Border Color"] = "Цвет бордюра", ["Bottom"] = "Снизу", + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = "Предел баффов", ["Buff Position"] = "Расположение баффов", ["Buff Size"] = "Размер баффов", @@ -63,6 +65,7 @@ pfUI_translation["ruRU"] = { ["Cooldown Text Font Size"] = "Размер шрифта текста времени восстановления", ["Cooldown Text Threshold"] = "Порог текста восстановления", ["Cooldown"] = "Восстановление", + ["Coordinates Location"] = nil, ["Count"] = "Счет", ["Create Profile"] = "Создать профиль", ["Ctrl-Click Action"] = "Действие при Ctrl+нажатие", @@ -333,6 +336,8 @@ pfUI_translation["ruRU"] = { ["Tooltip Position"] = "Расположение подсказки", ["Tooltip"] = "Подсказка", ["Top"] = "Сверху", + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = "Масштаб UI", ["Unit Frame Border Size"] = "Размер бордюра окна юнита", ["Unit Frame Layout"] = "Макет окна юнита", diff --git a/env/translations_zhCN.lua b/env/translations_zhCN.lua index ce1ab195..b20d84e2 100644 --- a/env/translations_zhCN.lua +++ b/env/translations_zhCN.lua @@ -24,6 +24,8 @@ pfUI_translation["zhCN"] = { ["Bagspace"] = "背包空间", ["Border Color"] = "边框颜色", ["Bottom"] = "底部", + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = "Buff总数量", ["Buff Position"] = "Buff显示的位置", ["Buff Size"] = "Buff图标大小", @@ -63,6 +65,7 @@ pfUI_translation["zhCN"] = { ["Cooldown Text Font Size"] = "技能冷却时间文字大小", ["Cooldown Text Threshold"] = "技能冷却时间文字临界值", ["Cooldown"] = "冷却时间", + ["Coordinates Location"] = nil, ["Count"] = "计数器", ["Create Profile"] = "新建配置", ["Ctrl-Click Action"] = "CTRL点击操作", @@ -333,6 +336,8 @@ pfUI_translation["zhCN"] = { ["Tooltip Position"] = "鼠标提示框位置", ["Tooltip"] = "鼠标提示框", ["Top"] = "顶部", + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = "UI缩放比例", ["Unit Frame Border Size"] = "头像边框大小", ["Unit Frame Layout"] = "头像框架样式", diff --git a/env/translations_zhTW.lua b/env/translations_zhTW.lua index c40eb38e..c88f3cd0 100644 --- a/env/translations_zhTW.lua +++ b/env/translations_zhTW.lua @@ -24,6 +24,8 @@ pfUI_translation["zhTW"] = { ["Bagspace"] = "背包空間", ["Border Color"] = "邊框顏色", ["Bottom"] = "底部", + ["Bottom Left"] = nil, + ["Bottom Right"] = nil, ["Buff Limit"] = "Buff總數量", ["Buff Position"] = "Buff顯示的位置", ["Buff Size"] = "Buff圖示大小", @@ -63,6 +65,7 @@ pfUI_translation["zhTW"] = { ["Cooldown Text Font Size"] = "技能冷卻時間文字大小", ["Cooldown Text Threshold"] = "技能冷卻時間文字臨界值", ["Cooldown"] = "冷卻時間", + ["Coordinates Location"] = nil, ["Count"] = "計數器", ["Create Profile"] = "新建配置", ["Ctrl-Click Action"] = "CTRL點擊操作", @@ -333,6 +336,8 @@ pfUI_translation["zhTW"] = { ["Tooltip Position"] = "滑鼠提示框位置", ["Tooltip"] = "滑鼠提示框", ["Top"] = "頂部", + ["Top Left"] = nil, + ["Top Right"] = nil, ["UI-Scale"] = "UI縮放比例", ["Unit Frame Border Size"] = "頭像邊框大小", ["Unit Frame Layout"] = "頭像框架樣式", diff --git a/modules/gui.lua b/modules/gui.lua index b3c7a8d5..8b8eea9c 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -470,6 +470,14 @@ pfUI:RegisterModule("gui", function () "elysium:" .. T["Elysium Based Core"], } + pfUI.gui.dropdowns.minimap_cords_position = { + "topleft:" .. T["Top Left"], + "topright:" .. T["Top Right"], + "bottomleft:" .. T["Bottom Left"], + "bottomright:" .. T["Bottom Right"], + "off:" .. T["Disabled"] + } + pfUI.gui.dropdowns.num_actionbar_buttons = BarLayoutOptions(NUM_ACTIONBAR_BUTTONS) pfUI.gui.dropdowns.num_shapeshift_slots = BarLayoutOptions(NUM_SHAPESHIFT_SLOTS) pfUI.gui.dropdowns.num_pet_action_slots = BarLayoutOptions(NUM_PET_ACTION_SLOTS) @@ -1127,6 +1135,7 @@ pfUI:RegisterModule("gui", function () pfUI.gui.tabs.minimap.tabs.general:SetScript("OnShow", function() if not this.setup then CreateConfig(this, T["Enable Zone Text On Minimap Mouseover"], C.appearance.minimap, "mouseoverzone", "checkbox") + CreateConfig(this, T["Coordinates Location"], C.appearance.minimap, "coordsloc", "dropdown", pfUI.gui.dropdowns.minimap_cords_position) CreateConfig(this, T["Disable Minimap Buffs"], C.global, "hidebuff", "checkbox") CreateConfig(this, T["Disable Minimap Weapon Buffs"], C.global, "hidewbuff", "checkbox") CreateConfig(this, T["Show PvP Icon"], C.unitframes.player, "showPVPMinimap", "checkbox") diff --git a/modules/minimap.lua b/modules/minimap.lua index bf83cd56..9d31d92e 100644 --- a/modules/minimap.lua +++ b/modules/minimap.lua @@ -84,9 +84,19 @@ pfUI:RegisterModule("minimap", function () MiniMapTrackingFrame:SetFrameStrata("LOW") - -- Create coordinates text frame in bottom left corner of minimap + -- Create coordinates text frame with location configurable pfUI.minimapCoordinates = CreateFrame("Frame", "pfMinimapCoord", pfUI.minimap) - pfUI.minimapCoordinates:SetPoint("BOTTOMLEFT", 3, 3) + + if C.appearance.minimap.coordsloc == "topleft" then + pfUI.minimapCoordinates:SetPoint("TOPLEFT", 3, -3) + elseif C.appearance.minimap.coordsloc == "topright" then + pfUI.minimapCoordinates:SetPoint("TOPRIGHT", -3, -3) + elseif C.appearance.minimap.coordsloc == "bottomright" then + pfUI.minimapCoordinates:SetPoint("BOTTOMRIGHT", -3, 3) + else + pfUI.minimapCoordinates:SetPoint("BOTTOMLEFT", 3, 3) + end + pfUI.minimapCoordinates:SetHeight(C.global.font_size) pfUI.minimapCoordinates:SetWidth(Minimap:GetWidth()) pfUI.minimapCoordinates:SetFrameStrata("BACKGROUND") @@ -94,7 +104,13 @@ pfUI:RegisterModule("minimap", function () pfUI.minimapCoordinates.text:SetFont(pfUI.font_default, C.global.font_size, "OUTLINE") pfUI.minimapCoordinates.text:SetTextColor(1,1,1,1) pfUI.minimapCoordinates.text:SetAllPoints(pfUI.minimapCoordinates) - pfUI.minimapCoordinates.text:SetJustifyH("LEFT") + + if C.appearance.minimap.coordsloc == "topright" or C.appearance.minimap.coordsloc == "bottomright" then + pfUI.minimapCoordinates.text:SetJustifyH("RIGHT") + else + pfUI.minimapCoordinates.text:SetJustifyH("LEFT") + end + pfUI.minimapCoordinates:Hide() -- Create zone text frame in top center of minimap @@ -113,13 +129,15 @@ pfUI:RegisterModule("minimap", function () -- Update and toggle showing of coordinates and zone text on mouse enter/leave Minimap:SetScript("OnEnter", function() SetMapToCurrentZone() - local posX, posY = GetPlayerMapPosition("player") - if posX ~= 0 and posY ~= 0 then - pfUI.minimapCoordinates.text:SetText(round(posX * 100, 1) .. ", " .. round(posY * 100, 1)) - else - pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A") + if C.appearance.minimap.coordsloc ~= "off" then + local posX, posY = GetPlayerMapPosition("player") + if posX ~= 0 and posY ~= 0 then + pfUI.minimapCoordinates.text:SetText(round(posX * 100, 1) .. ", " .. round(posY * 100, 1)) + else + pfUI.minimapCoordinates.text:SetText("|cffffaaaaN/A") + end + pfUI.minimapCoordinates:Show() end - pfUI.minimapCoordinates:Show() if C.appearance.minimap.mouseoverzone == "1" then local pvp, _, arena = GetZonePVPInfo()