Skip to content

Commit 60aa784

Browse files
AdaptivexAdaptivex
authored andcommitted
1.2.2
Supported Add-ons - TomTom - Added an option to enable/disable TomTom integration in the `Extra Features` config.
1 parent fa28e30 commit 60aa784

14 files changed

Lines changed: 60 additions & 6 deletions

File tree

Code/Setting/Schema.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ local env = select(2, ...)
5151
local Config = env.Config
5252
local L = env.L
5353

54+
local IsAddOnLoaded = C_AddOns.IsAddOnLoaded
55+
5456
local Path = env.WPM:Import("wpm_modules/path")
5557
local Sound = env.WPM:Import("wpm_modules/sound")
5658
local UIFont = env.WPM:Import("wpm_modules/ui-font")
@@ -769,6 +771,20 @@ Setting_Schema.SCHEMA = {
769771
key = "GuidePinAssistantEnabled"
770772
}
771773
}
774+
},
775+
{
776+
widgetName = L["Config - ExtraFeature - TomTomSupport"],
777+
widgetType = Setting_Enum.WidgetType.Container,
778+
showWhen = function() return IsAddOnLoaded("TomTom") end,
779+
780+
children = {
781+
{
782+
widgetName = L["Config - ExtraFeature - TomTomSupport - Enable"],
783+
widgetDescription = Setting_Define.Descriptor{ description = L["Config - ExtraFeature - TomTomSupport - Enable - Description"] },
784+
widgetType = Setting_Enum.WidgetType.CheckButton,
785+
key = "TomTomSupportEnabled"
786+
}
787+
}
772788
}
773789
}
774790
},

Code/SharedUI.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ local UICCommon = env.WPM:Import("wpm_modules/uic-common")
1010

1111
UICCommon.Prompt("WUISharedPrompt")
1212
:id("WUISharedPrompt")
13+
:frameStrata(UIKit.Enum.FrameStrata.FullscreenDialog)
1314
:parent(UIParent)
1415
:anchor(StaticPopup1)
1516
:point(UIKit.Enum.Point.Center)

Code/Support/TomTom.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
local env = select(2, ...)
22
local L = env.L
3+
local Config = env.Config
34

45
local LazyTimer = env.WPM:Import("wpm_modules/lazy-timer")
56
local MapPin = env.WPM:Import("@/MapPin")
@@ -38,6 +39,10 @@ local REPLACE_PROMPT_INFO = {
3839
-- Helpers
3940
--------------------------------
4041

42+
local function isEnabled()
43+
return Config.DBGlobal:GetVariable("TomTomSupportEnabled") == true
44+
end
45+
4146
function Support_TomTom.PlaceWaypointAtSession()
4247
MapPin.NewUserNavigation(TomTomWaypointInfo.name, TomTomWaypointInfo.mapID, TomTomWaypointInfo.x, TomTomWaypointInfo.y, "TomTom_Waypoint")
4348
Support_TomTom.UpdateSuperTrackPinVisibility()
@@ -70,6 +75,8 @@ HandleCrazyArrowTimer:SetAction(function()
7075
end)
7176

7277
local function OnSetCrazyArrow(_, uid, _, title)
78+
if not isEnabled() then return end
79+
7380
lastSetCrazyArrowTime = GetTime()
7481

7582
TomTomWaypointInfo.name = title
@@ -81,6 +88,8 @@ local function OnSetCrazyArrow(_, uid, _, title)
8188
end
8289

8390
local function OnClearCrazyArrow()
91+
if not isEnabled() then return end
92+
8493
if MapPin.IsUserNavigationFlagged("TomTom_Waypoint") then
8594
MapPin.ClearUserNavigation()
8695
end

Locales/deDE.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Auto-Track Pin from L
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Automatically track the pin placed by clicking a map-pin link."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Track Guide Pin"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Enable Waypoint UI navigation for city guide pins placed by guard NPCs."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "Über"
129132
L["Config - About - Contributors"] = "Mitwirkende"

Locales/enUS.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Auto-Track Pin from L
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Automatically track the pin placed by clicking a map-pin link."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Track Guide Pin"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Enable Waypoint UI navigation for city guide pins placed by guard NPCs."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "About"
129132
L["Config - About - Contributors"] = "Contributors"

Locales/esES.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Auto-Track Pin from L
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Automatically track the pin placed by clicking a map-pin link."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Track Guide Pin"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Enable Waypoint UI navigation for city guide pins placed by guard NPCs."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "Acerca de"
129132
L["Config - About - Contributors"] = "Colaboradores"

Locales/frFR.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Suivi automatique d'u
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Suit automatiquement un repère cartographique lorsqu'il est cliqué d'un lien."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Suivi des guides"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Active la navigation pour les repères placés par les gardes PNJs des capitales."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "À propos"
129132
L["Config - About - Contributors"] = "Contributeurs"

Locales/koKR.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "링크에서 자동
120120
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "지도 핀 링크를 클릭하여 배치된 핀을 자동으로 추적합니다."
121121
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "가이드 핀 추적"
122122
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "경비병 NPC가 배치한 도시 가이드 핀에 대해 웨이포인트 UI 탐색을 활성화합니다."
123+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
124+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
125+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
123126
L["Config - About"] = "정보"
124127
L["Config - About - Contributors"] = "제작 참여자"
125128
L["Config - About - Developer"] = "개발자"

Locales/ptBR.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Auto-rastrear marcado
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Rastreia automaticamente um marcador clicando em um link de marcador de mapa."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Rastrear marcador de guia"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Habilita a navegação do Waypoint UI para marcadores de guia colocados no mapa por NPCs guardas."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "Sobre"
129132
L["Config - About - Contributors"] = "Contribuidores"

Locales/ruRU.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin"] = "Автоотслеж
124124
L["Config - ExtraFeature - Pin - AutoTrackChatLinkPin - Description"] = "Автоматически начинать отслеживание метки при клике на ссылку с координатами в чате."
125125
L["Config - ExtraFeature - Pin - GuidePinAssistant"] = "Отслеживание меток городских стражников"
126126
L["Config - ExtraFeature - Pin - GuidePinAssistant - Description"] = "Включить навигацию через интерфейс путевых точек для меток, которые ставят стражники в городах (гиды)."
127+
L["Config - ExtraFeature - TomTomSupport"] = "TomTom"
128+
L["Config - ExtraFeature - TomTomSupport - Enable"] = "Track TomTom Waypoints"
129+
L["Config - ExtraFeature - TomTomSupport - Enable - Description"] = "Enables support for tracking TomTom waypoints with Waypoint UI. You can track a TomTom waypoint by right-clicking on any TomTom waypoint on the world map, and selecting `Set as waypoint arrow` from the context menu."
127130

128131
L["Config - About"] = "О нас"
129132
L["Config - About - Contributors"] = "Участники"

0 commit comments

Comments
 (0)