Mercurial > wow > reaction
changeset 269:c27596828276
Editor layout cleanup
author | Flick |
---|---|
date | Tue, 10 May 2011 17:23:21 -0700 |
parents | fc79c85ab7a5 |
children | 07a1cbf38812 |
files | Editor.lua |
diffstat | 1 files changed, 120 insertions(+), 120 deletions(-) [+] |
line wrap: on
line diff
--- a/Editor.lua Tue May 10 10:31:25 2011 -0700 +++ b/Editor.lua Tue May 10 17:23:21 2011 -0700 @@ -131,7 +131,7 @@ name = L["Rows"], get = function() return self.tmp.barRows or 1 end, set = function(info, val) self.tmp.barRows = val end, - width = "full", + width = "double", min = 1, max = 32, step = 1, @@ -142,7 +142,7 @@ name = L["Columns"], get = function() return self.tmp.barCols or 12 end, set = function(info, val) self.tmp.barCols = val end, - width = "full", + width = "double", min = 1, max = 32, step = 1, @@ -153,7 +153,7 @@ name = L["Size"], get = function() return self.tmp.barSize or 36 end, set = function(info, val) self.tmp.barSize = val end, - width = "full", + width = "double", min = 10, max = 72, step = 1, @@ -164,7 +164,7 @@ name = L["Spacing"], get = function() return self.tmp.barSpacing or 3 end, set = function(info, val) self.tmp.barSpacing = val end, - width = "full", + width = "double", min = 0, max = 24, step = 1, @@ -255,19 +255,37 @@ func = function() ReAction:EraseBar(bar) end, order = 2 }, + optionsHdr = { + type = "header", + name = "", + order = 3, + }, clickDown = { type = "toggle", name = L["Activate on Down"], desc = L["Activate the button when the key or mouse button is pressed down instead of when it is released"], - order = 3, + order = 4, + width = "full", set = function(info, value) bar:GetConfig().clickDown = value; ReAction:RebuildAll() end, get = function() return bar:GetConfig().clickDown end, }, + alpha = { + type = "range", + name = L["Transparency"], + get = function() return bar:GetAlpha() end, + set = function(info, val) bar:SetAlpha(val) end, + min = 0, + max = 1, + isPercent = true, + step = 0.01, + bigStep = 0.05, + order = 5, + }, anchor = { type = "group", name = L["Anchor"], inline = true, - order = 4, + order = 6, args = { frame = { type = "input", @@ -331,18 +349,6 @@ }, }, }, - alpha = { - type = "range", - name = L["Transparency"], - get = function() return bar:GetAlpha() end, - set = function(info, val) bar:SetAlpha(val) end, - min = 0, - max = 1, - isPercent = true, - step = 0.01, - bigStep = 0.05, - order = 4, - }, }, }, buttonOpts = self:CreateButtonOptions(bar), @@ -424,35 +430,10 @@ local ActionHandler = { buttonClass = ReAction.Button.Action, options = { - hideEmpty = { - name = L["Hide Empty Buttons"], - order = 1, - type = "toggle", - width = "double", - get = "GetHideEmpty", - set = "SetHideEmpty", - }, - lockButtons = { - name = L["Lock Buttons"], - desc = L["Prevents picking up/dragging actions (use SHIFT to override this behavior)"], - order = 2, - type = "toggle", - get = "GetLockButtons", - set = "SetLockButtons", - }, - lockOnlyCombat = { - name = L["Only in Combat"], - desc = L["Only lock the buttons when in combat"], - order = 3, - type = "toggle", - disabled = "LockButtonsCombatDisabled", - get = "GetLockButtonsCombat", - set = "SetLockButtonsCombat", - }, pages = { name = L["# Pages"], desc = L["Use the Dynamic State tab to specify page transitions"], - order = 4, + order = 1, type = "range", min = 1, max = 10, @@ -463,21 +444,46 @@ mindcontrol = { name = L["Mind Control Support"], desc = L["When possessing a target (e.g. via Mind Control), map the first 12 buttons of this bar to the possessed target's actions."], - order = 5, + order = 2, type = "toggle", - width = "double", set = "SetMindControl", get = "GetMindControl", }, vehicle = { name = L["Vehicle Support"], desc = L["When on a vehicle, map the first 6 buttons of this bar to the vehicle actions. The vehicle-exit button is mapped to the 7th button. Pitch controls are not supported."], - order = 6, + order = 3, type = "toggle", - width = "double", get = "GetVehicle", set = "SetVehicle", }, + hideEmpty = { + name = L["Hide Empty Buttons"], + order = 4, + type = "toggle", + width = "full", + get = "GetHideEmpty", + set = "SetHideEmpty", + }, + lockButtons = { + name = L["Lock Buttons"], + desc = L["Prevents picking up/dragging actions (use SHIFT to override this behavior)"], + order = 5, + width = "full", + type = "toggle", + get = "GetLockButtons", + set = "SetLockButtons", + }, + lockOnlyCombat = { + name = L["Only in Combat"], + desc = L["Only lock the buttons when in combat"], + order = 6, + width = "full", + type = "toggle", + disabled = "LockButtonsCombatDisabled", + get = "GetLockButtonsCombat", + set = "SetLockButtonsCombat", + }, actions = { name = L["Edit Action IDs"], order = 7, @@ -488,7 +494,7 @@ name = L["Assign"], order = 1, type = "select", - width = "double", + width = "full", values = { [0] = L["Choose Method..."], [1] = L["Individually"], [2] = L["All at Once"], }, @@ -1006,12 +1012,6 @@ order = 1, type = "group", args = { - delete = { - name = L["Delete this State"], - order = -1, - type = "execute", - func = "DeleteState", - }, rename = { name = L["Name"], order = 1, @@ -1021,10 +1021,17 @@ pattern = "^%w*$", usage = L["State names must be alphanumeric without spaces"], }, + delete = { + name = L["Delete this State"], + order = 2, + type = "execute", + func = "DeleteState", + confirm = true, + }, ordering = { name = L["Evaluation Order"], desc = L["State transitions are evaluated in the order listed: Move a state up or down to change the order"], - order = 2, + order = 3, type = "group", inline = true, args = { @@ -1070,6 +1077,7 @@ hide = { name = L["Hide Bar"], order = 90, + width = "full", type = "toggle", set = "SetProp", get = "GetProp", @@ -1083,51 +1091,57 @@ set = "SetProp", get = "GetProp", }, ]] - position = { + + anchorEnable = { + name = L["Reposition"], + order = 111, + type = "toggle", + set = "SetProp", + get = "GetProp", + }, + anchorGroup = { name = L["Position"], - order = 92, + order = 112, type = "group", inline = true, + disabled = "GetAnchorDisabled", args = { - anchorEnable = { - name = L["Reposition"], - order = 1, - type = "toggle", - set = "SetProp", - get = "GetProp", - }, anchorFrame = { name = L["Anchor Frame"], - order = 2, + order = 1, type = "select", values = "GetAnchorFrames", set = "SetAnchorFrame", get = "GetAnchorFrame", - disabled = "GetAnchorDisabled", - hidden = "GetAnchorDisabled", }, anchorPoint = { name = L["Point"], + order = 2, + type = "select", + values = pointTable, + set = "SetAnchorPointProp", + get = "GetAnchorPointProp", + }, + anchorRelPoint = { + name = L["Relative Point"], order = 3, type = "select", values = pointTable, set = "SetAnchorPointProp", get = "GetAnchorPointProp", - disabled = "GetAnchorDisabled", - hidden = "GetAnchorDisabled", - }, - anchorRelPoint = { - name = L["Relative Point"], - order = 4, - type = "select", - values = pointTable, - set = "SetAnchorPointProp", - get = "GetAnchorPointProp", - disabled = "GetAnchorDisabled", - hidden = "GetAnchorDisabled", }, anchorX = { name = L["X Offset"], + order = 4, + type = "range", + min = -100, + max = 100, + step = 1, + set = "SetProp", + get = "GetProp", + }, + anchorY = { + name = L["Y Offset"], order = 5, type = "range", min = -100, @@ -1135,39 +1149,27 @@ step = 1, set = "SetProp", get = "GetProp", - disabled = "GetAnchorDisabled", - hidden = "GetAnchorDisabled", - }, - anchorY = { - name = L["Y Offset"], - order = 6, - type = "range", - min = -100, - max = 100, - step = 1, - set = "SetProp", - get = "GetProp", - disabled = "GetAnchorDisabled", - hidden = "GetAnchorDisabled", }, }, }, - scale = { + + enableScale = { + name = L["Set New Scale"], + order = 121, + type = "toggle", + set = "SetProp", + get = "GetProp", + }, + scaleGroup = { name = L["Scale"], - order = 93, + order = 122, type = "group", inline = true, + disabled = "GetScaleDisabled", args = { - enableScale = { - name = L["Set New Scale"], - order = 1, - type = "toggle", - set = "SetProp", - get = "GetProp", - }, scale = { name = L["Scale"], - order = 2, + order = 1, type = "range", min = 0.25, max = 2.5, @@ -1175,27 +1177,27 @@ isPercent = true, set = "SetProp", get = "GetScale", - disabled = "GetScaleDisabled", - hidden = "GetScaleDisabled", }, }, }, - alpha = { + + enableAlpha = { + name = L["Set Transparency"], + order = 131, + type = "toggle", + set = "SetProp", + get = "GetProp", + }, + alphaGroup = { name = L["Transparency"], - order = 94, + order = 132, type = "group", inline = true, + disabled = "GetAlphaDisabled", args = { - enableAlpha = { - name = L["Set Transparency"], - order = 1, - type = "toggle", - set = "SetProp", - get = "GetProp", - }, alpha = { name = L["Transparency"], - order = 2, + order = 1, type = "range", min = 0, max = 1, @@ -1204,8 +1206,6 @@ isPercent = true, set = "SetProp", get = "GetAlpha", - disabled = "GetAlphaDisabled", - hidden = "GetAlphaDisabled", }, }, }, @@ -1221,7 +1221,7 @@ name = L["Select this state"], order = 2, type = "select", - style = "radio", + style = "dropdown", values = { default = L["by default"], any = L["when ANY of these"], @@ -1681,7 +1681,7 @@ -- TODO: select default state options and pass as final argument states[name] = { } optionMap[bar].args[name] = CreateStateOptions(bar,name) - ReAction:ShowEditor(bar, moduleID, name) + ReAction:ShowEditor(bar, "stateOpts", name) private.newstatename = "" end end,