I’m trying to create and invisible box that when rolled over it calls a function. My original idea is to use an button who’s image is just a transparent image. but i can’t figure out how to get the current state (normal, rollover,pressed,dissabled)
It would be something like this in Pseudo-code:
self.button = DirectButton(... button attributes ...)
taskMgr.add(self.watcher,'watch')
def watcher(self,task):
if self.button is rolled over:
self.fun()
return Task.cont
def fun(self):
Do something here
If you can help at all on this or if you know an easier way to do this, it would be greatly appreciated. Thanks in advance