docs/cookbook: Add script->state connection recipe

Script definitions can connect a signal to a State transition; this is a
useful thing to document with a recipe in the cookbook.
This commit is contained in:
Emmanuele Bassi
2011-08-31 12:22:07 +01:00
parent b428c3981b
commit 3bdd49dc19
5 changed files with 284 additions and 7 deletions

View File

@ -42,7 +42,10 @@ foo_button_clicked_cb (ClutterClickAction *action,
CLUTTER_Z_AXIS,
NULL, NULL, NULL);
z_angle += 90.0;
if (clutter_click_action_get_button (action) == 1)
z_angle += 90.0;
else
z_angle -= 90.0;
/* animate to new rotation angle */
clutter_actor_animate (rectangle,