thomasahle / TrinityProject

A mindblowing trainbased game for entire family
http://thomasahle.github.com/TrinityProject/
GNU General Public License v3.0
8 stars 3 forks source link

Better visual feedback #21

Open thomasahle opened 12 years ago

thomasahle commented 12 years ago

We need better feedback (mouseover and mousedown) when inserting components. To do this the components need a specified way of changing sprite.

esizikova commented 12 years ago

By the way, do you know what kind of mouse handler that would be? It seems like the pointer events in the Start Scene could only respond to mouse clicks, not mouse overs. I wasn't able to find a listener for mouse over, like http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/event/MouseListener.html

or am I looking in the wrong place?

thomasahle commented 12 years ago

The mouse listener has a onMouseMoved method: http://docs.playn.googlecode.com/git/javadoc/playn/core/Mouse.Listener.html

thomasahle commented 12 years ago

It's possible that it doesn't work unless the mouse is down though. I suggest asking on https://groups.google.com/forum/?fromgroups#!forum/playn for the right approach. As a last resort we can call mouse().position in the update() method, to check where the mouse is at every frame.