Ignore:
Timestamp:
07/27/10 10:20:23 (10 years ago)
Author:
beliar
Message:

Patch by Beliar.

  • Dropping items menu action now only shows when right-clicking on an item in the players inventory
  • Actions that are supposed to happen when a key is pressed now work again.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/game/scripts/gamescenecontroller.py

    r595 r600  
    1717 
    1818from controllerbase import ControllerBase 
    19 from datetime import date, time 
     19from datetime import datetime 
    2020from fife import fife 
    2121from scripts.gui.hud import Hud 
     
    5757        # Last saved mouse coords         
    5858        self.last_mousecoords = None 
    59          
     59        self.action_number = 1 
     60 
    6061        self.mouse_callback = None 
    6162 
     
    9091        if(key_val == key.Q): 
    9192            # we need to quit the game 
    92             self.hud.quitGame() 
     93            self.view.hud.quitGame() 
    9394        if(key_val == key.T): 
    94             self.active_map.toggleRenderer('GridRenderer') 
     95            self.model.active_map.toggleRenderer('GridRenderer') 
    9596        if(key_val == key.F1): 
    9697            # display the help screen and pause the game 
    97             self.hud.displayHelp() 
     98            self.view.hud.displayHelp() 
    9899        if(key_val == key.F5): 
    99             self.active_map.toggleRenderer('CoordinateRenderer') 
     100            self.model.active_map.toggleRenderer('CoordinateRenderer') 
    100101        if(key_val == key.F7): 
    101102            # F7 saves a screenshot to fife/clients/parpg/screenshots 
    102             screenshot_file = "screenshots/screen-%s-%s.png" % \ 
    103                     (date.today().strftime('%Y-%m-%d'),\ 
    104                     time.strftime('%H-%M-%S')) 
     103             
     104            screenshot_file = "screenshots/screen-%s.png" % \ 
     105                    (datetime.now().strftime('%Y-%m-%d-%H-%M-%S')) 
    105106            print "PARPG: Saved:", screenshot_file 
    106107            self.engine.getRenderBackend().captureScreen(screenshot_file) 
     
    110111        if(key_val == key.I): 
    111112            # I opens and closes the inventory 
    112             self.hud.toggleInventory() 
     113            self.view.hud.toggleInventory() 
    113114        if(key_val == key.A): 
    114115            # A adds a test action to the action box 
     
    116117            # Action 2, etc. 
    117118            self.view.hud.addAction("Action " + str(self.action_number)) 
    118             self.view.action_number += 1 
     119            self.action_number += 1 
    119120        if(key_val == key.ESCAPE): 
    120121            # Escape brings up the main menu 
Note: See TracChangeset for help on using the changeset viewer.