GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit adc9bcf7 authored by Bruno Coudoin's avatar Bruno Coudoin

useless file

svn path=/branches/gcomprixo/; revision=2800
parent eeaac123
/* gcompris - animtest.c
*
* Copyright (C) 2005 Joe Neeman
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "gcompris/gcompris.h"
#define CENTER_LEFT_X 185
#define CENTER_LEFT_Y 430
static GcomprisBoard *board;
static gboolean paused = TRUE;
static void start_board(GcomprisBoard*);
static void end_board();
static gboolean is_our_board(GcomprisBoard*);
/*=============================================*/
static GcomprisAnimation *animation;
static GnomeCanvasItem *anim_item;
static BoardPlugin menu_bp =
{
NULL,
NULL,
"Blah",
"Blah",
"Me",
NULL,
NULL,
NULL,
NULL,
start_board,
NULL,
end_board,
is_our_board,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};
BoardPlugin *get_bplugin_info()
{
return &menu_bp;
}
static void start_board(GcomprisBoard *b)
{
if(b != NULL)
{
board = b;
gc_set_background(gnome_canvas_root(board->canvas), "leftright/leftright-bg.jpg");
board->level = 1;
board->maxlevel=1;
board->sublevel=1;
board->number_of_sublevel=1;
gc_score_start(SCORESTYLE_NOTE, 10, 50, board->number_of_sublevel);
gc_bar_set(GC_BAR_LEVEL);
gc_bar_set_level(board);
gc_score_set(board->sublevel);
animation = gc_anim_load( "animtest/test.txt" );
anim_item = (GnomeCanvasItem*)
gc_anim_activate( gnome_canvas_root(board->canvas),
animation );
gnome_canvas_item_set(anim_item,
"x", (double) CENTER_LEFT_X,
"y", (double) CENTER_LEFT_Y,
"anchor", GTK_ANCHOR_CENTER,
"width", (double)128,
"height", (double)128,
"width_set", TRUE,
"height_set", TRUE,
NULL);
}
}
static void end_board()
{
if(board != NULL)
{
gc_anim_deactivate(anim_item);
gc_anim_free(animation);
}
}
static gboolean is_our_board(GcomprisBoard *b)
{
if(b)
{
if(g_strcasecmp(b->type, "animtest") == 0)
{
b->plugin = &menu_bp;
return TRUE;
}
}
return FALSE;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment