home *** CD-ROM | disk | FTP | other *** search
/ GameStar 2006 January / Gamestar_80_2006-01_dvd.iso / Dema / Civilization4 / data1.cab / Civ4DemoComponent / Assets / Python / Screens / CvPediaScreen.py < prev    next >
Encoding:
Python Source  |  2005-11-09  |  577 b   |  22 lines

  1. ## Sid Meier's Civilization 4
  2. ## Copyright Firaxis Games 2005
  3. # Sid Meier's Civilization 4
  4. # Copyright Firaxis Games 2005
  5. #
  6. # CvScreen - Base class for all of the Screens
  7.  
  8. from CvPythonExtensions import *
  9. import CvUtil
  10. import CvScreen
  11.  
  12. class CvPediaScreen( CvScreen.CvScreen ):
  13.     "Civilopedia Base Screen"
  14.     
  15.     def getSortedList( self, numInfos, getInfo ):
  16.         ' returned a list of infos sorted alphabetically '
  17.         infoList = [(0,0)] * numInfos
  18.         for i in range( numInfos ):
  19.             infoList[i] = (getInfo(i).getDescription(), i)
  20.         infoList.sort()
  21.         return infoList
  22.