Quantcast

Rearrange options

Darthpred [09-10-16 - 10:25]
Rearrange options
Filename
ElvUI_SLE/options/minimap/locpanel_c.lua
diff --git a/ElvUI_SLE/options/minimap/locpanel_c.lua b/ElvUI_SLE/options/minimap/locpanel_c.lua
index 04ffff9..af8b575 100644
--- a/ElvUI_SLE/options/minimap/locpanel_c.lua
+++ b/ElvUI_SLE/options/minimap/locpanel_c.lua
@@ -15,42 +15,49 @@ local function configTable()
 				order = 1,
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Toggle() end,
 			},
-			width = {
+			linkcoords = {
+				type = "toggle",
+				name = L["Link Position"],
+				desc = L["Allow pasting of your coordinates in chat editbox via holding shift and clicking on the location name."],
 				order = 2,
-				type = 'range',
-				name = L["Width"],
-				min = 100, max = E.screenwidth/2, step = 1,
-				disabled = function() return not E.db.sle.minimap.locPanel.enable or E.db.sle.minimap.locPanel.autowidth end,
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Resize() end,
+				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+			},
+			template = {
+				order = 3,
+				name = L["Template"],
+				type = "select",
+				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Template() end,
+				values = {
+					["Default"] = DEFAULT,
+					["Transparent"] = L["Transparent"],
+				},
 			},
 			autowidth = {
 				type = "toggle",
 				name = L["Automatic Width"],
 				desc = L["Change width based on the zone name length."],
-				order = 3,
+				order = 4,
+				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Resize() end,
+			},
+			width = {
+				order = 5,
+				type = 'range',
+				name = L["Width"],
+				min = 100, max = E.screenwidth/2, step = 1,
+				disabled = function() return not E.db.sle.minimap.locPanel.enable or E.db.sle.minimap.locPanel.autowidth end,
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Resize() end,
 			},
 			height = {
-				order = 4,
+				order = 6,
 				type = 'range',
 				name = L["Height"],
 				min = 10, max = 50, step = 1,
 				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Resize() end,
 			},
-			template = {
-				order = 5,
-				name = L["Template"],
-				type = "select",
-				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Template() end,
-				values = {
-					["Default"] = DEFAULT,
-					["Transparent"] = L["Transparent"],
-				},
-			},
 			throttle = {
-				order = 6,
+				order = 7,
 				type = 'range',
 				name = L["Update Throttle"],
 				desc = L["The frequency of coordinates and zonetext updates. Check will be done more often with lower values."],
@@ -58,71 +65,108 @@ local function configTable()
 				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
 			},
-			format = {
-				order = 7,
-				name = L["Format"],
-				type = "select",
-				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
-				values = {
-					["%.0f"] = DEFAULT,
-					["%.1f"] = "45.3",
-					["%.2f"] = "45.34",
-				},
-			},
-			zoneText = {
-				type = "toggle",
-				name = L["Full Location"],
+			combathide = {
 				order = 8,
-				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+				type = "toggle",
+				name = L["Hide In Combat"],
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
 			},
-			colorType = {
-				order = 9,
-				name = L["Color Type"],
-				type = "select",
-				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
-				values = {
-					["REACTION"] = L["Reaction"],
-					["DEFAULT"] = DEFAULT,
-					["CUSTOM"] = CUSTOM,
+
+			location = {
+				order = 20,
+				type = "group",
+				name = L["Location"],
+				args = {
+					zoneText = {
+						type = "toggle",
+						name = L["Full Location"],
+						order = 1,
+						disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+						set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+					},
+					colorType = {
+						order = 2,
+						name = L["Color Type"],
+						type = "select",
+						disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+						set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+						values = {
+							["REACTION"] = L["Reaction"],
+							["DEFAULT"] = DEFAULT,
+							["CLASS"] = CLASS,
+							["CUSTOM"] = CUSTOM,
+						},
+					},
+					customColor = {
+						type = 'color',
+						order = 3,
+						name = L["Custom Color"],
+						disabled = function() return not E.db.sle.minimap.locPanel.enable or not E.db.sle.minimap.locPanel.colorType == "CUSTOM" end,
+						get = function(info)
+							local t = E.db.sle.minimap.locPanel[ info[#info] ]
+							local d = P.sle.minimap.locPanel[info[#info]]
+							return t.r, t.g, t.b, d.r, d.g, d.b
+						end,
+						set = function(info, r, g, b)
+							E.db.sle.minimap.locPanel[ info[#info] ] = {}
+							local t = E.db.sle.minimap.locPanel[ info[#info] ]
+							t.r, t.g, t.b = r, g, b
+						end,
+					},
 				},
 			},
-			customColor = {
-				type = 'color',
-				order = 10,
-				name = L["Custom Color"],
-				disabled = function() return not E.db.sle.minimap.locPanel.enable or not E.db.sle.minimap.locPanel.colorType == "CUSTOM" end,
-				get = function(info)
-					local t = E.db.sle.minimap.locPanel[ info[#info] ]
-					local d = P.sle.minimap.locPanel[info[#info]]
-					return t.r, t.g, t.b, d.r, d.g, d.b
-				end,
-				set = function(info, r, g, b)
-					E.db.sle.minimap.locPanel[ info[#info] ] = {}
-					local t = E.db.sle.minimap.locPanel[ info[#info] ]
-					t.r, t.g, t.b = r, g, b
-				end,
-			},
-			linkcoords = {
-				type = "toggle",
-				name = L["Link Position"],
-				desc = L["Allow pasting of your coordinates in chat editbox via holding shift and clicking on the location name."],
-				order = 11,
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
-			},
-			combathide = {
-				order = 12,
-				type = "toggle",
-				name = L["Hide In Combat"],
-				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+			coordinates = {
+				order = 21,
+				type = "group",
+				name = L["Coordinates"],
+				args = {
+					format = {
+						order = 1,
+						name = L["Format"],
+						type = "select",
+						disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+						set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+						values = {
+							["%.0f"] = DEFAULT,
+							["%.1f"] = "45.3",
+							["%.2f"] = "45.34",
+						},
+					},
+					colorType_Coords = {
+						order = 2,
+						name = L["Color Type"],
+						type = "select",
+						disabled = function() return not E.db.sle.minimap.locPanel.enable end,
+						set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; end,
+						values = {
+							["REACTION"] = L["Reaction"],
+							["DEFAULT"] = DEFAULT,
+							["CLASS"] = CLASS,
+							["CUSTOM"] = CUSTOM,
+						},
+					},
+					customColor_Coords = {
+						type = 'color',
+						order = 3,
+						name = L["Custom Color"],
+						disabled = function() return not E.db.sle.minimap.locPanel.enable or not E.db.sle.minimap.locPanel.colorType_Coords == "CUSTOM" end,
+						get = function(info)
+							local t = E.db.sle.minimap.locPanel[ info[#info] ]
+							local d = P.sle.minimap.locPanel[info[#info]]
+							return t.r, t.g, t.b, d.r, d.g, d.b
+						end,
+						set = function(info, r, g, b)
+							E.db.sle.minimap.locPanel[ info[#info] ] = {}
+							local t = E.db.sle.minimap.locPanel[ info[#info] ]
+							t.r, t.g, t.b = r, g, b
+						end,
+					},
+				},
 			},
 			portals = {
-				order = 20,
+				order = 22,
 				type = "group",
 				name = L["Relocation Menu"],
-				guiInline = true,
 				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
 				get = function(info) return E.db.sle.minimap.locPanel.portals[ info[#info] ] end,
 				set = function(info, value) E.db.sle.minimap.locPanel.portals[ info[#info] ] = value; end,
@@ -174,10 +218,9 @@ local function configTable()
 				},
 			},
 			fontGroup = {
-				order = 30,
+				order = 23,
 				type = "group",
 				name = L["Fonts"],
-				guiInline = true,
 				disabled = function() return not E.db.sle.minimap.locPanel.enable end,
 				get = function(info) return E.db.sle.minimap.locPanel[ info[#info] ] end,
 				set = function(info, value) E.db.sle.minimap.locPanel[ info[#info] ] = value; LP:Fonts() end,