Do it within a constantly running task in your gui class.
This is more or less what I use. (I use a CollisionHandlerQueue. If you use a CollisionHandlerEvent, then the code will look different.)
self.mx = 0
self.my = 0
self.over = None
taskMgr.add(self.guiTask)
def guiTask():
mwn = base.mouseWatcherNode
if mwn.hasMouse():
mx,my = mwn.getMouse()
if mx,my == self.mx,self.my:
if self.over:
self.over.onOver()
return
mx,my = self.mx,self.my
over = self.getCollisions(self.mx,self.my)
if over != self.over:
if self.over:
self.over.onExit()
if over:
over.onEnter()
if over:
over.onOver()
To clarify, getCollisions(x,y) is a function in my gui class that sets a picker ray to from the camera node to x,y.