Hmm... I copied that, the part that checks to see if its disabled when it loads the bar works fine. And the button toggles it on and off, but it only toggles the contrast to normal. Copied exactly what you have.buttons = {
-- button 1
{
icon = "search_32.png",
tooltip = "Underdark Mapper",
target_plugin = "aba6daf3fb30699071cb5d05",
script = function (n)
local id = buttons [n].target_plugin
local f = frames [n] -- where is image?
local x1, y1, x2, y2 = f.x1, f.y1, f.x2, f.y2
-- redraw the image
WindowDrawImage(win, n,
x1 + 1, y1 + 1, -- left, top
x2 - 1, y2 - 1, -- right, bottom
2) -- mode - stretch or shrink
-- toggle enable flag for target plugin
EnablePlugin(id, not GetPluginInfo (id, 17))
-- grey out if disabled now
if not GetPluginInfo (id, 17) then
WindowFilter (win, x1, y1, x2, y2, 8, .4)
end -- if
end, -- function
}, -- end of button 1
-- button 2
{
icon = "bubble_32.png",
tooltip = "Spell Practice",
target_plugin = "656eeab9f4fe9bd89d066e25",
script = function (n)
local id = buttons [n].target_plugin
local f = frames [n] -- where is image?
local x1, y1, x2, y2 = f.x1, f.y1, f.x2, f.y2
-- redraw the image
WindowDrawImage(win, n,
x1 + 1, y1 + 1, -- left, top
x2 - 1, y2 - 1, -- right, bottom
2) -- mode - stretch or shrink
-- toggle enable flag for target plugin
EnablePlugin(id, not GetPluginInfo (id, 17))
-- grey out if disabled now
if not GetPluginInfo (id, 17) then
WindowFilter (win, x1, y1, x2, y2, 8, .4)
end -- if
end, -- function
}, -- end of button 2
-- button 3
{
icon = "block_32.png",
tooltip = "Crafting Omit",
target_plugin = "157dce098adaa8ceebcbfc88",
script = function (n)
local id = buttons [n].target_plugin
local f = frames [n] -- where is image?
local x1, y1, x2, y2 = f.x1, f.y1, f.x2, f.y2
-- redraw the image
WindowDrawImage(win, n,
x1 + 1, y1 + 1, -- left, top
x2 - 1, y2 - 1, -- right, bottom
2) -- mode - stretch or shrink
-- toggle enable flag for target plugin
EnablePlugin(id, not GetPluginInfo (id, 17))
-- grey out if disabled now
if not GetPluginInfo (id, 17) then
WindowFilter (win, x1, y1, x2, y2, 8, .4)
end -- if
end, -- function
}, -- end of button 3
--> add more buttons here
} -- end of buttons table
Thanks again Nick! |