Changeset 168


Ignore:
Timestamp:
06/30/09 02:43:13 (10 years ago)
Author:
bretzel_parpg
Message:

When you select open on a crate, it now will pop up a window displaying the contents of the crate
(which right now are just a bunch of backpack images)

Location:
trunk/PARPG
Files:
2 added
2 edited

Legend:

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

    r162 r168  
    254254                    # is it a container? 
    255255                    if(i.container == True): 
    256                         actions.append(["Open", "Open", self.nullFunc, i]) 
     256                        actions.append(["Open", "Open", self.view.createBoxGUI, i]) 
    257257                    # can you pick it up? 
    258258                    if(i.carryable == True): 
  • trunk/PARPG/scripts/world.py

    r167 r168  
    2727from settings import Setting 
    2828from scripts import inventory, hud 
     29from scripts.gui_container import ContainerGUI 
    2930from scripts.context_menu import ContextMenu 
    3031from pychan.tools import callbackWithArguments as cbwa 
     
    409410        self.load_browser.showBrowser() 
    410411 
     412    def createBoxGUI(self, obj): 
     413        """ 
     414        Creates a window to display the contents of a box 
     415         
     416        @type obj: ??? 
     417        @param obj: ??? 
     418        """ 
     419        c = ContainerGUI(self.engine, unicode("Box"), "gui/inv_images/inv_backpack.png") 
     420        c.showContainer() 
     421 
    411422    def pump(self): 
    412423        """Routine called during each frame. Our main loop is in ./run.py 
Note: See TracChangeset for help on using the changeset viewer.