Changeset 406


Ignore:
Timestamp:
04/06/2012 08:44:50 PM (3 years ago)
Author:
jelinson
Message:

additional files

Location:
src
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • src/buildMenuEntry.py

    r389 r406  
    1919        self.info = Info()
    2020        self.info.createFromBuilding(building, False, self.able)
    21        
     21
    2222        buildingStats = self.building.stats.contSpecs.getAllStats()
    2323        self.stats = Stats((600,375),False, buildingStats,isBuilding=True)
  • src/stats.py

    r400 r406  
    4040        for window in self.subwindows:
    4141            window.update(state)
     42           
     43    def event(self, e):
     44        """
     45            custom event handler to close subwindows of
     46            penultimate menu entry
     47
     48            **should be consolidated with inGameMenu**
     49
     50            input type: pygame.event
     51            output type: boolean
     52        """
     53        for i, window in enumerate(self.subwindows):
     54            if window.isVisible() == True and window.event(e) == True:
     55                for j in range(len(self.subwindows)):
     56                    if i != j:
     57                        self.subwindows[j].closeSubWindows()
     58
     59                self.subwindows.remove(window)
     60                self.subwindows.insert(0, window)
     61                return True
     62
     63        if self.response(e) == True:
     64            return True
     65
     66        else:
     67            return False
Note: See TracChangeset for help on using the changeset viewer.