iBtnWidth = 16
iX = xResolution
iY = yResolution - iBtnWidth * 7
lAdvisorIcons = ["[ICON_STRENGTH]", "[ICON_RELIGION]", "[ICON_GOLD]", "[ICON_RESEARCH]", "[ICON_CULTURE]", "[ICON_FOOD]"]
for i in xrange(6):
sText = CyTranslator().getText(lAdvisorIcons[i], ())
if self.lAdvisors[i]:
sText = CyTranslator().getText("[COLOR_RED]", ()) + " X" + "</color>"
screen.setText("AdvisorFilter" + str(i), "Background", "<font=2>" + sText + "</font>", CvUtil.FONT_LEFT_JUSTIFY, iX - 350, iY, -0.1, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_PYTHON, 7001, i) ##advisor filter position ##
iY += iBtnWidth
[COLOR="Red"]sText = " P"[/COLOR]
if self.bPrereq:
sText = CyTranslator().getText("[COLOR_RED]", ()) + " X" + "</color>"
screen.setText("PrereqFilter", "Background", "<font=2>" + sText + "</font>", CvUtil.FONT_LEFT_JUSTIFY, iX, iY, -0.1, FontTypes.TITLE_FONT, WidgetTypes.WIDGET_PYTHON, 7001, -1)
iX = iMultiListXL
iMaxButtons = iWidth / iBtnWidth
if (self.iCombatLayer + 1) * iMaxButtons < (gc.getNumUnitCombatInfos() + 1):
screen.setButtonGFC("CombatLayerPlus", "", "", xResolution - iMultiListXR, iY, iBtnWidth, iBtnWidth, WidgetTypes.WIDGET_GENERAL, 1, -1, ButtonStyles.BUTTON_STYLE_ARROW_RIGHT)
if self.iCombatLayer > 0:
screen.setButtonGFC("CombatLayerMinus", "", "", iX - iBtnWidth, iY, iBtnWidth, iBtnWidth, WidgetTypes.WIDGET_GENERAL, 1, -1, ButtonStyles.BUTTON_STYLE_ARROW_LEFT)
iStart = self.iCombatLayer * iMaxButtons
if self.bPrereq and not pHeadSelectedCity.canConstruct(eLoopBuilding, False, False, False): continue
if isLimitedWonderClass(i):
# All of the hides...
self.setMinimapButtonVisibility(False)
[COLOR="Red"]screen.hideList( 0 )[/COLOR]
for i in xrange (gc.getNumBuildingClassInfos()):
if not isLimitedWonderClass(i):
eLoopBuilding = gc.getCivilizationInfo(pHeadSelectedCity.getCivilizationType()).getCivilizationBuildings(i)
if pHeadSelectedCity.canConstruct(eLoopBuilding, False, True, False):
## Advisor Filter ##
Info = gc.getBuildingInfo(eLoopBuilding)
iAdvisor = Info.getAdvisorType()
if iAdvisor > -1 and iAdvisor < len(self.lAdvisors):
if self.lAdvisors[iAdvisor]: continue
## Advisor Filter ##
## Prereq Filter ## [COLOR="DeepSkyBlue"]Added isenchine[/COLOR]
if self.bPrereq and not pHeadSelectedCity.canConstruct(eLoopBuilding, False, False, False): continue
## Prereq Filter ## [COLOR="deepskyblue"]Added isenchine[/COLOR]
screen.appendMultiListButton( "BottomButtonContainer", Info.getButton(), iRow, WidgetTypes.WIDGET_CONSTRUCT, i, -1, False )
if not pHeadSelectedCity.canConstruct(eLoopBuilding, False, False, False):
screen.disableMultiListButton( "BottomButtonContainer", iRow, iCount, Info.getButton() )
iCount += 1
if PlatyOptions.bBuildList:
screen.appendMultiListButton("BottomButtonContainer", CyArtFileMgr().getInterfaceArtInfo("INTERFACE_BUILD_WONDER").getPath(), iRow, WidgetTypes.WIDGET_GENERAL, -1, -1, False)
screen.disableMultiListButton("BottomButtonContainer", iRow, iCount, CyArtFileMgr().getInterfaceArtInfo("INTERFACE_BUILD_WONDER").getPath())
iCount += 1
else:
if iCount > 0:
iRow += 1
iCount = 0
for i in xrange(gc.getNumBuildingClassInfos()):
if isLimitedWonderClass(i):
eLoopBuilding = gc.getCivilizationInfo(pHeadSelectedCity.getCivilizationType()).getCivilizationBuildings(i)
if pHeadSelectedCity.canConstruct(eLoopBuilding, False, True, False):
## Advisor Filter ##
Info = gc.getBuildingInfo(eLoopBuilding)
iAdvisor = Info.getAdvisorType()
if iAdvisor > -1 and iAdvisor < len(self.lAdvisors):
if self.lAdvisors[iAdvisor]: continue
## Advisor Filter ##
## Prereq Filter ##
if self.bPrereq and not pHeadSelectedCity.canConstruct(eLoopBuilding, False, False, False): continue
## Prereq Filter ##