Quantcast

Cleanup to new config UI

James Whitehead II [02-16-08 - 22:13]
Cleanup to new config UI
Filename
Config.lua
Localization.enUS.lua
diff --git a/Config.lua b/Config.lua
index 100256d..6ff8f49 100644
--- a/Config.lua
+++ b/Config.lua
@@ -153,50 +153,60 @@ local function getFrameArgs()
 			desc = L["Filters which units are displayed in the frame"],
 			args = {
 				classes = {
-					type = "group",
+					order = 1,
+					type = "multiselect",
 					name = L["Classes"],
+					width = "half",
 					inline = true,
-					args = {
-						WARRIOR = {type = "toggle", name = L["Warrior"],},
-						PRIEST = {type = "toggle", name = L["Priest"],},
-						DRUID = {type = "toggle", name = L["Druid"],},
-						SHAMAN = {type = "toggle", name = L["Shaman"],},
-						PALADIN = {type = "toggle", name = L["Paladin"],},
-						MAGE = {type = "toggle", name = L["Mage"],},
-						ROGUE = {type = "toggle", name = L["Rogue"],},
-						WARLOCK = {type = "toggle", name = L["Warlock"],},
-						HUNTER = {type = "toggle", name = L["Hunter"],},
+					values = {
+						WARRIOR = L["Warrior"],
+						PRIEST = L["Priest"],
+						DRUID = L["Druid"],
+						SHAMAN = L["Shaman"],
+						PALADIN = L["Paladin"],
+						MAGE = L["Mage"],
+						ROGUE = L["Rogue"],
+						WARLOCK = L["Warlock"],
+						HUNTER = L["Hunter"],
 					}
 				},
 				groups = {
-					type = "group",
+					order = 2,
+					type = "multiselect",
 					name = L["Groups"],
+					width = "half",
 					inline = true,
-					args = {
-						[1] = {type = "toggle", name = L["Group 1"],},
-						[2] = {type = "toggle", name = L["Group 2"],},
-						[3] = {type = "toggle", name = L["Group 3"],},
-						[4] = {type = "toggle", name = L["Group 4"],},
-						[5] = {type = "toggle", name = L["Group 5"],},
-						[6] = {type = "toggle", name = L["Group 6"],},
-						[7] = {type = "toggle", name = L["Group 7"],},
-						[8] = {type = "toggle", name = L["Group 8"],},
+					values = {
+						L["Group 1"],
+						L["Group 2"],
+						L["Group 3"],
+						L["Group 4"],
+						L["Group 5"],
+						L["Group 6"],
+						L["Group 7"],
+						L["Group 8"],
 					}
 				},
 				roles = {
-					type = "group",
+					order = 3,
+					type = "multiselect",
 					name = L["Roles"],
-					args = {
-						MAINTANK = {type = "toggle", name = L["Main tank"],},
-						MAINASSIST = {type = "toggle", name = L["Main assist"],},
+					width = "half",
+					inline = true,
+					values = {
+						MAINTANK = L["Main tank"],
+						MAINASSIST = L["Main assist"],
 					},
 				},
 				namelist = {
+					order = 4,
 					type = "input",
+					width = "full",
 					name = L["Name list"],
 					desc = L["A list of players name to be shown.  This option will not be used if any of the group or class filters are set"],
 				},
 				strict = {
+					order = 5,
 					type = "toggle",
 					name = L["Strict filtering"],
 					desc = L["When strict filtering is enabled, a unit must match all given filters in order to be shown."],
@@ -210,19 +220,23 @@ local function getFrameArgs()
 			desc = L["Options that determine when the frames are shown"],
 			args = {
 				showRaid = {
+					width = "full",
 					type = "toggle",
 					name = L["Show the frame when in a raid"],
 				},
 				showParty = {
+					width = "full",
 					type = "toggle",
 					name = L["Show the frame when in a party, but not in a raid"],
 				},
 				showPlayer = {
+					width = "full",
 					type = "toggle",
 					name = L["Show the player when not in a raid"],
 					desc = L["Enables adding the player to the party or solo frames"],
 				},
 				showSolo = {
+					width = "full",
 					type = "toggle",
 					name = L["Show the frame when not grouped"],
 					-- TODO: Enable showPlayer at the same time
@@ -242,6 +256,7 @@ local function getFrameArgs()
 				},

 				grouping = {
+					inline = true,
 					type = "group",
 					name = L["Grouping"],
 					args = {
@@ -267,6 +282,7 @@ local function getFrameArgs()

 				sorting = {
 					type = "group",
+					inline = true,
 					name = L["Sorting"],
 					args = {
 						sortMethod = {
@@ -352,26 +368,47 @@ local function getFrameArgs()

 		display = {
 			type = "group",
-			name = L["Display"],
+			name = L["General"],
 			args = {
-				headerbackdrop = {
-					type = "toggle",
-					name = L["Display a backdrop behind frame"],
-				},
-				headercolor = {
-					type = "color",
-					name = L["Backdrop color"],
-					desc = L["The color to be applied to the backdrop"],
-					hasAlpha = true,
+				backdrop = {
+					type = "group",
+					name = L["Backdrop"],
+					inline = true,
+					args = {
+						headerbackdrop = {
+							order = 1,
+							width = "double",
+							type = "toggle",
+							name = L["Display a backdrop behind frame"],
+						},
+						headercolor = {
+							order = 2,
+							type = "color",
+							name = L["Backdrop color"],
+							desc = L["The color to be applied to the backdrop"],
+							hasAlpha = true,
+						},
+					},
 				},
+
 				clickcasting = {
-					type "toggle",
+					order = 99,
+					width = "double",
+					type = "toggle",
 					name = L["Enable click-casting on frames"],
 					desc = L["Sets the frames to work with addons such as Clique"],
 				},
+				title = {
+					order = 1,
+					type = "input",
+					width = "full",
+					name = L["Title of frame"],
+					desc = L["A title to be displayed above the frame"],
+				},

 				healthbars = {
 					type = "group",
+					inline = true,
 					name = L["Health bar options"],
 					args = {
 						classcolor = {
@@ -402,6 +439,7 @@ local function getFrameArgs()

 				manabars = {
 					type = "group",
+					inline = true,
 					name = L["Power bar options"],
 					args = {
 						barheight = {
diff --git a/Localization.enUS.lua b/Localization.enUS.lua
index 98fa9de..4583972 100644
--- a/Localization.enUS.lua
+++ b/Localization.enUS.lua
@@ -3,6 +3,7 @@
 PerfectRaidLocals = {
 	[" *** DISABLED ***"] = " *** DISABLED ***",
 	["A list of players name to be shown.  This option will not be used if any of the group or class filters are set"] = "A list of players name to be shown.  This option will not be used if any of the group or class filters are set",
+	["A title to be displayed above the frame"] = "A title to be displayed above the frame",
 	["Add"] = "Add",
 	["Add new frame:"] = "Add new frame:",
 	["Adding a default raid layout to new profile \"%s\""] = "Adding a default raid layout to new profile \"%s\"",
@@ -16,6 +17,7 @@ PerfectRaidLocals = {
 	["Arcane Brilliance"] = "Arcane Brilliance",
 	["Arcane Intellect"] = "Arcane Intellect",
 	["Auto-fill Default"] = "Auto-fill Default",
+	["Backdrop"] = "Backdrop",
 	["Backdrop color"] = "Backdrop color",
 	["Blessing of Kings"] = "Blessing of Kings",
 	["Blessing of Light"] = "Blessing of Light",
@@ -45,7 +47,6 @@ PerfectRaidLocals = {
 	["Delete"] = "Delete",
 	["Disable"] = "Disable",
 	["Disabled: "] = "Disabled: ",
-	["Display"] = "Display",
 	["Display Text:"] = "Display Text:",
 	["Display a backdrop behind frame"] = "Display a backdrop behind frame",
 	["Display a header backdrop"] = "Display a header backdrop",
@@ -71,6 +72,7 @@ PerfectRaidLocals = {
 	["Frames have been locked"] = "Frames have been locked",
 	["Frames have been unlocked"] = "Frames have been unlocked",
 	["From here you can configure the options for a display frame, including what units it displays and other options that change the look, feel and operation of the frame."] = "From here you can configure the options for a display frame, including what units it displays and other options that change the look, feel and operation of the frame.",
+	["General"] = "General",
 	["General Options"] = "General Options",
 	["General addon-wide options"] = "General addon-wide options",
 	["Ghost"] = "Ghost",
@@ -248,6 +250,7 @@ PerfectRaidLocals = {
 	["The start index of the final sorted unit list at which to begin displaying units"] = "The start index of the final sorted unit list at which to begin displaying units",
 	["This option hides the power bars for non-mana users such as warriors and rogues."] = "This option hides the power bars for non-mana users such as warriors and rogues.",
 	["Thorns"] = "Thorns",
+	["Title of frame"] = "Title of frame",
 	["Title:"] = "Title:",
 	["Up"] = "Up",
 	["Update delay"] = "Update delay",