2 * This file is part of NumptyPhysics
3 * Copyright (C) 2008 Tim Edmonds
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 3 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
27 class Overlay
: public Layer
35 virtual int countItems() =0;
36 virtual Canvas
* provideItem( int i
, Canvas
* old
) =0;
37 virtual void releaseItem( Canvas
* old
) =0;
38 virtual void onSelection( int i
) {};
39 virtual void onSelection( int i
, int ix
, int iy
) { onSelection(i
); };
42 extern Overlay
* createIconOverlay( GameControl
& game
, const char* file
,
44 bool dragging_allowed
=true);
46 extern Overlay
* createEditOverlay( GameControl
& game
);
48 extern Overlay
* createNextLevelOverlay( GameControl
& game
, int winner
);
50 extern Overlay
* createListOverlay( GameControl
& game
,
51 ListProvider
* provider
,
53 int w
=200, int h
=200 );
55 extern Overlay
* createMenuOverlay( GameControl
& game
);