InfoBox need help

Posted by Michen on Sat 10 May 2014 01:03 AM — 2 posts, 10,280 views.

#0
Those code did not work
When I moseover,mouseup,mousedown on "aaa" button,It did nothing...



require "InfoBox"
box = box or InfoBox:New("config")
box.Bar.barStyle = InfoBox.barStyles.flat
tw = box.Bars[1] or box:AddBar("aaa",100)
tw.barStyle = InfoBox.barStyles.flat
tw.button={mouseUp="mouseover",mouseOver="mouseover",mouseDown="mouseover",tooltipText="test"}
tw = box.Bars[2] or box:AddBar()
tw.caption='bbb'
tw = box.Bars[3] or box:AddBar("")
box:Update()
function mouseover (flags, hotspot_id)
--function myClickFunction(flags,strBarsIndex)
local id = tonumber(hotspot_id)
box.Bars[id].caption = "Clicked"
print("hi")
end
#1
It's ok now..


function mouseover (flags, hotspot_id)
--function myClickFunction(flags,strBarsIndex)
local id = tonumber(hotspot_id)
box.Bars[id].caption = "Clicked"
print("hi")
end
require "InfoBox"
box = box or InfoBox:New("config")
box.Bar.barStyle = InfoBox.barStyles.flat
tw = box.Bars[1] or box:AddBar("aaa",100)
tw.barStyle = InfoBox.barStyles.flat
tw.button={mouseUp="mouseover",mouseOver="mouseover",mouseDown="mouseover",tooltipText="test"}
tw = box.Bars[2] or box:AddBar()
tw.caption='bbb'
tw = box.Bars[3] or box:AddBar("")
box:Update()