Quantcast

Added an option to disable the right-click menu on the crazy-arrow

James Whitehead II [05-29-08 - 17:36]
Added an option to disable the right-click menu on the crazy-arrow
Filename
Localization.enUS.lua
TomTom.lua
TomTom_Config.lua
TomTom_CrazyArrow.lua
diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index 4465217..c44749f 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -14,6 +14,7 @@ TomTomLocals = {
 	["Block width"] = "Block width",
 	["Border color"] = "Border color",
 	["Clear waypoint distance"] = "Clear waypoint distance",
+	["Clear waypoint from crazy arrow"] = "Clear waypoint from crazy arrow",
 	["Coordinate Block"] = "Coordinate Block",
 	["Coordinates can be displayed as simple XX, YY coordinate, or as more precise XX.XX, YY.YY.  This setting allows you to control that precision"] = "Coordinates can be displayed as simple XX, YY coordinate, or as more precise XX.XX, YY.YY.  This setting allows you to control that precision",
 	["Ctrl+Right Click To Add a Waypoint"] = "Ctrl+Right Click To Add a Waypoint",
@@ -27,8 +28,10 @@ TomTomLocals = {
 	["Enable mouseover tooltips"] = "Enable mouseover tooltips",
 	["Enable showing cursor coordinates"] = "Enable showing cursor coordinates",
 	["Enable showing player coordinates"] = "Enable showing player coordinates",
+	["Enable the right-click contextual menu"] = "Enable the right-click contextual menu",
 	["Enable world map waypoints"] = "Enable world map waypoints",
 	["Enables a floating block that displays your current position in the current zone"] = "Enables a floating block that displays your current position in the current zone",
+	["Enables a menu when right-clicking on the waypoint arrow allowing you to clear or remove waypoints"] = "Enables a menu when right-clicking on the waypoint arrow allowing you to clear or remove waypoints",
 	["Font size"] = "Font size",
 	["Found %d possible matches for zone %s.  Please be more specific"] = "Found %d possible matches for zone %s.  Please be more specific",
 	["Found multiple matches for zone '%s'.  Did you mean: %s"] = "Found multiple matches for zone '%s'.  Did you mean: %s",
diff --git a/TomTom.lua b/TomTom.lua
index f14529a..8e50d09 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -75,6 +75,7 @@ function TomTom:ADDON_LOADED(event, addon)
 					lock = false,
 					showtta = true,
 					autoqueue = true,
+					menu = true,
 				},
 				minimap = {
 					enable = true,
diff --git a/TomTom_Config.lua b/TomTom_Config.lua
index 735793f..19c551c 100644
--- a/TomTom_Config.lua
+++ b/TomTom_Config.lua
@@ -170,6 +170,14 @@ local function createconfig()
 				width = "double",
 				arg = "arrow.showtta",
 			},
+			rightclick = {
+				order = 6,
+				type = "toggle",
+				name = L["Enable the right-click contextual menu"],
+				desc = L["Enables a menu when right-clicking on the waypoint arrow allowing you to clear or remove waypoints"],
+				width = "double",
+				arg = "arrow.menu",
+			},
 			heredistance = {
 				order = 6,
 				type = "range",
diff --git a/TomTom_CrazyArrow.lua b/TomTom_CrazyArrow.lua
index 210237f..59a0380 100644
--- a/TomTom_CrazyArrow.lua
+++ b/TomTom_CrazyArrow.lua
@@ -325,6 +325,8 @@ end

 wayframe:RegisterForClicks("RightButtonUp")
 wayframe:SetScript("OnClick", function(self, button)
-	UIDropDownMenu_Initialize(TomTom.dropdown, init_dropdown)
-	ToggleDropDownMenu(1, nil, TomTom.dropdown, "cursor", 0, 0)
+	if TomTom.db.profile.arrow.menu then
+		UIDropDownMenu_Initialize(TomTom.dropdown, init_dropdown)
+		ToggleDropDownMenu(1, nil, TomTom.dropdown, "cursor", 0, 0)
+	end
 end)