cookbook: Added a second example to show "overlapping" transitions

Added another JSON example to show how transitions can
be easily overlapped when using ClutterAnimator (two
sequences of 5 transitions, simultaneous with two
sequences of 1 transition).

Modified the C JSON loader program so it can be used with
this example as well.
This commit is contained in:
Elliot Smith
2010-09-03 11:56:33 +01:00
parent c0aa72a042
commit 60ff660d42
2 changed files with 87 additions and 2 deletions

View File

@ -30,19 +30,24 @@ foo_key_pressed_cb (ClutterActor *actor,
int
main (int argc, char *argv[])
{
gchar *filename = UI_FILE;
ClutterScript *script;
ClutterActor *stage;
GError *error = NULL;
if (argc > 1)
filename = argv[1];
clutter_init (&argc, &argv);
script = clutter_script_new ();
clutter_script_load_from_file (script, UI_FILE, &error);
clutter_script_load_from_file (script, filename, &error);
if (error != NULL)
{
g_critical ("Error loading ClutterScript file %s\n%s", UI_FILE, error->message);
g_critical ("Error loading ClutterScript file %s\n%s", filename, error->message);
g_error_free (error);
exit (EXIT_FAILURE);
}