Re: Get mouse clicks on the map

On Sat, Jan 9, 2010 at 11:06 AM, Keith Sharp <keith sharp gmail com> wrote:
I've been tinkering with the launcher-gtk.c program in the demos, and I was trying to add the abilty to catch mouse clicks on the map and print them to the console (with the ultimate aim of creating a marker or popup menu on a mouse click).
The demo laucher.c shows how to do it. You first have to set the view as 'reactive' with clutter_actor_set_reactive().

  clutter_actor_set_reactive (actor, TRUE);
  g_signal_connect (actor, "button-release-event",
      G_CALLBACK (mouse_click_cb),

The rest of the code should be the same as you wrote it.

Note: I think that version 0.4.3 has a regression because the callback doesn't seem to be called. I will wait a bit until Pierre-Luc confirms this.

Emmanuel Rodriguez

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