Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Old Code for comparison
- if eMultiList == "BottomButtonContainer":
- screen.show( "BottomButtonContainer" )
- elif eMultiList == "BottomButtonContainer2":
- screen.show( "BottomButtonContainer2" )
- elif eMultiList == "BottomButtonContainer3":
- screen.show( "BottomButtonContainer3" )
- if ( not CyInterface().canHandleAction(i, False) ):
- screen.disableMultiListButton( eMultiList, iRow, iCount, gc.getActionInfo(i).getButton() )
- if ( pHeadSelectedUnit.isActionRecommended(i) ):#or gc.getActionInfo(i).getCommandType() == CommandTypes.COMMAND_PROMOTION ):
- screen.enableMultiListPulse( eMultiList, True, 0, iCount )
- else:
- screen.enableMultiListPulse( eMultiList, False, 0, iCount )
- iCount = iCount + 1
- if (CyInterface().canCreateGroup()):
- screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer3" )
- iCount = iCount + 1
- if (CyInterface().canDeleteGroup()):
- screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer3" )
- iCount = iCount + 1
- #New Code Starts Here
- #Bug is caused be the changes between the two code blocks, not sure what exactly.
- if eMultiList == "BottomButtonContainer":
- screen.show( "BottomButtonContainer" )
- iCount = iCount + 1
- theCount = iCount
- elif eMultiList == "BottomButtonContainer2":
- screen.show( "BottomButtonContainer2" )
- iCount2 = iCount2 + 1
- theCount = iCount2
- elif eMultiList == "BottomButtonContainer3":
- screen.show( "BottomButtonContainer3" )
- iCount3 = iCount3 + 1
- theCount = iCount3
- if ( not CyInterface().canHandleAction(i, False) ):
- screen.disableMultiListButton( eMultiList, 0, theCount, szButton )
- if ( pHeadSelectedUnit.isActionRecommended(i) ):#or gc.getActionInfo(i).getCommandType() == CommandTypes.COMMAND_PROMOTION ):
- screen.enableMultiListPulse( eMultiList, True, 0, theCount )
- else:
- screen.enableMultiListPulse( eMultiList, False, 0, theCount )
- if xResolution >= g_iVeryHighRez and bValid:
- if (CyInterface().canCreateGroup()):
- screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer3" )
- iCount3 = iCount3 + 1
- if (CyInterface().canDeleteGroup()):
- screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer3" )
- iCount3 = iCount3 + 1
- else:
- if (CyInterface().canCreateGroup()):
- screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer" )
- iCount = iCount + 1
- if (CyInterface().canDeleteGroup()):
- screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
- screen.show( "BottomButtonContainer" )
- iCount = iCount + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement