Commits

illume committed 454af68

Added some notes about the icon in the README.

Added a skelutil.py which has information about the data dir.

  • Participants
  • Parent commits 6a04f8f

Comments (0)

Files changed (2)

templatefiles/README.txt

 Development notes 
 -----------------
 
+icon.png
+--------
+This is used for the pygame subset for android game runner.
+
+Fill this image in with your game icon.
+
+
 creating a source distribution
 ------------------------------
 

templatefiles/yourgamedir/skelutil.py

+
+
+_DATA_DIR = None
+def data_dir(*args):
+    """ data_dir() returns the path to where the data is stored.  
+        Use it like os.path.join() where the first part of the path 
+        is the data dir.
+    """
+    global _DATA_DIR
+    if _DATA_DIR is None:
+        _DATA_DIR = os.path.join('yourgamename', 'data')
+        if not os.path.exists(_DATA_DIR):
+            _DATA_DIR = os.path.join(os.path.split(__file__)[0], 'data')
+    return os.path.join(*([_DATA_DIR] + list(args)))
+