###### Unit Buttons ######
pUnit = g_pSelectedUnit
iUnitType = pUnit.getUnitType()
pUnitOwner = gc.getPlayer(pUnit.getOwner())
if pUnitOwner.isTurnActive():
if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_SUBMARINE"):
if pUnit.isMadeAttack() == false and pUnit.canMove():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,665, 665, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if iUnitType == CvUtil.findInfoTypeNum(gc.getUnitInfo, gc.getNumUnitInfos(), "UNIT_ATTACK_SUBMARINE"):
if pUnit.canMove():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("SUB2").getPath(), 0, WidgetTypes.WIDGET_GENERAL,666, 666, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,667, 667, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaTotalMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("BALAS4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,668, 668, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL1").getPath(), 0, WidgetTypes.WIDGET_GENERAL,669, 669, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeSerRecargadaTotalCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("FUEL4").getPath(), 0, WidgetTypes.WIDGET_GENERAL,670, 670, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeRepartirMuniciones():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("MUNICION").getPath(), 0, WidgetTypes.WIDGET_GENERAL,671, 671, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1
if pUnit.puedeRepartirCombustible():
screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("COMBUSTIBLE").getPath(), 0, WidgetTypes.WIDGET_GENERAL,672, 672, False )
screen.show( "BottomButtonContainer" )
iCount = iCount + 1