From ed8bdf11184862a82d0e43bd3bb210c22f34e890 Mon Sep 17 00:00:00 2001 From: Anthony Narkevicius Date: Wed, 11 Jan 2023 12:58:30 -0800 Subject: [PATCH] Give the map markers an option for size (#25) * add missing Locale entries * add size option * link option to icon size * add icon size option to menu * shorten option name * update to match naming * map marker translations * map marker translations * map marker translations * map marker translations * map marker translations * map makers translations * map markers translations * map markers translations * remove spacer originally I added the space because the previous option was too long and had ... at the end of the name, but now that its shorter it looks odd on its own line --- ElvUI/Modules/Maps/MapMarkers.lua | 4 ++-- ElvUI/Settings/Profile.lua | 3 ++- ElvUI_OptionsUI/Locales/deDE.lua | 7 ++++++- ElvUI_OptionsUI/Locales/enUS.lua | 7 ++++++- ElvUI_OptionsUI/Locales/esMX.lua | 7 ++++++- ElvUI_OptionsUI/Locales/frFR.lua | 7 ++++++- ElvUI_OptionsUI/Locales/koKR.lua | 7 ++++++- ElvUI_OptionsUI/Locales/ptBR.lua | 7 ++++++- ElvUI_OptionsUI/Locales/ruRU.lua | 7 ++++++- ElvUI_OptionsUI/Locales/zhCN.lua | 7 ++++++- ElvUI_OptionsUI/Locales/zhTW.lua | 7 ++++++- ElvUI_OptionsUI/Maps.lua | 14 ++++++++++++-- 12 files changed, 70 insertions(+), 14 deletions(-) diff --git a/ElvUI/Modules/Maps/MapMarkers.lua b/ElvUI/Modules/Maps/MapMarkers.lua index 185efe4..1fb6ead 100644 --- a/ElvUI/Modules/Maps/MapMarkers.lua +++ b/ElvUI/Modules/Maps/MapMarkers.lua @@ -87,8 +87,8 @@ function MM:CreateMark(mapid,IsSendedMark,x,y) marker.Texture:SetAllPoints(); marker.Texture:SetTexCoord(unpack(coords)) marker:SetPoint("CENTER", WorldMapDetailFrame, "TOPLEFT", (x / 100) * WorldMapDetailFrame:GetWidth(), (-y / 100) * WorldMapDetailFrame:GetHeight()); - marker:SetWidth(31); - marker:SetHeight(31); + marker:SetWidth(E.db.general.mapMarkers.iconSize); + marker:SetHeight(E.db.general.mapMarkers.iconSize); marker:SetFrameStrata("DIALOG"); marker:EnableMouse(true); marker:HookScript("OnEnter", function(self) diff --git a/ElvUI/Settings/Profile.lua b/ElvUI/Settings/Profile.lua index 4a85cb7..7c16fdc 100644 --- a/ElvUI/Settings/Profile.lua +++ b/ElvUI/Settings/Profile.lua @@ -87,6 +87,7 @@ P.general = { mapMarkers = { enable = true, showRaidMarkers = true, + iconSize = 31, }, threat = { enable = true, @@ -4346,4 +4347,4 @@ P.actionbar = { alpha = 1, visibility = "[vehicleui] hide;show" } -} \ No newline at end of file +} diff --git a/ElvUI_OptionsUI/Locales/deDE.lua b/ElvUI_OptionsUI/Locales/deDE.lua index 4b14a35..c7d50f2 100644 --- a/ElvUI_OptionsUI/Locales/deDE.lua +++ b/ElvUI_OptionsUI/Locales/deDE.lua @@ -1391,4 +1391,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Namensschilder stapeln" L["WHISPER"] = "Flüstern" L["WORLD_MAP"] = "Weltkarte" L["XPBAR_LABEL"] = "EP-Balken" -L["YELL"] = "Schreien" \ No newline at end of file +L["YELL"] = "Schreien" +L["Icon Size"] = "Symbolgröße" +L["Set the size of the map markers"] = "Legen Sie die Größe der Kartenmarkierungen fest" +L["Receive from Raid Members"] = "Von Raid-Mitgliedern erhalten" +L["Allows Raid Members to send you Map Markers"] = "Ermöglicht Raid-Mitgliedern, dir Kartenmarkierungen zu senden" +L["MAP_MARKER_DISCRIPTION"] = "Ermöglicht das Erstellen von Kartenmarkierungen durch Klicken mit der mittleren Maustaste (Maus3) auf die Weltkarte.\nMarkierungen werden automatisch mit Schlachtzugsmitgliedern geteilt." diff --git a/ElvUI_OptionsUI/Locales/enUS.lua b/ElvUI_OptionsUI/Locales/enUS.lua index af178e9..82810cd 100644 --- a/ElvUI_OptionsUI/Locales/enUS.lua +++ b/ElvUI_OptionsUI/Locales/enUS.lua @@ -1390,4 +1390,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Stacking Nameplates" L["WHISPER"] = "Whisper" L["WORLD_MAP"] = "Map" L["XPBAR_LABEL"] = "XP Bar" -L["YELL"] = "Yell" \ No newline at end of file +L["YELL"] = "Yell" +L["Icon Size"] = true +L["Set the size of the map markers"] = true +L["Receive from Raid Members"] = true +L["Allows Raid Members to send you Map Markers"] = true +L["MAP_MARKER_DISCRIPTION"] = "Allows Map Markers to be created by middle clicking (Mouse3) on the world map.\nMarkers are automatically shared with raid members." diff --git a/ElvUI_OptionsUI/Locales/esMX.lua b/ElvUI_OptionsUI/Locales/esMX.lua index 59ab641..970d160 100644 --- a/ElvUI_OptionsUI/Locales/esMX.lua +++ b/ElvUI_OptionsUI/Locales/esMX.lua @@ -1385,4 +1385,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Apilar placas de nombre" L["WHISPER"] = "Susurrar" L["WORLD_MAP"] = "Mapa" L["XPBAR_LABEL"] = "Barra de experiencia" -L["YELL"] = "Gritar" \ No newline at end of file +L["YELL"] = "Gritar" +L["Icon Size"] = "Tamaño de ícono" +L["Set the size of the map markers"] = "Establecer el tamaño de los marcadores del mapa" +L["Receive from Raid Members"] = "Recibir de los miembros de la incursión" +L["Allows Raid Members to send you Map Markers"] = "Permite a los miembros de la incursión enviarte marcadores de mapa" +L["MAP_MARKER_DISCRIPTION"] = "Permite crear marcadores de mapa haciendo clic con el botón central (Mouse3) en el mapa mundial.\nLos marcadores se comparten automáticamente con los miembros de la redada." diff --git a/ElvUI_OptionsUI/Locales/frFR.lua b/ElvUI_OptionsUI/Locales/frFR.lua index 7f75c5f..68bd3c7 100644 --- a/ElvUI_OptionsUI/Locales/frFR.lua +++ b/ElvUI_OptionsUI/Locales/frFR.lua @@ -1385,4 +1385,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Barres d’info empilées" L["WHISPER"] = "Chuchoter" L["WORLD_MAP"] = "Carte" L["XPBAR_LABEL"] = "Barre d'expérience" -L["YELL"] = "Crier" \ No newline at end of file +L["YELL"] = "Crier" +L["Icon Size"] = "Taille de l'icône" +L["Set the size of the map markers"] = "Définir la taille des marqueurs de carte" +L["Receive from Raid Members"] = "Recevez des membres du raid" +L["Allows Raid Members to send you Map Markers"] = "Permet aux membres du raid de vous envoyer des marqueurs de carte" +L["MAP_MARKER_DISCRIPTION"] = "Permet de créer des marqueurs de carte en cliquant avec le bouton central (Souris3) sur la carte du monde.\nLes marqueurs sont automatiquement partagés avec les membres du raid." diff --git a/ElvUI_OptionsUI/Locales/koKR.lua b/ElvUI_OptionsUI/Locales/koKR.lua index a2419ee..5fd62f7 100644 --- a/ElvUI_OptionsUI/Locales/koKR.lua +++ b/ElvUI_OptionsUI/Locales/koKR.lua @@ -1426,4 +1426,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "이름표 상하 정렬" L["WHISPER"] = "귓속말" L["WORLD_MAP"] = "지도" L["XPBAR_LABEL"] = "경험치바" -L["YELL"] = "외침" \ No newline at end of file +L["YELL"] = "외침" +L["Icon Size"] = "아이콘 크기" +L["Set the size of the map markers"] = "맵 마커의 크기 설정" +L["Receive from Raid Members"] = "레이드 멤버로부터 받기" +L["Allows Raid Members to send you Map Markers"] = "레이드 멤버가 맵 마커를 보낼 수 있습니다." +L["MAP_MARKER_DISCRIPTION"] = "세계 지도에서 마우스 가운데 버튼(Mouse3)을 클릭하여 지도 마커를 생성할 수 있습니다.\n마커는 자동으로 공격대원과 공유됩니다." diff --git a/ElvUI_OptionsUI/Locales/ptBR.lua b/ElvUI_OptionsUI/Locales/ptBR.lua index 23ed4c0..3576b22 100644 --- a/ElvUI_OptionsUI/Locales/ptBR.lua +++ b/ElvUI_OptionsUI/Locales/ptBR.lua @@ -1385,4 +1385,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Placas de identificação empilhadas" L["WHISPER"] = "Sussurrar" L["WORLD_MAP"] = "Mapa" L["XPBAR_LABEL"] = "Barra de EXP" -L["YELL"] = "Gritar" \ No newline at end of file +L["YELL"] = "Gritar" +L["Icon Size"] = "Tamanho do ícone" +L["Set the size of the map markers"] = "Defina o tamanho dos marcadores do mapa" +L["Receive from Raid Members"] = "Receba dos membros do Raid" +L["Allows Raid Members to send you Map Markers"] = "Permite que os membros do Raid enviem marcadores de mapa para você" +L["MAP_MARKER_DISCRIPTION"] = "Permite que marcadores de mapa sejam criados clicando com o botão do meio (Mouse3) no mapa-múndi.\nMarcadores são automaticamente compartilhados com os membros do raide." diff --git a/ElvUI_OptionsUI/Locales/ruRU.lua b/ElvUI_OptionsUI/Locales/ruRU.lua index 33d714b..04cfff3 100644 --- a/ElvUI_OptionsUI/Locales/ruRU.lua +++ b/ElvUI_OptionsUI/Locales/ruRU.lua @@ -1390,4 +1390,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "Друг над другом" L["WHISPER"] = "Шепот" L["WORLD_MAP"] = "Карта" L["XPBAR_LABEL"] = "Индикатор опыта" -L["YELL"] = "Крик" \ No newline at end of file +L["YELL"] = "Крик" +L["Icon Size"] = "Размер значка" +L["Set the size of the map markers"] = "Установить размер маркеров карты" +L["Receive from Raid Members"] = "Получить от участников рейда" +L["Allows Raid Members to send you Map Markers"] = "Позволяет участникам рейда отправлять вам маркеры карты" +L["MAP_MARKER_DISCRIPTION"] = "Позволяет создавать маркеры карты, щелкнув средней кнопкой мыши (Mouse3) на карте мира.\nМаркеры автоматически передаются участникам рейда." diff --git a/ElvUI_OptionsUI/Locales/zhCN.lua b/ElvUI_OptionsUI/Locales/zhCN.lua index fad248b..a4a832d 100644 --- a/ElvUI_OptionsUI/Locales/zhCN.lua +++ b/ElvUI_OptionsUI/Locales/zhCN.lua @@ -1388,4 +1388,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "堆叠姓名板" L["WHISPER"] = "悄悄话" L["WORLD_MAP"] = "地图" L["XPBAR_LABEL"] = "经验槽" -L["YELL"] = "大喊" \ No newline at end of file +L["YELL"] = "大喊" +L["Icon Size"] = "图标大小" +L["Set the size of the map markers"] = "设置地图标记的大小" +L["Receive from Raid Members"] = "从 Raid 成员处接收" +L["Allows Raid Members to send you Map Markers"] = "允许 Raid 成员向您发送地图标记" +L["MAP_MARKER_DISCRIPTION"] = "允许通过在世界地图上单击鼠标中键 (Mouse3) 创建地图标记。\n标记会自动与 raid 成员共享。" diff --git a/ElvUI_OptionsUI/Locales/zhTW.lua b/ElvUI_OptionsUI/Locales/zhTW.lua index 01eed5b..e4cc3e7 100644 --- a/ElvUI_OptionsUI/Locales/zhTW.lua +++ b/ElvUI_OptionsUI/Locales/zhTW.lua @@ -1390,4 +1390,9 @@ L["UNIT_NAMEPLATES_TYPE_2"] = "堆疊名條" L["WHISPER"] = "悄悄話" L["WORLD_MAP"] = "地圖" L["XPBAR_LABEL"] = "經驗條" -L["YELL"] = "大喊" \ No newline at end of file +L["YELL"] = "大喊" +L["Icon Size"] = "圖標大小" +L["Set the size of the map markers"] = "設置地圖標記的大小" +L["Receive from Raid Members"] = "從 Raid 成員處接收" +L["Allows Raid Members to send you Map Markers"] = "允許 Raid 成員向您發送地圖標記" +L["MAP_MARKER_DISCRIPTION"] = "允許通過在世界地圖上單擊鼠標中鍵 (Mouse3) 創建地圖標記。 \n標記會自動與 raid 成員共享。" diff --git a/ElvUI_OptionsUI/Maps.lua b/ElvUI_OptionsUI/Maps.lua index d6717fd..dad702b 100644 --- a/ElvUI_OptionsUI/Maps.lua +++ b/ElvUI_OptionsUI/Maps.lua @@ -144,12 +144,22 @@ E.Options.args.maps = { showRaidMarkers = { order = 2, type = "toggle", - name = L["Allow Map Markers from Raid Members"], + name = L["Receive from Raid Members"], desc = L["Allows Raid Members to send you Map Markers"], get = function(info) return E.db.general.mapMarkers[info[#info]] end, set = function(info, value) E.db.general.mapMarkers[info[#info]] = value E:StaticPopup_Show("PRIVATE_RL") end, disabled = function() return not E.db.general.mapMarkers.enable end, }, + iconSize = { + order = 3, + type = "range", + name = L["Icon Size"], + desc = L["Set the size of the map markers"], + min = 15, max = 50, step = 1, + get = function(info) return E.db.general.mapMarkers[info[#info]] end, + set = function(info, value) E.db.general.mapMarkers[info[#info]] = value E:StaticPopup_Show("PRIVATE_RL") end, + disabled = function() return not E.db.general.mapMarkers.enable end, + }, } } } @@ -609,4 +619,4 @@ E.Options.args.maps = { } } } -} \ No newline at end of file +}