Re: Presentation & Question


Canvas is catching all mouse movements anyways ;-) It checks,
whether any object is under pointer, and if true, then emits
enter/leave/move... events on that object, otherwise does
noting. Your code would probably be much simpler, as you
do not have to bother with determining distance from generic
shape but only from single point.
It, of course depends on the number of planets and ships, but
I think there has to be very many of them, before speed
becomes problem.

Best wishes,
Lauris Kaplinski

On Sun, 2002-03-10 at 23:04, Lucas Di Pentima wrote:
> Hi Lauris!
> El dom, 10-03-2002 a las 11:30, Lauris Kaplinski escribió:
> > I think you should drop the idea on relying on gnome-canvas event
> > routing to catch palnets, but instead write your own. Let me explain:
> [...] 
> > Now, for each mouse movement, you'll find closest planet and ship,
> > and show highlight marker on these. If user clicks
> > mousebutton, you just mark given object as actually selected, and
> > move selection marker to it.
> Trapping all mouse events will not make the app to slow? if not, this
> sounds like a terrific idea! :-)
> > Thus you will avoid moving both mouse cursor and canvas, that
> > can disturb users. Plus you can relatively easily implement
> > autoscroll (just doing some timeout-based magic on border area).
> > Plus users will have immediate feedback, which object will become
> > selected, if they will press button.
> Yes! yesterday I was chatting with one gnome developer at gnome IRC, and
> he helped me about thinking how to move canvas underneath mouse pointer,
> but later I was thinking that that could be a bad idea because the user
> could loose if the starchart moves too much. Your idea is great, the
> only thing that I don't know is if trapping every single mouse movement
> event will make my app to cpu-intensive.
> Greetings!
> -- 
> Lucas Di Pentima - Santa Fe - Argentina
> GnuPG Public Key:
> ICQ UIN: 6782045

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]