[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdegames/kbattleship/src
From:       Paolo Capriotti <paolo.capriotti () gmail ! com>
Date:       2007-05-01 0:39:14
Message-ID: 1177979954.153799.13242.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 659899 by capriotti:

Restored WelcomeScreen functionality


 M  +0 -10     battlefieldview.cpp  
 M  +12 -1     welcomescreen.cpp  
 M  +5 -0      welcomescreen.h  


--- trunk/KDE/kdegames/kbattleship/src/battlefieldview.cpp #659898:659899
@@ -43,16 +43,6 @@
     
     m_screen = new WelcomeScreen(this, parent->font());
     m_screen->stackOver(m_background);
-
-    Button* button;
-    button = m_screen->addButton(0, 0, KIcon("user-female"), "Human");
-//     connect(button, SIGNAL(clicked()), this, SIGNAL(human()));
-    
-    button = m_screen->addButton(0, 1, KIcon("roll"), "Computer");
-//     connect(button, SIGNAL(clicked()), this, SIGNAL(ai()));
-    
-    button = m_screen->addButton(0, 2, KIcon("network"), "Network");
-//     connect(button, SIGNAL(clicked()), this, SIGNAL(network()));
     m_screen->show();
     
     for (Sprites::iterator i = m_sprites.begin();
--- trunk/KDE/kdegames/kbattleship/src/welcomescreen.cpp #659898:659899
@@ -10,6 +10,7 @@
 #include "welcomescreen.h"
 
 #include <kdebug.h>
+#include <kicon.h>
 
 #include "button.h"
 #include "animator.h"
@@ -22,6 +23,16 @@
 {
     m_background = new KGameCanvasRectangle(QColor(0, 0, 0, 80), m_size, this);
     m_background->show();
+    
+    Button* button;
+    button = addButton(0, 0, KIcon("user-female"), "Human");
+    connect(button, SIGNAL(clicked()), this, SIGNAL(human()));
+    
+    button = addButton(0, 1, KIcon("roll"), "Computer");
+    connect(button, SIGNAL(clicked()), this, SIGNAL(ai()));
+    
+    button = addButton(0, 2, KIcon("network"), "Network");
+    connect(button, SIGNAL(clicked()), this, SIGNAL(network()));
 }
 
 void WelcomeScreen::resize(const QSize& size)
@@ -122,7 +133,7 @@
         m_clicked->onClicked();
         
         Animation* hideAnimation = new FadeAnimation(this, opacity(), 0, 500);
-//         connect(hideAnimation, SIGNAL(done()), this, SLOT(hide()));
+        connect(hideAnimation, SIGNAL(done()), this, SLOT(hide()));
         Animator::instance()->add(hideAnimation);
     }
     
--- trunk/KDE/kdegames/kbattleship/src/welcomescreen.h #659898:659899
@@ -43,6 +43,11 @@
     
 public slots:
     void hide();
+    
+signals:
+    void human();
+    void ai();
+    void network();
 };
 
 #endif // WELCOMESCREEN_H
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic