EmperorFool
Deity
Yes, I should be around most of tomorrow. That's a good first step. It will make plugging in whatever you or I create much easier later.
CyInterface().cacheInterfacePlotUnits(pPlot)
for i in range(CyInterface().getNumCachedInterfacePlotUnits()):
pLoopUnit = CyInterface().getCachedInterfacePlotUnit(i)
if ((iCount == 0) and (CyInterface().getPlotListColumn() > 0)):
bLeftArrow = True
elif ((iCount == (gc.getMAX_PLOT_LIST_ROWS() * self.numPlotListButtons() - 1)) and ...
CyInterface().getPlotListColumn()
CyInterface().getPlotListOffset()
for iIndex in range(self.MaxCells):
szBupCell = self._getCellWidget(iIndex)
iX = self._getX(self._getCol(iIndex))
iY = self._getY(self._getRow(iIndex))
screen.addCheckBoxGFCAt(self.sBupPanel, szBupCell, sTexture, sHiLiteTexture, iX, iY, 32, 32, WidgetTypes.WIDGET_PLOT_LIST, iIndex, -1, ButtonStyles.BUTTON_STYLE_LABEL, True)
iIndex = CyInterface().getPlotListOffset()
for pBupUnit in self.BupUnits:
szBupCell = self._getCellWidget(iIndex)
self.screen.changeImageButton(szBupCell, gc.getUnitInfo(pBupUnit.pUnit.getUnitType()).getButton())
self.screen.show(szBupCell)
iIndex += 1
timer = BugUtil.Timer("draw plot list")
...
timer.log()
No, no, no, a little, yes and yes. I think I got that right. Its not ready for prime time yet ... still need to allow for the situation where there are too many units on the plot (those little arrow things), for when the city screen is up (only 1 row) and also need to include non-player units.Gotta say, that's pretty sweet! Have you done some thorough testing with things like promoting units, upgrading, attacking, issuing orders, grouping, ungrouping, selecting units, etc?