def drawInfo (self, bInitial):
# ExoticForPrint ("Entered drawInfo")
screen = self.getScreen()
# Get the Players
objActivePlayer = gc.getPlayer(self.iActiveLeader)
# Put everything inside a main panel, so we get vertical scrolling
mainPanelName = self.getNextWidgetName()
screen.addPanel(mainPanelName, "", "", True, True, 50, 100, self.W_SCREEN - 100, self.H_SCREEN - 200, PanelStyles.PANEL_STYLE_EMPTY)
ltCivicOptions = range (gc.getNumCivicOptionInfos())
# loop through all players and display leaderheads
# Their leaderheads
for iLoopPlayer in range(gc.getMAX_PLAYERS()):
objLoopPlayer = gc.getPlayer(iLoopPlayer)
if (iLoopPlayer != self.iActiveLeader and objLoopPlayer.isAlive() and (gc.getTeam(objLoopPlayer.getTeam()).isHasMet(objActivePlayer.getTeam()) or gc.getGame().isDebugMode()) and not objLoopPlayer.isBarbarian() and not objLoopPlayer.isMinorCiv()):
objLeaderHead = gc.getLeaderHeadInfo (objLoopPlayer.getLeaderType())
# Player panel
playerPanelName = self.getNextWidgetName()
screen.attachPanel(mainPanelName, playerPanelName, objLoopPlayer.getName(), "", False, True, PanelStyles.PANEL_STYLE_MAIN)
# screen.attachLabel(playerPanelName, "", " ")
screen.attachImageButton(playerPanelName, "", objLeaderHead.getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_LEADERHEAD, iLoopPlayer, -1, False)
infoPanelName = self.getNextWidgetName()
screen.attachPanel(playerPanelName, infoPanelName, "", "", False, False, PanelStyles.PANEL_STYLE_EMPTY)
szPlayerReligion = ""
if (objLoopPlayer.isStateReligion()):
nReligion = objLoopPlayer.getStateReligion()
objReligion = gc.getReligionInfo (nReligion)
# religionName = self.getNextWidgetName()
if (objLoopPlayer.hasHolyCity (nReligion)):
szPlayerReligion = u"%c" %(objReligion.getHolyCityChar())
elif objReligion:
szPlayerReligion = u"%c" %(objReligion.getChar())
if (objActivePlayer.isStateReligion() and nReligion == objActivePlayer.getStateReligion()):
szPlayerReligion += " *"
screen.attachTextGFC(infoPanelName, "", szPlayerReligion, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
screen.attachTextGFC(infoPanelName, "", localText.getText("TXT_KEY_FOREIGN_ADVISOR_TRADE", (self.calculateTrade (self.iActiveLeader, iLoopPlayer), 0)), FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
screen.attachTextGFC(infoPanelName, "", localText.getText("TXT_KEY_CIVICS_SCREEN_TITLE", ()) + ":", FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
for nCivicOption in ltCivicOptions:
nCivic = objLoopPlayer.getCivics (nCivicOption)
screen.attachImageButton (infoPanelName, "", gc.getCivicInfo (nCivic).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIVIC, nCivic, 1, False)
nFavoriteCivic = objLeaderHead.getFavoriteCivic()
screen.attachTextGFC(infoPanelName, "", localText.getText("TXT_KEY_PEDIA_FAV_CIVIC", ()) + ":", FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
objCivicInfo = gc.getCivicInfo (nFavoriteCivic)
screen.attachImageButton (infoPanelName, "", objCivicInfo.getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_CIVIC, nFavoriteCivic, 1, False)
screen.attachTextGFC(infoPanelName, "", "(" + gc.getCivicOptionInfo (objCivicInfo.getCivicOptionType()).getDescription() + ")", FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)
if (objActivePlayer.isCivic (nFavoriteCivic)):
screen.attachTextGFC(infoPanelName, "", "*", FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1)