Changeset 259 for branches/lightweight/src/pyspacewar/ui.py
- Timestamp:
- 01/10/07 02:42:04 (5 years ago)
- Files:
-
- 1 modified
-
branches/lightweight/src/pyspacewar/ui.py (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/lightweight/src/pyspacewar/ui.py
r258 r259 37 37 'P1_BACKWARD': K_DOWN, 38 38 'P1_BRAKE': K_RALT, 39 'P1_FIRE': K_RCTRL,39 'P1_FIRE': [K_RETURN, K_RCTRL], 40 40 # Player 2 41 41 'P2_TOGGLE_AI': K_2, … … 1830 1830 fullscreen = False # Start in windowed mode 1831 1831 fullscreen_mode = None # Desired video mode (w, h) 1832 show_missile_trails = True# Show missile trails by default1832 show_missile_trails = False # Show missile trails by default 1833 1833 show_background = False # Show background image 1834 1834 music = True # Do we have background music? … … 1839 1839 desired_zoom_level = 1.0 # The desired zoom level 1840 1840 1841 min_fps = 10 # Minimum FPS 1841 min_fps = 10 # Minimum FPS (don't drop frames below this) 1842 1842 1843 1843 ship_colors = [ … … 1868 1868 self.rev_controls = {} 1869 1869 for action, key in DEFAULT_CONTROLS.items(): 1870 self.set_control(action, key) 1870 if isinstance(key, (list, tuple)): 1871 for key in key: 1872 self.set_control(action, key) 1873 else: 1874 self.set_control(action, key) 1871 1875 1872 1876 def load_settings(self, filename=None): 1873 1877 """Load settings from a configuration file.""" 1874 1878 if not filename: 1875 filename = os.path.expanduser('~/.pyspacewar rc')1879 filename = os.path.expanduser('~/.pyspacewarliterc') 1876 1880 config = self.get_config_parser() 1877 1881 config.read([filename]) … … 1985 1989 # Sadly, my laptop is not fast enough to sustain 20 fps at 1024x768 1986 1990 # when there are too many missiles around. 1987 return (800, 600) 1991 # The Nokia 770 has a 800x480 screen. 1992 return (800, 480) 1988 1993 1989 1994 def _set_display_mode(self):
