xTray + ckHotspots Thread last updated on 2006-09-22 17:05:15

Posted by member 298092 on 2006-09-22 16:33:38

I've got some problems with making hotspot for tray, which should fit and resize to tray size. I thought that code will be good, but i was wrong,


xTrayStartHidden
*ckHotspot %#trayCurrentX%# %#trayCurrentY%# %#xtraycurrentwidth%# %#xtraycurrentheight%# !xTrayshow !xTrayhide






why it doesn't work?

Posted by member 5575 on 2006-09-22 17:05:15 link

The "current" evars can only be evaluated with a !parseEvars bang. The setting above is loaded only once, at startup, when the "current" evars are probably not even defined yet. In order to do what you want to do, you'll need to use a transparent xlabel instead, and set it up so that the label resizes when the tray does, e.g., with an !xTrayOnResize event bang or the like. Have the xlabel onEnter and OnLeave events fire off the XtrayShow/Hide bangs to make it behave like a hotspot.