Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Aguiar <alanjas@hotmail.com>2012-03-19 02:14:07 (GMT)
committer Alan Aguiar <alanjas@hotmail.com>2012-03-19 02:14:07 (GMT)
commit5964655a3fb3a1a081a4433579867d06ad1f0ab4 (patch)
tree7589d98863cf91b05e0a243715190f3e2721b387
parentb54facefdde3fb90f5e4b53287ae1870f5909479 (diff)
add back button on a1g3
-rwxr-xr-xsrc/states/Area1Game3.py52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/states/Area1Game3.py b/src/states/Area1Game3.py
index 5bbc8e7..4e63984 100755
--- a/src/states/Area1Game3.py
+++ b/src/states/Area1Game3.py
@@ -1,3 +1,55 @@
import pygame
+import api.Game
+from api.Game import CGame
+
+import states.GameState
+from states.GameState import CGameState
+
+import api.Button
+from api.Button import CButton
+
+import MenuState
+from MenuState import *
+
+import sys
+sys.path.insert(0, 'assets/data')
+
+import area1game3_data
+
+
+class CArea1Game3(CGameState):
+ mBackground = None
+ mInstructions = None
+
+ mButtonBack = None
+
+ def init(self):
+ CGameState.init(self)
+
+ self.mButtonBack = CButton()
+ #TODO: Create a function to create image.
+ self.mButtonBack.set_bgColor((0x99, 0x99, 0x66))
+ self.mButtonBack.font = pygame.font.Font('assets/fonts/fipps.ttf', 20)
+ self.mButtonBack.setCenter((110, 650))
+ self.mButtonBack.set_size((200, 40))
+ self.mButtonBack.set_text('Volver')
+ CGame().addChild(self.mButtonBack)
+
+ def update(self):
+ CGameState.update(self)
+
+ if self.mButtonBack.clicked():
+ print "clicked back of a1g3"
+ #cs = CHelpState()
+ ms = MenuState.CMenuState()
+ CGame().setState(ms)
+
+
+ def destroy(self):
+ CGameState.destroy(self)
+ #self.mInstructions.destroy()
+ self.mInstructions = None
+ CGame().removeChild(self.mButtonBack)
+ self.mButtonBack = None \ No newline at end of file