[clutter-box2dmm: 3/10] Release of 0.12.2 * examples/slides/main.cc: Shows how to use the new collision API



commit 3f21f48d0315c94d1d532e745baff7f457d51c3c
Author: Aidan Delaney <aidan phoric eu>
Date:   Sun Mar 4 20:43:49 2012 +0000

    Release of 0.12.2
      * examples/slides/main.cc: Shows how to use the new collision API

 ChangeLog               |    5 +++++
 NEWS                    |    4 ++++
 configure.ac            |    2 +-
 examples/slides/main.cc |    9 +++++----
 4 files changed, 15 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1b9444c..29f162e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+0.12.2:
+	
+2012-03-04 Aidan Delaney <aidan phoric eu>
+	Updated bindings so that collision signal is exposed.
+	
 0.12.1:
 
 2012-02-22 Aidan Delaney <aidan phoric eu>
diff --git a/NEWS b/NEWS
index 0268144..c2d0325 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+0.12.2:
+
+* Exposed the signal_collision of Box2DChild
+
 0.12.1:
 
 * Updated the bindings to build on clutter-box2d > 0.12
diff --git a/configure.ac b/configure.ac
index 426d00a..ce75de4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
 ## You should have received a copy of the GNU Lesser General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([clutter-box2dmm], [0.12.1],
+AC_INIT([clutter-box2dmm], [0.12.2],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=clutter-box2dmm],
         [clutter-box2dmm], [http://www.gtkmm.org/])
 AC_PREREQ([2.59])
diff --git a/examples/slides/main.cc b/examples/slides/main.cc
index 79d19a5..d63b24a 100644
--- a/examples/slides/main.cc
+++ b/examples/slides/main.cc
@@ -2,10 +2,10 @@
 #include <clutter-box2dmm.h>
 #include <iostream>
 
-void
-handle_collision(const Glib::RefPtr<Clutter::Box2D::Box2DCollision> & c)
+static void
+handle_collision(const Glib::RefPtr<Clutter::Box2D::Box2DCollision>& c)
 {
-  std::cout << "Collision detected" << std::endl;
+  //  std::cout << "Collision detected with " << c->get_actor1() << std::endl;
 }
 
 static void
@@ -48,7 +48,7 @@ int main(int argc, char *argv[])
     // uncommented in cluttermm. This depends on a clutter release with
     // clutter bug #1033 fixed.
     // initialize the C++ wrapper types
-    Clutter::init(&argc, &argv); //, context);
+    Clutter::Box2D::init(&argc, &argv); //, context);
   }
   catch(const Glib::Exception& ex)
   {
@@ -75,6 +75,7 @@ int main(int argc, char *argv[])
   box2d->add_actor(ground1);
   box2d->set_child_mode(ground1, Clutter::Box2D::BOX2D_STATIC);
 
+  Glib::RefPtr<Clutter::Box2D::Box2DCollision> col = Clutter::Box2D::Box2DCollision::create();
   Glib::RefPtr<Clutter::Box2D::Box2DChild> b2dchild = Glib::RefPtr<Clutter::Box2D::Box2DChild>::cast_static(box2d->get_child_meta(ground1)); 
   b2dchild->signal_collision().connect(sigc::ptr_fun(&handle_collision));
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]