Added Custom Conditionals support and Config options

You can now enter any macro conditions into an editbox in the Config GUI which will feed the state driver. The syntax is not validated, so its your own responsibility to know how macro syntax works!
Example:
[form:1]9;0 -- Page to Bar 9 in Form 1, otherwise don't page at all (id 0)
This commit is contained in:
Hendrik Leppkes
2008-09-28 14:32:38 +02:00
parent 0b6b233ab0
commit 250f3d8a5b
2 changed files with 98 additions and 38 deletions
+45
View File
@@ -15,6 +15,9 @@ do
actionbar = "StateOption",
possess = "StateOption",
autoassist = "ConfigAutoAssist",
customEnabled = "StateOption",
custom = "StateOption",
customCopy = "CopyCustomConditionals",
}
-- retrieves a valid bar object from the modules actionbars table
function getBar(id)
@@ -196,6 +199,48 @@ function module:GetStateOptionsTable()
},
},
},
customNl = {
order = 48,
type = "description",
name = "\n",
},
customHeader = {
order = 49,
type = "header",
name = L["Custom Conditionals"],
},
customEnabled = {
order = 50,
type = "toggle",
name = L["Use Custom Condition"],
desc = L["Enable the use of a custom condition, disabling all of the above."],
get = optGetter,
set = optSetter,
disabled = disabledFunc,
--width = "double",
},
customCopy = {
order = 51,
type = "execute",
name = "Copy Conditionals",
desc = "Create a copy of the auto-generated conditionals in the custom configuration as a base template",
func = optSetter,
},
customDesc = {
order = 52,
type = "description",
name = L["Note: Enabling Custom Conditionals will disable all of the above settings!"],
},
custom = {
order = 55,
type = "input",
name = L["Custom Conditionals"],
desc = L["You can use any macro conditionals in the custom string, using the number of the bar as target value.\nExample: [form:1]9;0"],
width = "full",
get = optGetter,
set = optSetter,
disabled = disabledFunc,
},
}
do