dryatu  committed d9fb404

Fixed the py2exe script. Added a notifying popup when game saving fails.

  • Participants
  • Parent commits 4bebff9
  • Branches default

Comments (0)

Files changed (5)

File FatxFast/gui/

             scene = scenes[scenename]
         except KeyError:
-            raise SceneLoadError(scenename)
+            raise SceneLoadError(str(scenename))
             caller.widgets = {}
             self._create_composite_hierarchy(caller, scene)

File FatxFast/rsc/widgets.xml

     <rageframe type="containerwidget" y="600" width="200" x="50" height="20" bgcolor="transblack-gui" border-width="1" border-color="grey7" />
     <flippedminimap type="boxwidget" name="minimap" y="5" width="160" x="400" height="160" border-width="2" border-color="grey20" />
-    <minimap type="boxwidget" name="minimap" y="430" width="200" x="750" height="200" border-width="2" border-color="grey7" />
+    <minimap type="boxwidget" name="minimap" y="430" width="200" x="750" height="200" border-width="2" border-color="grey20" />
     <fullmap type="boxwidget" name="minimap" y="0" width="960" x="0" height="650" border-width="5" border-color="grey7" />
 	<buffwidget type="boxwidget" y="auto" width="100" height="64"></buffwidget>
 	<bufftext name="bufftext" type="textwidget" y="17" x="17" size="22" color="gold3" font="lavoir.ttf"></bufftext>
             <popuptext y="18" />
+    <notifyscene>
+        <popup>
+            <popuptext y="18" />
+        </popup>
+    </notifyscene>
     	<popup x="450" y="150" width="150">
     		<popuptext handler="change_hotkey" y="18">

File FatxFast/scenes/

             super(PopupScene, self).key_pressed(key, utf, mod)
+class NotifyScene(PopupScene):
+    def key_pressed(self, key, utf, mod):
+        self.manager.pop_scene()
 class GameEndScene(PopupScene):
     def __init__(self, manager, **kwargs):
     def save_to_save(self): 
-        if self.gamescene:
-            self.gamescene.save_game(
+        if not self.gamescene or not self.gamescene.save_game(
+            self.manager.push_scene("notifyscene", 
+                text="Failed to save. \nGame must be running!")
     def key_pressed(self, key, utf, mod):
         super(AskLoadScene, self).key_pressed(key, utf, mod)

File FatxFast/scenes/

         "askloadscene": popupscenes.AskLoadScene,
         "gamescene": gamescene.GameScene,
         "popupscene": popupscenes.PopupScene,
+        "notifyscene": popupscenes.NotifyScene,
         "gameendscene": popupscenes.GameEndScene
     def __init__(self, game, **kwargs):
 if __name__ == '__main__':
-    if not (sys.platform("win32") or sys.platform("cygwin")):
+    if not (sys.platform == "win32" or sys.platform == "cygwin"):
         sys.exit("Only use this to build windows binaries!")
     if, 2):