Quantcast

Added an option to change the scale/opacity of the waypoint arrow

James Whitehead II [05-29-08 - 17:58]
Added an option to change the scale/opacity of the waypoint arrow
Filename
Localization.enUS.lua
TomTom.lua
TomTom_Config.lua
TomTom_CrazyArrow.lua
diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index c44749f..95d8740 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -5,8 +5,11 @@ TomTomLocals = {
 	["%s yards away"] = "%s yards away",
 	["Accept waypoints from guild and party members"] = "Accept waypoints from guild and party members",
 	["Allow control-right clicking on map to create new waypoint"] = "Allow control-right clicking on map to create new waypoint",
+	["Alpha"] = "Alpha",
 	["Are you sure you would like to remove ALL TomTom waypoints?"] = "Are you sure you would like to remove ALL TomTom waypoints?",
 	["Arrow colors"] = "Arrow colors",
+	["Arrow display"] = "Arrow display",
+	["Ask for confirmation on \"Remove All\""] = "Ask for confirmation on \"Remove All\"",
 	["Automatically set waypoint arrow"] = "Automatically set waypoint arrow",
 	["Background color"] = "Background color",
 	["Bad color"] = "Bad color",
@@ -31,6 +34,7 @@ TomTomLocals = {
 	["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 a waypoint allowing you to clear or remove waypoints"] = "Enables a menu when right-clicking on a waypoint allowing you to clear or remove waypoints",
 	["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",
@@ -57,6 +61,7 @@ TomTomLocals = {
 	["Save profile for TomTom waypoints"] = "Save profile for TomTom waypoints",
 	["Save this waypoint between sessions"] = "Save this waypoint between sessions",
 	["Saved profile for TomTom options"] = "Saved profile for TomTom options",
+	["Scale"] = "Scale",
 	["Send to battleground"] = "Send to battleground",
 	["Send to guild"] = "Send to guild",
 	["Send to party"] = "Send to party",
@@ -71,7 +76,11 @@ TomTomLocals = {
 	["The display of the coordinate block can be customized by changing the options below."] = "The display of the coordinate block can be customized by changing the options below.",
 	["The floating waypoint arrow can change color depending on whether or nor you are facing your destination.  By default it will display green when you are facing it directly, and red when you are facing away from it.  These colors can be changed in this section.  Setting these options to the same color will cause the arrow to not change color at all"] = "The floating waypoint arrow can change color depending on whether or nor you are facing your destination.  By default it will display green when you are facing it directly, and red when you are facing away from it.  These colors can be changed in this section.  Setting these options to the same color will cause the arrow to not change color at all",
 	["There were no waypoints to remove in %s"] = "There were no waypoints to remove in %s",
+	["These options let you customize the size and opacity of the waypoint arrow, making it larger or partially transparent"] = "These options let you customize the size and opacity of the waypoint arrow, making it larger or partially transparent",
 	["This option will not remove any waypoints that are currently set to persist, but only effects new waypoints that get set"] = "This option will not remove any waypoints that are currently set to persist, but only effects new waypoints that get set",
+	["This option will toggle whether or not you are asked to confirm removing all waypoints.  If enabled, a dialog box will appear, requiring you to confirm removing the waypoints"] = "This option will toggle whether or not you are asked to confirm removing all waypoints.  If enabled, a dialog box will appear, requiring you to confirm removing the waypoints",
+	["This setting allows you to change the opacity of the waypoint arrow, making it transparent or opaque"] = "This setting allows you to change the opacity of the waypoint arrow, making it transparent or opaque",
+	["This setting allows you to change the scale of the waypoint arrow, making it larger or smaller"] = "This setting allows you to change the scale of the waypoint arrow, making it larger or smaller",
 	["This setting will control the distance at which the waypoint arrow switches to a downwards arrow, indicating you have arrived at your destination"] = "This setting will control the distance at which the waypoint arrow switches to a downwards arrow, indicating you have arrived at your destination",
 	["TomTom"] = "TomTom",
 	["TomTom Waypoint Arrow"] = "TomTom Waypoint Arrow",
diff --git a/TomTom.lua b/TomTom.lua
index d4ebf23..5bd3bfe 100755
--- a/TomTom.lua
+++ b/TomTom.lua
@@ -79,6 +79,8 @@ function TomTom:ADDON_LOADED(event, addon)
 					showtta = true,
 					autoqueue = true,
 					menu = true,
+					scale = 1.0,
+					alpha = 1.0,
 				},
 				minimap = {
 					enable = true,
diff --git a/TomTom_Config.lua b/TomTom_Config.lua
index 719dc1b..148ee81 100644
--- a/TomTom_Config.lua
+++ b/TomTom_Config.lua
@@ -186,10 +186,37 @@ local function createconfig()
 				min = 0, max = 150, step = 5,
 				arg = "arrow.arrival",
 			},
+			display = {
+				type = "group",
+				name = L["Arrow display"],
+				order = 8,
+				inline = true,
+				args = {
+					help = {
+						type = "description",
+						order = 1,
+						name = L["These options let you customize the size and opacity of the waypoint arrow, making it larger or partially transparent"],
+					},
+					scale = {
+						type = "range",
+						name = L["Scale"],
+						desc = L["This setting allows you to change the scale of the waypoint arrow, making it larger or smaller"],
+						min = 0, max = 3, step = 0.05,
+						arg = "arrow.scale",
+					},
+					alpha = {
+						type = "range",
+						name = L["Alpha"],
+						desc = L["This setting allows you to change the opacity of the waypoint arrow, making it transparent or opaque"],
+						min = 0, max = 1.0, step = 0.05,
+						arg = "arrow.alpha",
+					}
+				}
+			},
 			color = {
 				type = "group",
 				name = L["Arrow colors"],
-				order = 8,
+				order = 9,
 				inline = true,
 				args = {
 					help = {
diff --git a/TomTom_CrazyArrow.lua b/TomTom_CrazyArrow.lua
index db1d2f9..200651f 100644
--- a/TomTom_CrazyArrow.lua
+++ b/TomTom_CrazyArrow.lua
@@ -234,6 +234,11 @@ end
 function TomTom:ShowHideCrazyArrow()
 	if self.profile.arrow.enable then
 		wayframe:Show()
+
+		-- Set the scale and alpha
+		wayframe:SetScale(TomTom.db.profile.arrow.scale)
+		wayframe:SetAlpha(TomTom.db.profile.arrow.alpha)
+
 		if self.profile.arrow.showtta then
 			tta:Show()
 		else