[gcompris: 57/111] added gravity in every level and completed makefiles and configure in land_safe



commit db71270d816d1d1cabba4cfc1348eca737ac984a
Author: serah <serah4291 gmail com>
Date:   Fri Jul 13 19:39:24 2012 +0530

    added gravity in every level and completed makefiles and configure in land_safe

 configure.ac                                       |    4 +++
 src/land_safe-activity/Makefile.am                 |    5 +--
 src/land_safe-activity/init_path.sh                |    5 ++-
 src/land_safe-activity/land_safe.py                |   26 ++++++++++++++++++++
 .../resources/land_safe/Makefile.am                |    4 +--
 src/land_safe-activity/resources/land_safe/README  |    3 +-
 6 files changed, 38 insertions(+), 9 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index c894ece..8112ad1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -744,6 +744,9 @@ src/imagename-activity/resources/imagename/Makefile
 src/instruments-activity/Makefile
 src/instruments-activity/resources/Makefile
 src/instruments-activity/resources/instruments/Makefile
+src/land_safe-activity/Makefile
+src/land_safe-activity/resources/Makefile
+src/land_safe-activity/resources/land_safe/Makefile
 src/lang-activity/Makefile
 src/lang-activity/resources/Makefile
 src/lang-activity/resources/lang/Makefile
@@ -906,3 +909,4 @@ echo type sh configure --prefix=/usr
 echo
 echo type \'make\' to compile gcompris
 echo type \'make install\' to install it
+
diff --git a/src/land_safe-activity/Makefile.am b/src/land_safe-activity/Makefile.am
index 4f87d53..f437fa1 100644
--- a/src/land_safe-activity/Makefile.am
+++ b/src/land_safe-activity/Makefile.am
@@ -1,7 +1,6 @@
-# Passthrough, do not break uplevel make rule
-install-activity:
+include $(top_srcdir)/Makefile.activity
 
-SUBDIRS =
+SUBDIRS = resources
 
 pythondir = $(PYTHON_PLUGIN_DIR)
 
diff --git a/src/land_safe-activity/init_path.sh b/src/land_safe-activity/init_path.sh
index 037cb5a..607d793 100755
--- a/src/land_safe-activity/init_path.sh
+++ b/src/land_safe-activity/init_path.sh
@@ -3,6 +3,7 @@
 path=$1
 activity=land_safe
 plugindir=$path/../boards/.libs
-pythonplugindir=$path 
+pythonplugindir=$path
 resourcedir=$path/resources
-section="/experimental"
+section="/experience"
+
diff --git a/src/land_safe-activity/land_safe.py b/src/land_safe-activity/land_safe.py
index f5e2bf6..a4a3cfe 100644
--- a/src/land_safe-activity/land_safe.py
+++ b/src/land_safe-activity/land_safe.py
@@ -72,6 +72,31 @@ class Gcompris_land_safe:
       )
     land.lower(None)
 
+    # Text for Gravity
+    gravity = str(0.58 * self.gcomprisBoard.level)
+    text = 'Gravity : ' + gravity
+    gravity_text = goocanvas.Text(
+      parent = self.rootitem,
+      x = 700,
+      y = 50,
+      fill_color = "white",
+      anchor = gtk.ANCHOR_CENTER,
+      alignment = pango.ALIGN_CENTER,
+      text = _(text))
+    bounds = gravity_text.get_bounds()
+    gap = 20
+
+    gravity_back = goocanvas.Rect(
+      parent = self.rootitem,
+      radius_x = 6,
+      radius_y = 6,
+      x = bounds.x1 - gap,
+      y = bounds.y1 - gap,
+      width = bounds.x2 - bounds.x1 + gap * 2,
+      height = bounds.y2 - bounds.y1 + gap * 2,
+      stroke_color_rgba = 0xFFFFFFFFL,
+      fill_color_rgba = 0xCCCCCC44L)
+
     # Load spaceship
     self.space_ship = Spaceship(self,
                                 self.rootitem,
@@ -488,6 +513,7 @@ class Display:
     self.stop_consumtion = False
     self.set_fuel_time()
 
+
   def altitude(self, altitude, zoom): #display current altitude
     if zoom == False:
       self.alt = str(int(364 - altitude))
diff --git a/src/land_safe-activity/resources/land_safe/Makefile.am b/src/land_safe-activity/resources/land_safe/Makefile.am
index 51b567f..5e9a9ff 100644
--- a/src/land_safe-activity/resources/land_safe/Makefile.am
+++ b/src/land_safe-activity/resources/land_safe/Makefile.am
@@ -16,9 +16,7 @@ img_DATA = \
 	land4.png \
 	landing_area_green.png \
 	landing_area_red.png \
-	rocket.png 
+	rocket.png
 
 EXTRA_DIST = $(img_DATA)
 
-CLEANFILES =
-
diff --git a/src/land_safe-activity/resources/land_safe/README b/src/land_safe-activity/resources/land_safe/README
index 326f34b..cccabe9 100644
--- a/src/land_safe-activity/resources/land_safe/README
+++ b/src/land_safe-activity/resources/land_safe/README
@@ -1,2 +1,3 @@
-The rocket has been taken from openclipart.org and modified according to requirement.
+flames and crash.png taken from OpenClipart.org
+rocket.png also taken from openclipart.org and modified according to requirement.
 



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