Bartender4:

- added settings to toggle possess bar and actionbar-based switching (like pressing SHIFT-2 or SHIFT-MouseWheel to change bars)
- added TODO.txt
This commit is contained in:
Hendrik Leppkes
2008-05-03 11:33:27 +00:00
parent 2f1a47d56d
commit 39f941fdc8
4 changed files with 44 additions and 3 deletions
+25 -2
View File
@@ -26,6 +26,8 @@ do
enabled = "StateOption",
def_state = "DefaultState",
states = "StateOption",
actionbar = "StateOption",
possess = "StateOption",
}
-- retrieves a valid bar object from the modules actionbars table
function getBar(id)
@@ -105,6 +107,27 @@ function module:GetStateOptionsTable()
get = optGetter,
set = optSetter,
},
sep1 = {
order = 2,
type = "description",
name = "",
},
actionbar = {
order = 5,
type = "toggle",
name = "ActionBar Switching",
desc = "Enable Bar Switching based on the actionbar controls provided by the game.",
get = optGetter,
set = optSetter,
},
possess = {
order = 5,
type = "toggle",
name = "Possess Bar",
desc = "Switch this bar to the Possess Bar when possessing a npc (eg. Mind Control)",
get = optGetter,
set = optSetter,
},
def_desc = {
order = 10,
type = "description",
@@ -243,7 +266,7 @@ function ActionBar:UpdateStates()
end
local statedriver = {}
if self.id == "1" then
if self:GetStateOption("possess") then
self:AddButtonStates(11)
table_insert(statedriver, "[bonusbar:5]11")
end
@@ -261,7 +284,7 @@ function ActionBar:UpdateStates()
end
-- second priority the manual changes using the actionbar options
if self.id == "1" then
if self:GetStateOption("actionbar") then
for i=2,6 do
table_insert(statedriver, fmt("[actionbar:%s]%s", i, i))
end