def placeBuilding(self):
screen = self.top.getScreen()
panelName = self.top.getNextWidgetName()
screen.addPanel(panelName, localText.getText("TXT_KEY_UNIQUE_BUILDINGS", ()), "", False, True, self.X_BUILDING, self.Y_BUILDING, self.W_BUILDING, self.H_BUILDING, PanelStyles.PANEL_STYLE_BLUE50)
screen.attachLabel(panelName, "", " ")
for iBuilding in range(gc.getNumBuildingClassInfos()):
iUniqueBuilding = gc.getCivilizationInfo(self.iCivilization).getCivilizationBuildings(iBuilding)
iDefaultBuilding = gc.getBuildingClassInfo(iBuilding).getDefaultBuildingIndex()
if (iDefaultBuilding > -1 and iUniqueBuilding > -1 and iDefaultBuilding != iUniqueBuilding and iUniqueBuilding != con.iIberianTradingCompany):
screen.attachImageButton(panelName, "", gc.getBuildingInfo(iUniqueBuilding).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, iUniqueBuilding, 1, False)
if self.iCivilization == con.iCivAmerica:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iAmeEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iAmeEmbassy, 1, False)
if self.iCivilization == con.iCivArabia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iAraEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iAraEmbassy, 1, False)
[B] if self.iCivilization == con.iCivArgentina:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iArgEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iArgEmbassy, 1, False)
if self.iCivilization == con.iCivAztec:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iAztEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iAztEmbassy, 1, False)
[/B]
if self.iCivilization == con.iCivBabylonia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iBabEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iBabEmbassy, 1, False)
if self.iCivilization == con.iCivBrazil:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iBraEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iBraEmbassy, 1, False)
if self.iCivilization == con.iCivByzantium:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iByzEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iByzEmbassy, 1, False)
if self.iCivilization == con.iCivCanada:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iCanEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iCanEmbassy, 1, False)
if self.iCivilization == con.iCivCarthage:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iCarEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iCarEmbassy, 1, False)
if self.iCivilization == con.iCivChina:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iChiEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iChiEmbassy, 1, False)
if self.iCivilization == con.iCivColombia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMayEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMayEmbassy, 1, False)
if self.iCivilization == con.iCivEgypt:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iEgyEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iEgyEmbassy, 1, False)
if self.iCivilization == con.iCivEngland:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iEngEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iEngEmbassy, 1, False)
if self.iCivilization == con.iCivEthiopia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iEthEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iEthEmbassy, 1, False)
if self.iCivilization == con.iCivFrance:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iFraEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iFraEmbassy, 1, False)
if self.iCivilization == con.iCivGermany:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iGerEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iGerEmbassy, 1, False)
if self.iCivilization == con.iCivGreece:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iGreEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iGreEmbassy, 1, False)
if self.iCivilization == con.iCivHolyRoman:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.HreEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.HreEmbassy, 1, False)
if self.iCivilization == con.iCivInca:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iIncEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iIncEmbassy, 1, False)
if self.iCivilization == con.iCivIndia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iIndEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iIndEmbassy, 1, False)
if self.iCivilization == con.iCivIndonesia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iInoEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iInoEmbassy, 1, False)
if self.iCivilization == con.iCivIran:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iPerEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iPerEmbassy, 1, False)
if self.iCivilization == con.iCivItaly:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iItaEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iItaEmbassy, 1, False)
if self.iCivilization == con.iCivJapan:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iJapEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iJapEmbassy, 1, False)
if self.iCivilization == con.iCivKhmer:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iKhmEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iKhmEmbassy, 1, False)
if self.iCivilization == con.iCivKongo:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iConEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iConEmbassy, 1, False)
if self.iCivilization == con.iCivKorea:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iKorEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iKorEmbassy, 1, False)
if self.iCivilization == con.iCivMali:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMalEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMalEmbassy, 1, False)
if self.iCivilization == con.iCivMaya:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMayEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMayEmbassy, 1, False)
if self.iCivilization == con.iCivMexico:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iAztEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iAztEmbassy, 1, False)
if self.iCivilization == con.iCivMongol:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMonEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMonEmbassy, 1, False)
if self.iCivilization == con.iCivMoors:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMooEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMooEmbassy, 1, False)
if self.iCivilization == con.iCivMughals:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iMugEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iMugEmbassy, 1, False)
if self.iCivilization == con.iCivNetherlands:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iHolEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iHolEmbassy, 1, False)
if self.iCivilization == con.iCivOttomans:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iTurEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iTurEmbassy, 1, False)
if self.iCivilization == con.iCivPersia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iPerEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iPerEmbassy, 1, False)
if self.iCivilization == con.iCivPoland:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iPolEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iPolEmbassy, 1, False)
if self.iCivilization == con.iCivPortugal:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iPorEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iPorEmbassy, 1, False)
if self.iCivilization == con.iCivPolynesia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iPlyEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iPlyEmbassy, 1, False)
if self.iCivilization == con.iCivRome:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iRomEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iRomEmbassy, 1, False)
if self.iCivilization == con.iCivRussia:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iRusEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iRusEmbassy, 1, False)
if self.iCivilization == con.iCivSpain:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iSpaEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iSpaEmbassy, 1, False)
if self.iCivilization == con.iCivTamils:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iTamEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iTamEmbassy, 1, False)
if self.iCivilization == con.iCivThailand:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iThaEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iThaEmbassy, 1, False)
if self.iCivilization == con.iCivTibet:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iTibEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iTibEmbassy, 1, False)
if self.iCivilization == con.iCivViking:
screen.attachImageButton(panelName, "", gc.getBuildingInfo(con.iVikEmbassy).getButton(), GenericButtonSizes.BUTTON_SIZE_CUSTOM, WidgetTypes.WIDGET_PEDIA_JUMP_TO_BUILDING, con.iVikEmbassy, 1, False)