Re: Hotspot events & joystick mode
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2008-02-24 15:07:43
|
Aidan Gauland wrote: > There are two control (i.e. hotspots and handles) events that I just > can't figure out: onhilite and enenddrag. Can anyone tell me what > triggers these, and how to use them? onhilite is used on controls that represent buttons (in the usual computer GUI sense) and is triggered whenever the button should highlight or unhighlight: Highlight when the mouse goes down on the button, unhighlight when the mouse, still down, leaves it, highlight again, when the mouse, still down, reenters it, unhighlight when the mouse goes up, etc. You should find many examples of this in the internal nodes (main menu, Lua command line, etc.) that are stored in the "Pipmak Resources" ZIP file (on Windows and Linux); the demo project has one on the title node too. onenddrag is triggered when the mouse goes up after it went down on the control, no matter where it is now (onmouseup is only triggered when the mouse goes up on the control). Search for "onenddrag" in the demo project, I think it's used there a few times too. Incidentally, these two events are the ones that were not directly modeled after HyperCard (except for the spelling of "hilite"). onhilite is necessary because HyperCard handles the highlighting of a button internally. onenddrag is an addition that seemed useful to me - in HyperCard, such things were usually done in ways like "repeat while the mouse is down", which doesn't work in Pipmak. I guess I should complete the documentation about these one day... > And another thing, I'm asking about this because it wasn't on the list > of things that remain to be done/fixed for 0.2.7: joystick mode doesn't > seem to let me pan very far, the limit seems to be about oh, say 30 > degrees. This isn't intentional is it? Not at all - that sounds like a pretty serious bug. One that I've never heard of. Do you think you'd be able to figure out what's going on yourself? -Christian |