示例#1
0
	def pediaShow(self):
		global g_TraitUtilInitDone
		if not g_TraitUtilInitDone:
			TraitUtil.init()
			g_TraitUtilInitDone = True
		self.iActivePlayer = gc.getGame().getActivePlayer()
		self.iCategory = -1
		if (not self.pediaHistory):
			self.pediaHistory.append((SevoScreenEnums.PEDIA_MAIN, SevoScreenEnums.PEDIA_TECHS))
		current = self.pediaHistory.pop()
		self.pediaFuture = []
		self.pediaHistory = []
		self.pediaJump(current[0], current[1], False, True)
    def interfaceScreen(self, iConcept):
        self.iLeader = -1
        self.iConcept = iConcept
        info = gc.getNewConceptInfo(iConcept)
        sKey = info.getType()
        sKey = sKey[sKey.find("TRAIT_"):]
        self.iTrait = gc.getInfoTypeForString(sKey)

        screen = self.top.getScreen()

        screen.addPanel(self.top.getNextWidgetName(), "", "", False, False,
                        self.X_MAIN_PANE, self.Y_MAIN_PANE, self.W_MAIN_PANE,
                        self.H_MAIN_PANE, PanelStyles.PANEL_STYLE_BLUE50)
        screen.addPanel(self.top.getNextWidgetName(), "", "", False, False,
                        self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON,
                        PanelStyles.PANEL_STYLE_MAIN)
        screen.addDDSGFC(self.top.getNextWidgetName(),
                         TraitUtil.getButton(self.iTrait),
                         self.X_ICON + self.W_ICON / 2 - self.ICON_SIZE / 2,
                         self.Y_ICON + self.H_ICON / 2 - self.ICON_SIZE / 2,
                         self.ICON_SIZE, self.ICON_SIZE,
                         WidgetTypes.WIDGET_GENERAL, -1, -1)

        self.placeLeaders()
        self.placeSpecial()
        self.placeText()
	def interfaceScreen(self, iConcept):
		self.iLeader = -1
		self.iConcept = iConcept
		info = gc.getNewConceptInfo(iConcept)
		sKey = info.getType()
		sKey = sKey[sKey.find("TRAIT_"):]
		self.iTrait = gc.getInfoTypeForString(sKey)
		
		screen = self.top.getScreen()

		screen.addPanel( self.top.getNextWidgetName(), "", "", False, False, self.X_MAIN_PANE, self.Y_MAIN_PANE, self.W_MAIN_PANE, self.H_MAIN_PANE, PanelStyles.PANEL_STYLE_BLUE50)
		screen.addPanel(self.top.getNextWidgetName(), "", "", False, False, self.X_ICON, self.Y_ICON, self.W_ICON, self.H_ICON, PanelStyles.PANEL_STYLE_MAIN)
		screen.addDDSGFC(self.top.getNextWidgetName(), TraitUtil.getButton(self.iTrait), self.X_ICON + self.W_ICON/2 - self.ICON_SIZE/2, self.Y_ICON + self.H_ICON/2 - self.ICON_SIZE/2, self.ICON_SIZE, self.ICON_SIZE, WidgetTypes.WIDGET_GENERAL, -1, -1 )

		self.placeLeaders()
		self.placeSpecial()
		self.placeText()
示例#4
0
 def getDescription(self):
     return u"%c %s" % (TraitUtil.getIcon(
         self.eTrait), self.traitInfo.getDescription())
				def getDescription(self):
					return u"%c %s" % (TraitUtil.getIcon(self.eTrait), self.traitInfo.getDescription())