Changeset 448


Ignore:
Timestamp:
12/13/09 17:58:15 (9 years ago)
Author:
eliedebrauwer
Message:

Ticket #240: Patch by eliedebrauwer. Fixed the coordindate renderer, seems that the camera's moved away from world to map, and the coordinate rendere which originally was a property of world also got removed. fixes[s:trac, t:240]

Location:
trunk/game/scripts
Files:
3 edited

Legend:

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

    r446 r448  
    7777        @return: The resultstring""" 
    7878 
    79         self.app_listener.world.active_map.toggle_renderer('GridRenderer') 
     79        self.app_listener.world.active_map.toggleRenderer('GridRenderer') 
    8080        return "Grid toggled" 
    8181 
  • trunk/game/scripts/map.py

    r446 r448  
    148148        self.data.view.active_map = self 
    149149 
    150                  
    151150    def addPC(self): 
    152151        """Add the player character to the map 
     
    163162 
    164163         
    165     def toggle_renderer(self, r_name): 
     164    def toggleRenderer(self, r_name): 
    166165        """Enable or disable a renderer. 
    167166           @return: None""" 
  • trunk/game/scripts/world.py

    r446 r448  
    154154            self.hud.quitGame() 
    155155        if(key_val == key.T): 
    156             self.active_map.toggle_renderer('GridRenderer') 
     156            self.active_map.toggleRenderer('GridRenderer') 
    157157        if(key_val == key.F1): 
    158158            # display the help screen and pause the game 
    159159            self.hud.displayHelp() 
    160160        if(key_val == key.F5): 
    161             # logic would say we use similar code to above and toggle 
    162             # logic here does not work, my friend :-( 
    163             self.cord_render.setEnabled(not self.cord_render.isEnabled()) 
     161            self.active_map.toggleRenderer('CoordinateRenderer') 
    164162        if(key_val == key.F7): 
    165163            # F7 saves a screenshot to fife/clients/parpg/screenshots 
     
    329327                        return None 
    330328        else: 
    331             return None          
     329            return None 
    332330 
    333331    def getCoords(self, click): 
Note: See TracChangeset for help on using the changeset viewer.