Changeset 72


Ignore:
Timestamp:
05/20/09 04:04:16 (10 years ago)
Author:
bretzel_parpg
Message:

Screenshots now appear in the form of screen-month-day-year-hour:minutes:seconds
There was a TODO for this already in world.py, so I figured I would just do that real quick!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/scripts/world.py

    r71 r72  
    1717 
    1818import fife 
     19import time 
    1920from datetime import date 
    2021from scripts.common.eventlistenerbase import EventListenerBase 
     
    2425from settings import Setting 
    2526from scripts import inventory 
     27from scripts import hud 
    2628 
    2729TDS = Setting() 
     
    159161        if(keyval == key.F7): 
    160162            # F7 saves a screenshot to fife/clients/parpg/screenshots 
    161             # TODO: add a time stamp as well as a date stamp 
    162             t = "screenshots/screen-%s.png" % date.today().strftime('%Y-%m-%d') 
     163            t = "screenshots/screen-%s-%s.png" % (date.today().strftime('%Y-%m-%d'), 
     164                                                  time.strftime('%H:%M:%S')) 
    163165            self.engine.getRenderBackend().captureScreen(t) 
    164166        if(keyval == key.I): 
     167            # I opens and closes the inventory 
    165168            self.displayInventory() 
    166169             
Note: See TracChangeset for help on using the changeset viewer.