Advertisement
Guest User

Untitled

a guest
May 28th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.71 KB | None | 0 0
  1. #Old Code for comparison
  2.                         if eMultiList == "BottomButtonContainer":
  3.                             screen.show( "BottomButtonContainer" )
  4.                         elif eMultiList == "BottomButtonContainer2":
  5.                             screen.show( "BottomButtonContainer2" )
  6.                         elif eMultiList == "BottomButtonContainer3":
  7.                             screen.show( "BottomButtonContainer3" )
  8.                            
  9.                         if ( not CyInterface().canHandleAction(i, False) ):
  10.                             screen.disableMultiListButton( eMultiList, iRow, iCount, gc.getActionInfo(i).getButton() )
  11.                            
  12.                         if ( pHeadSelectedUnit.isActionRecommended(i) ):#or gc.getActionInfo(i).getCommandType() == CommandTypes.COMMAND_PROMOTION ):
  13.                             screen.enableMultiListPulse( eMultiList, True, 0, iCount )
  14.                         else:
  15.                             screen.enableMultiListPulse( eMultiList, False, 0, iCount )
  16.  
  17.                         iCount = iCount + 1
  18.  
  19.                     if (CyInterface().canCreateGroup()):
  20.                         screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
  21.                         screen.show( "BottomButtonContainer3" )
  22.                        
  23.                         iCount = iCount + 1
  24.  
  25.                     if (CyInterface().canDeleteGroup()):
  26.                         screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
  27.                         screen.show( "BottomButtonContainer3" )
  28.                        
  29.                         iCount = iCount + 1
  30.  
  31.  
  32.  
  33.  
  34. #New Code Starts Here
  35. #Bug is caused be the changes between the two code blocks, not sure what exactly.
  36.                         if eMultiList == "BottomButtonContainer":
  37.                             screen.show( "BottomButtonContainer" )
  38.                             iCount = iCount + 1
  39.                             theCount = iCount
  40.                         elif eMultiList == "BottomButtonContainer2":
  41.                             screen.show( "BottomButtonContainer2" )
  42.                             iCount2 = iCount2 + 1
  43.                             theCount = iCount2
  44.                         elif eMultiList == "BottomButtonContainer3":
  45.                             screen.show( "BottomButtonContainer3" )
  46.                             iCount3 = iCount3 + 1
  47.                             theCount = iCount3
  48.                            
  49.                         if ( not CyInterface().canHandleAction(i, False) ):
  50.                             screen.disableMultiListButton( eMultiList, 0, theCount, szButton )
  51.                            
  52.                         if ( pHeadSelectedUnit.isActionRecommended(i) ):#or gc.getActionInfo(i).getCommandType() == CommandTypes.COMMAND_PROMOTION ):
  53.                             screen.enableMultiListPulse( eMultiList, True, 0, theCount )
  54.                         else:
  55.                             screen.enableMultiListPulse( eMultiList, False, 0, theCount )
  56.  
  57.                     if xResolution >= g_iVeryHighRez and bValid:
  58.                         if (CyInterface().canCreateGroup()):
  59.                             screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
  60.                             screen.show( "BottomButtonContainer3" )
  61.                            
  62.                             iCount3 = iCount3 + 1
  63.  
  64.                         if (CyInterface().canDeleteGroup()):
  65.                             screen.appendMultiListButton( "BottomButtonContainer3", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
  66.                             screen.show( "BottomButtonContainer3" )
  67.                            
  68.                             iCount3 = iCount3 + 1
  69.                     else:
  70.                         if (CyInterface().canCreateGroup()):
  71.                             screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_CREATEGROUP").getPath(), 0, WidgetTypes.WIDGET_CREATE_GROUP, -1, -1, False )
  72.                             screen.show( "BottomButtonContainer" )
  73.                            
  74.                             iCount = iCount + 1
  75.  
  76.                         if (CyInterface().canDeleteGroup()):
  77.                             screen.appendMultiListButton( "BottomButtonContainer", ArtFileMgr.getInterfaceArtInfo("INTERFACE_BUTTONS_SPLITGROUP").getPath(), 0, WidgetTypes.WIDGET_DELETE_GROUP, -1, -1, False )
  78.                             screen.show( "BottomButtonContainer" )
  79.                            
  80.                             iCount = iCount + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement