summaryrefslogtreecommitdiff
authorharlekin <harlekin>2003-03-24 18:05:18 (UTC)
committer harlekin <harlekin>2003-03-24 18:05:18 (UTC)
commit58f8a4fe595182abb4372ab4f990e39cf67ef08a (patch) (unidiff)
tree32dead4e25c41637cd63093dd9801fcd76dc9d5c
parent84372ba20c0b1b09c1606212ec66c9d04588b90e (diff)
downloadopie-58f8a4fe595182abb4372ab4f990e39cf67ef08a.zip
opie-58f8a4fe595182abb4372ab4f990e39cf67ef08a.tar.gz
opie-58f8a4fe595182abb4372ab4f990e39cf67ef08a.tar.bz2
moved grass icon to snake dir
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/games/snake/interface.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/games/snake/interface.cpp b/noncore/games/snake/interface.cpp
index c824543..0f312ac 100644
--- a/noncore/games/snake/interface.cpp
+++ b/noncore/games/snake/interface.cpp
@@ -12,49 +12,49 @@
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21#include "interface.h" 21#include "interface.h"
22 22
23#include <qpe/resource.h> 23#include <qpe/resource.h>
24 24
25#include <qpe/qpetoolbar.h> 25#include <qpe/qpetoolbar.h>
26#include <qtoolbutton.h> 26#include <qtoolbutton.h>
27#include <qstyle.h> 27#include <qstyle.h>
28#include <qapplication.h> 28#include <qapplication.h>
29#include <qmessagebox.h> 29#include <qmessagebox.h>
30 30
31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) : 31SnakeGame::SnakeGame(QWidget* parent, const char* name, WFlags f) :
32 QMainWindow(parent,name,f), 32 QMainWindow(parent,name,f),
33 canvas(232, 258) 33 canvas(232, 258)
34{ 34{
35 setCaption( tr("Snake") ); 35 setCaption( tr("Snake") );
36 QPixmap bg = Resource::loadPixmap("grass"); 36 QPixmap bg = Resource::loadPixmap("snake/grass");
37 canvas.setBackgroundPixmap(bg); 37 canvas.setBackgroundPixmap(bg);
38 canvas.setUpdatePeriod(100); 38 canvas.setUpdatePeriod(100);
39 snake = 0; 39 snake = 0;
40 40
41 cv = new QCanvasView(&canvas, this); 41 cv = new QCanvasView(&canvas, this);
42 42
43 pauseTimer = new QTimer(this); 43 pauseTimer = new QTimer(this);
44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) ); 44 connect(pauseTimer, SIGNAL(timeout()), this, SLOT(wait()) );
45 45
46 setToolBarsMovable( FALSE ); 46 setToolBarsMovable( FALSE );
47 47
48 QPEToolBar* toolbar = new QPEToolBar( this); 48 QPEToolBar* toolbar = new QPEToolBar( this);
49 toolbar->setHorizontalStretchable( TRUE ); 49 toolbar->setHorizontalStretchable( TRUE );
50 50
51 QPixmap newicon = Resource::loadPixmap("ksnake"); 51 QPixmap newicon = Resource::loadPixmap("ksnake");
52 setIcon(newicon); 52 setIcon(newicon);
53 (void)new QToolButton(newicon, tr("New Game"), 0, 53 (void)new QToolButton(newicon, tr("New Game"), 0,
54 this, SLOT(newGame()), toolbar, "New Game"); 54 this, SLOT(newGame()), toolbar, "New Game");
55 55
56 scorelabel = new QLabel(toolbar); 56 scorelabel = new QLabel(toolbar);
57 showScore(0); 57 showScore(0);
58 scorelabel->setBackgroundMode( PaletteButton ); 58 scorelabel->setBackgroundMode( PaletteButton );
59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs ); 59 scorelabel->setAlignment( AlignRight | AlignVCenter | ExpandTabs );
60 toolbar->setStretchableWidget( scorelabel ); 60 toolbar->setStretchableWidget( scorelabel );