Facebook
From Tiny Macaque, 1 Year ago, written in Plain Text.
This paste is a reply to Untitled from Obese Frog - view diff
Embed
Download Paste or View Raw
Hits: 120
  1. // Decompiled with: CFR 0.152
  2. // Class Version: 6
  3. package age.of.civilizations2.jakowski.lukasz;
  4.  
  5. import age.of.civilizations2.jakowski.lukasz.Button;
  6. import age.of.civilizations2.jakowski.lukasz.CFG;
  7. import age.of.civilizations2.jakowski.lukasz.Game_Calendar;
  8. import age.of.civilizations2.jakowski.lukasz.ImageManager;
  9. import age.of.civilizations2.jakowski.lukasz.Images;
  10. import age.of.civilizations2.jakowski.lukasz.MenuElement;
  11. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2;
  12. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element2;
  13. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type;
  14. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Flag;
  15. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Image;
  16. import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Text;
  17. import com.badlogic.gdx.graphics.Color;
  18. import com.badlogic.gdx.graphics.g2d.SpriteBatch;
  19. import com.badlogic.gdx.math.Rectangle;
  20. import com.badlogic.gdx.scenes.scene2d.utils.ScissorStack;
  21. import java.util.ArrayList;
  22. import java.util.List;
  23.  
  24. class Button_Diplomacy
  25. extends Button {
  26.     protected static int iDiploWidth = 0;
  27.     private int iDiploImageID;
  28.     protected List<Integer> lCivs;
  29.     private boolean row = false;
  30.     private boolean moveable = false;
  31.     private int iButtonsPosX;
  32.     private boolean scrollModeY = false;
  33.     private int iScrollPosX = -1;
  34.     private int iScrollPosX2 = -1;
  35.     private float fScrollNewMenuPosY = 0.0f;
  36.     protected int iHoveredID = -1;
  37.  
  38.     protected static final void setMaxDiploWidth(int n) {
  39.         if (n + Button_Diplomacy.getMaxDiploWidth_ExtraPadding() > iDiploWidth) {
  40.             iDiploWidth = n + Button_Diplomacy.getMaxDiploWidth_ExtraPadding();
  41.         }
  42.     }
  43.  
  44.     protected static final int getMaxDiploWidth_ExtraPadding() {
  45.         return CFG.PADDING * 4;
  46.     }
  47.  
  48.     protected Button_Diplomacy(int n, List<Integer> list, int n2, int n3, int n4) {
  49.         this.init("", 0, n2, n3, n4, CFG.CIV_FLAG_HEIGHT + CFG.PADDING * 2, true, true, false, false);
  50.         this.iDiploImageID = n;
  51.         this.lCivs = new ArrayList<Integer>();
  52.         for (int i = 0; i < list.size(); ++i) {
  53.             this.lCivs.add(list.get(i));
  54.         }
  55.         this.updateMoveable();
  56.         this.typeOfElement = MenuElement.TypeOfElement.DIPLOMACY_INFO;
  57.     }
  58.  
  59.     @Override
  60.     protected void drawButtonBG(SpriteBatch spriteBatch, int n, int n2, boolean bl) {
  61.         if (this.scrollModeY) {
  62.             if (Math.abs(this.fScrollNewMenuPosY) > 1.0f) {
  63.                 this.setCurrent(this.iButtonsPosX + (int)this.fScrollNewMenuPosY);
  64.                 this.fScrollNewMenuPosY *= 0.97f;
  65.             } else {
  66.                 this.scrollModeY = false;
  67.             }
  68.             CFG.setRender_3(true);
  69.         }
  70.         if (this.row) {
  71.             spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_TITLE_BLUE.r, CFG.COLOR_GRADIENT_TITLE_BLUE.g, CFG.COLOR_GRADIENT_TITLE_BLUE.b, 0.1f));
  72.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), this.getHeight());
  73.             spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.125f));
  74.             ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight());
  75.             ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + this.getWidth() - this.getWidth() / 2 + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight(), true, false);
  76.             if (bl || this.getIsHovered()) {
  77.                 spriteBatch.setColor(new Color(CFG.COLOR_INFO_BOX_GRADIENT.r, CFG.COLOR_INFO_BOX_GRADIENT.g, CFG.COLOR_INFO_BOX_GRADIENT.b, 0.75f));
  78.                 ImageManager.getImage(Images.line_32_off1).draw(spriteBatch, this.getPosX() + n, this.getPosY() + 1 - ImageManager.getImage(Images.line_32_off1).getHeight() + n2, this.getWidth(), this.getHeight() - 2);
  79.             }
  80.             spriteBatch.setColor(new Color(CFG.COLOR_INFO_BOX_GRADIENT.r, CFG.COLOR_INFO_BOX_GRADIENT.g, CFG.COLOR_INFO_BOX_GRADIENT.b, 0.45f));
  81.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), CFG.PADDING);
  82.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() + this.getHeight() - this.getHeight() / 3 - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), this.getHeight() / 3, false, true);
  83.             spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.6f));
  84.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() + this.getHeight() - 1 - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  85.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  86.         } else {
  87.             spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_TITLE_BLUE.r, CFG.COLOR_GRADIENT_TITLE_BLUE.g, CFG.COLOR_GRADIENT_TITLE_BLUE.b, 0.335f));
  88.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), this.getHeight());
  89.             spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.075f));
  90.             ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight());
  91.             ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + this.getWidth() - this.getWidth() / 2 + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight(), true, false);
  92.             if (bl || this.getIsHovered()) {
  93.                 spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.75f));
  94.                 ImageManager.getImage(Images.line_32_off1).draw(spriteBatch, this.getPosX() + n, this.getPosY() + 1 - ImageManager.getImage(Images.line_32_off1).getHeight() + n2, this.getWidth(), this.getHeight() - 2);
  95.             }
  96.             spriteBatch.setColor(new Color(0.06f, 0.06f, 0.1f, 0.65f));
  97.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), this.getHeight() / 4);
  98.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() + this.getHeight() - this.getHeight() / 4 - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), this.getHeight() / 4, false, true);
  99.             spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.6f));
  100.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() + this.getHeight() - 2 - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  101.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() + 1 - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  102.             spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.85f));
  103.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() + this.getHeight() - 1 - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  104.             ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
  105.         }
  106.         spriteBatch.setColor(Color.WHITE);
  107.         ImageManager.getImage(this.iDiploImageID).draw(spriteBatch, this.getPosX() + (iDiploWidth - ImageManager.getImage(this.iDiploImageID).getWidth()) / 2 + n, this.getPosY() + (this.getHeight() - ImageManager.getImage(this.iDiploImageID).getHeight()) / 2 + n2);
  108.         Rectangle rectangle = new Rectangle(this.getPosX() + iDiploWidth + n, CFG.GAME_HEIGHT - this.getPosY() - n2, this.getWidth() - iDiploWidth, -this.getHeight());
  109.         spriteBatch.flush();
  110.         ScissorStack.pushScissors(rectangle);
  111.         for (int i = 0; i < this.lCivs.size(); ++i) {
  112.             if (this.lCivs.get(i) >= 0) {
  113.                 CFG.game.getCiv(this.lCivs.get(i)).getFlag().draw(spriteBatch, this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * i + n, this.getPosY() + (this.getHeight() - CFG.CIV_FLAG_HEIGHT) / 2 - CFG.game.getCiv(this.lCivs.get(i)).getFlag().getHeight() + n2, CFG.CIV_FLAG_WIDTH, CFG.CIV_FLAG_HEIGHT);
  114.             } else {
  115.                 ImageManager.getImage(Images.randomCivilizationFlag).draw(spriteBatch, this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * i + n, this.getPosY() + (this.getHeight() - CFG.CIV_FLAG_HEIGHT) / 2 - ImageManager.getImage(Images.randomCivilizationFlag).getHeight() + n2, CFG.CIV_FLAG_WIDTH, CFG.CIV_FLAG_HEIGHT);
  116.             }
  117.             ImageManager.getImage(Images.flag_rect).draw(spriteBatch, this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * i + n, this.getPosY() + (this.getHeight() - CFG.CIV_FLAG_HEIGHT) / 2 + n2);
  118.         }
  119.         if (this.getIsHovered() && this.iHoveredID >= 0) {
  120.             spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.55f));
  121.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * this.iHoveredID + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + (this.getHeight() - CFG.CIV_FLAG_HEIGHT) / 2 + n2, CFG.CIV_FLAG_WIDTH, CFG.CIV_FLAG_HEIGHT / 3);
  122.             ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * this.iHoveredID + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + (this.getHeight() - CFG.CIV_FLAG_HEIGHT) / 2 + n2 + CFG.CIV_FLAG_HEIGHT - CFG.CIV_FLAG_HEIGHT / 3, CFG.CIV_FLAG_WIDTH, CFG.CIV_FLAG_HEIGHT / 3, false, true);
  123.             spriteBatch.setColor(Color.WHITE);
  124.         }
  125.         try {
  126.             spriteBatch.flush();
  127.             ScissorStack.popScissors();
  128.         }
  129.         catch (IllegalStateException illegalStateException) {
  130.             // empty catch block
  131.         }
  132.     }
  133.  
  134.     @Override
  135.     protected void updateHover(int n, int n2, int n3, int n4) {
  136.         if (n >= n3 + this.getPosX() && n <= n3 + this.getPosX() + this.getWidth() && n2 >= n4 + this.getPosY() && n2 <= n4 + this.getPosY() + this.getHeight()) {
  137.             for (int i = 0; i < this.lCivs.size(); ++i) {
  138.                 if (n < n3 + this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * i || n > n3 + this.getPosX() + this.iButtonsPosX + iDiploWidth + (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * i + (CFG.CIV_FLAG_WIDTH + CFG.PADDING)) continue;
  139.                 this.setHoveredID(i);
  140.                 return;
  141.             }
  142.         }
  143.         this.setHoveredID(-1);
  144.     }
  145.  
  146.     private final void setHoveredID(int n) {
  147.         if (this.iHoveredID != n) {
  148.             this.iHoveredID = n;
  149.             this.buildElementHover();
  150.         }
  151.     }
  152.  
  153.     @Override
  154.     protected void buildElementHover() {
  155.         try {
  156.             try {
  157.                 ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  158.                 ArrayList<MenuElement_Hover_v2_Element_Type> arrayList2 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  159.                 if (this.iDiploImageID == Images.diplo_alliance) {
  160.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AlliedWith") + ": "));
  161.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  162.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  163.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
  164.                     } else {
  165.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  166.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
  167.                     }
  168.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  169.                     arrayList2.clear();
  170.                 } else if (this.iDiploImageID == Images.diplo_war) {
  171.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AtWarWith") + ": "));
  172.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  173.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  174.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
  175.                     } else {
  176.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  177.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
  178.                     }
  179.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  180.                     arrayList2.clear();
  181.                 } else if (this.iDiploImageID == Images.diplo_defensive_pact) {
  182.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DefensivePact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  183.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  184.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  185.                     arrayList2.clear();
  186.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  187.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  188.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  189.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getDefensivePact(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  190.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getDefensivePact(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  191.                     } else {
  192.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  193.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  194.                     }
  195.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  196.                     arrayList2.clear();
  197.                 } else if (this.iDiploImageID == Images.top_gold2) {
  198.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("WarReparations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  199.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  200.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  201.                     arrayList2.clear();
  202.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  203.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  204.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  205.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCiv(CFG.getActiveCivInfo()).getWarReparationsPays_TurnsLeft(this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  206.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCiv(CFG.getActiveCivInfo()).getWarReparationsPays_TurnsLeft(this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  207.                     } else {
  208.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  209.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  210.                     }
  211.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  212.                     arrayList2.clear();
  213.                 } else if (this.iDiploImageID == Images.diplo_relations_inc) {
  214.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  215.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  216.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  217.                     arrayList2.clear();
  218.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  219.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  220.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  221.                     } else {
  222.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  223.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  224.                     }
  225.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  226.                     arrayList2.clear();
  227.                 } else if (this.iDiploImageID == Images.diplo_relations) {
  228.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsFrom") + ":", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  229.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  230.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  231.                     arrayList2.clear();
  232.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  233.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  234.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  235.                     } else {
  236.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  237.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  238.                     }
  239.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  240.                     arrayList2.clear();
  241.                 } else if (this.iDiploImageID == Images.diplo_relations_dec) {
  242.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DiplomaticRelationsAreSuspended"), CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
  243.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  244.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  245.                     arrayList2.clear();
  246.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  247.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  248.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  249.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCiv(CFG.getActiveCivInfo()).getCivilization_Diplomacy_GameData().isEmbassyClosed_Turns(this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  250.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCiv(CFG.getActiveCivInfo()).getCivilization_Diplomacy_GameData().isEmbassyClosed_Turns(this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  251.                     } else {
  252.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  253.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  254.                     }
  255.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  256.                     arrayList2.clear();
  257.                 } else if (this.iDiploImageID == Images.diplo_loan) {
  258.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Loans") + ": ", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  259.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text("" + this.lCivs.size(), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  260.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  261.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  262.                     arrayList2.clear();
  263.                 } else if (this.iDiploImageID == Images.diplo_gift) {
  264.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  265.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  266.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AGiftFromCivA", CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  267.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  268.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  269.                         arrayList2.clear();
  270.                     } else {
  271.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  272.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AGiftFromCivA", CFG.langManager.get("Undiscovered")), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  273.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  274.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  275.                         arrayList2.clear();
  276.                     }
  277.                 } else if (this.iDiploImageID == Images.hre_icon) {
  278.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("IsPartOfHRE"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  279.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  280.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  281.                     arrayList2.clear();
  282.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  283.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  284.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  285.                     } else {
  286.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  287.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  288.                     }
  289.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  290.                     arrayList2.clear();
  291.                 } else if (this.iDiploImageID == Images.diplo_truce) {
  292.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HasATruceWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  293.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  294.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  295.                     arrayList2.clear();
  296.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  297.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  298.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  299.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCivTruce(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  300.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCivTruce(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  301.                     } else {
  302.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  303.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  304.                     }
  305.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  306.                     arrayList2.clear();
  307.                 } else if (this.iDiploImageID == Images.diplo_non_aggression) {
  308.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("NonAggressionPact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  309.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  310.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  311.                     arrayList2.clear();
  312.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  313.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  314.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  315.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCivNonAggressionPact(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  316.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCivNonAggressionPact(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  317.                     } else {
  318.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  319.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  320.                     }
  321.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  322.                     arrayList2.clear();
  323.                 } else if (this.iDiploImageID == Images.diplo_access_has) {
  324.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GivesMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  325.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  326.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  327.                     arrayList2.clear();
  328.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  329.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  330.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  331.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getMilitaryAccess(this.lCivs.get(this.iHoveredID), CFG.getActiveCivInfo())), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  332.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getMilitaryAccess(this.lCivs.get(this.iHoveredID), CFG.getActiveCivInfo())) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  333.                     } else {
  334.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  335.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  336.                     }
  337.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  338.                     arrayList2.clear();
  339.                 } else if (this.iDiploImageID == Images.diplo_access_gives) {
  340.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HaveMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  341.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  342.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  343.                     arrayList2.clear();
  344.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  345.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  346.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  347.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getMilitaryAccess(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  348.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getMilitaryAccess(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  349.                     } else {
  350.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  351.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  352.                     }
  353.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  354.                     arrayList2.clear();
  355.                 } else if (this.iDiploImageID == Images.diplo_guarantee_gives) {
  356.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  357.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  358.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  359.                     arrayList2.clear();
  360.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  361.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  362.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  363.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getGuarantee(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  364.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getGuarantee(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  365.                     } else {
  366.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  367.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  368.                     }
  369.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  370.                     arrayList2.clear();
  371.                 } else if (this.iDiploImageID == Images.diplo_guarantee_has) {
  372.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeTheirIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  373.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  374.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  375.                     arrayList2.clear();
  376.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  377.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  378.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
  379.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getGuarantee(this.lCivs.get(this.iHoveredID), CFG.getActiveCivInfo())), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  380.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getGuarantee(this.lCivs.get(this.iHoveredID), CFG.getActiveCivInfo())) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  381.                     } else {
  382.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  383.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  384.                     }
  385.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  386.                     arrayList2.clear();
  387.                 } else if (this.iDiploImageID == Images.diplo_vassal) {
  388.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Vassal") + ": "));
  389.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  390.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  391.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
  392.                     } else {
  393.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  394.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
  395.                     }
  396.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  397.                     arrayList2.clear();
  398.                 } else if (this.iDiploImageID == Images.diplo_heart) {
  399.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  400.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  401.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName() + ": "));
  402.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text("+" + (float)((int)(CFG.game.getCivRelation_OfCivB(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID)) * 10.0f)) / 10.0f, CFG.COLOR_TEXT_MODIFIER_POSITIVE));
  403.                     } else {
  404.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  405.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  406.                     }
  407.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(Images.diplo_heart, CFG.PADDING, 0));
  408.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  409.                     arrayList2.clear();
  410.                 } else if (this.iDiploImageID == Images.diplo_rivals) {
  411.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  412.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  413.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName() + ": "));
  414.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text("" + (float)((int)(CFG.game.getCivRelation_OfCivB(CFG.getActiveCivInfo(), this.lCivs.get(this.iHoveredID)) * 10.0f)) / 10.0f, CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
  415.                     } else {
  416.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  417.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  418.                     }
  419.                     arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(Images.diplo_rivals, CFG.PADDING, 0));
  420.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  421.                     arrayList2.clear();
  422.                 } else {
  423.                     if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
  424.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
  425.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
  426.                     } else {
  427.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  428.                         arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  429.                     }
  430.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
  431.                     arrayList2.clear();
  432.                 }
  433.                 this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  434.             }
  435.             catch (IndexOutOfBoundsException indexOutOfBoundsException) {
  436.                 if (this.iDiploImageID == Images.diplo_alliance) {
  437.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  438.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList3 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  439.                     arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get(CFG.game.getAlliance(CFG.game.getCiv(CFG.getActiveCivInfo()).getAllianceID()).getAllianceName()), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  440.                     arrayList3.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  441.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList3));
  442.                     arrayList3.clear();
  443.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  444.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  445.                             arrayList3.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  446.                             arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  447.                         } else {
  448.                             arrayList3.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  449.                             arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  450.                         }
  451.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList3));
  452.                         arrayList3.clear();
  453.                     }
  454.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  455.                     return;
  456.                 }
  457.                 if (this.iDiploImageID == Images.diplo_war) {
  458.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  459.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList4 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  460.                     arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AtWarWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  461.                     arrayList4.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  462.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList4));
  463.                     arrayList4.clear();
  464.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  465.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  466.                             arrayList4.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  467.                             arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  468.                         } else {
  469.                             arrayList4.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  470.                             arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  471.                         }
  472.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList4));
  473.                         arrayList4.clear();
  474.                     }
  475.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  476.                     return;
  477.                 }
  478.                 if (this.iDiploImageID == Images.diplo_non_aggression) {
  479.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  480.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList5 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  481.                     arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HasSignedNonAggressionPactWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  482.                     arrayList5.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  483.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList5));
  484.                     arrayList5.clear();
  485.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  486.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  487.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  488.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  489.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCivNonAggressionPact(CFG.getActiveCivInfo(), this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  490.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCivNonAggressionPact(CFG.getActiveCivInfo(), this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  491.                         } else {
  492.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  493.                             arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  494.                         }
  495.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList5));
  496.                         arrayList5.clear();
  497.                     }
  498.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  499.                     return;
  500.                 }
  501.                 if (this.iDiploImageID == Images.diplo_truce) {
  502.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  503.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList6 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  504.                     arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("TruceWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  505.                     arrayList6.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  506.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList6));
  507.                     arrayList6.clear();
  508.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  509.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  510.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  511.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  512.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCivTruce(CFG.getActiveCivInfo(), this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  513.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCivTruce(CFG.getActiveCivInfo(), this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  514.                         } else {
  515.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  516.                             arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  517.                         }
  518.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList6));
  519.                         arrayList6.clear();
  520.                     }
  521.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  522.                     return;
  523.                 }
  524.                 if (this.iDiploImageID == Images.diplo_loan) {
  525.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  526.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList7 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  527.                     arrayList7.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Loans") + ": ", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  528.                     arrayList7.add(new MenuElement_Hover_v2_Element_Type_Text("" + this.lCivs.size(), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  529.                     arrayList7.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  530.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList7));
  531.                     arrayList7.clear();
  532.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  533.                     return;
  534.                 }
  535.                 if (this.iDiploImageID == Images.top_gold2) {
  536.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  537.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList8 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  538.                     arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("WarReparations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  539.                     arrayList8.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  540.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList8));
  541.                     arrayList8.clear();
  542.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  543.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  544.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  545.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  546.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCiv(CFG.getActiveCivInfo()).getWarReparationsPays_TurnsLeft(this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  547.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCiv(CFG.getActiveCivInfo()).getWarReparationsPays_TurnsLeft(this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  548.                         } else {
  549.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  550.                             arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  551.                         }
  552.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList8));
  553.                         arrayList8.clear();
  554.                     }
  555.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  556.                     return;
  557.                 }
  558.                 if (this.iDiploImageID == Images.diplo_defensive_pact) {
  559.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  560.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList9 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  561.                     arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DefensivePact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  562.                     arrayList9.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  563.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList9));
  564.                     arrayList9.clear();
  565.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  566.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  567.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  568.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  569.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getDefensivePact(CFG.getActiveCivInfo(), this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  570.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getDefensivePact(CFG.getActiveCivInfo(), this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  571.                         } else {
  572.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  573.                             arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  574.                         }
  575.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList9));
  576.                         arrayList9.clear();
  577.                     }
  578.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  579.                     return;
  580.                 }
  581.                 if (this.iDiploImageID == Images.diplo_relations_inc) {
  582.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  583.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList10 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  584.                     arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  585.                     arrayList10.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  586.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList10));
  587.                     arrayList10.clear();
  588.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  589.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  590.                             arrayList10.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  591.                             arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  592.                         } else {
  593.                             arrayList10.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  594.                             arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  595.                         }
  596.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList10));
  597.                         arrayList10.clear();
  598.                     }
  599.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  600.                     return;
  601.                 }
  602.                 if (this.iDiploImageID == Images.diplo_relations) {
  603.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  604.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList11 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  605.                     arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsFrom"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  606.                     arrayList11.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  607.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList11));
  608.                     arrayList11.clear();
  609.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  610.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  611.                             arrayList11.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  612.                             arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  613.                         } else {
  614.                             arrayList11.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  615.                             arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  616.                         }
  617.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList11));
  618.                         arrayList11.clear();
  619.                     }
  620.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  621.                     return;
  622.                 }
  623.                 if (this.iDiploImageID == Images.diplo_relations_dec) {
  624.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  625.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList12 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  626.                     arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DiplomaticRelationsAreSuspended"), CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
  627.                     arrayList12.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  628.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList12));
  629.                     arrayList12.clear();
  630.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  631.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  632.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  633.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  634.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getCiv(CFG.getActiveCivInfo()).getCivilization_Diplomacy_GameData().isEmbassyClosed_Turns(this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  635.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getCiv(CFG.getActiveCivInfo()).getCivilization_Diplomacy_GameData().isEmbassyClosed_Turns(this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  636.                         } else {
  637.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  638.                             arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  639.                         }
  640.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList12));
  641.                         arrayList12.clear();
  642.                     }
  643.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  644.                     return;
  645.                 }
  646.                 if (this.iDiploImageID == Images.diplo_gift) {
  647.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  648.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList13 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  649.                     arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Gift"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  650.                     arrayList13.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  651.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList13));
  652.                     arrayList13.clear();
  653.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  654.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  655.                             arrayList13.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  656.                             arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  657.                         } else {
  658.                             arrayList13.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  659.                             arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  660.                         }
  661.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList13));
  662.                         arrayList13.clear();
  663.                     }
  664.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  665.                     return;
  666.                 }
  667.                 if (this.iDiploImageID == Images.hre_icon) {
  668.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  669.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList14 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  670.                     arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("IsPartOfHRE"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  671.                     arrayList14.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  672.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList14));
  673.                     arrayList14.clear();
  674.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  675.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  676.                             arrayList14.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  677.                             arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  678.                         } else {
  679.                             arrayList14.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  680.                             arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  681.                         }
  682.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList14));
  683.                         arrayList14.clear();
  684.                     }
  685.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  686.                     return;
  687.                 }
  688.                 if (this.iDiploImageID == Images.diplo_access_has) {
  689.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  690.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList15 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  691.                     arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GivesMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  692.                     arrayList15.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  693.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList15));
  694.                     arrayList15.clear();
  695.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  696.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  697.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  698.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  699.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getMilitaryAccess(this.lCivs.get(i), CFG.getActiveCivInfo())), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  700.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getMilitaryAccess(this.lCivs.get(i), CFG.getActiveCivInfo())) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  701.                         } else {
  702.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  703.                             arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  704.                         }
  705.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList15));
  706.                         arrayList15.clear();
  707.                     }
  708.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  709.                     return;
  710.                 }
  711.                 if (this.iDiploImageID == Images.diplo_access_gives) {
  712.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  713.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList16 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  714.                     arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HaveMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  715.                     arrayList16.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  716.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList16));
  717.                     arrayList16.clear();
  718.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  719.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  720.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  721.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  722.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getMilitaryAccess(CFG.getActiveCivInfo(), this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  723.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getMilitaryAccess(CFG.getActiveCivInfo(), this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  724.                         } else {
  725.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  726.                             arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  727.                         }
  728.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList16));
  729.                         arrayList16.clear();
  730.                     }
  731.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  732.                     return;
  733.                 }
  734.                 if (this.iDiploImageID == Images.diplo_guarantee_gives) {
  735.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  736.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList17 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  737.                     arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  738.                     arrayList17.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  739.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList17));
  740.                     arrayList17.clear();
  741.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  742.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  743.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  744.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  745.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getGuarantee(CFG.getActiveCivInfo(), this.lCivs.get(i))), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  746.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getGuarantee(CFG.getActiveCivInfo(), this.lCivs.get(i))) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  747.                         } else {
  748.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  749.                             arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  750.                         }
  751.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList17));
  752.                         arrayList17.clear();
  753.                     }
  754.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  755.                     return;
  756.                 }
  757.                 if (this.iDiploImageID == Images.diplo_guarantee_has) {
  758.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  759.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList18 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  760.                     arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeTheirIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  761.                     arrayList18.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  762.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList18));
  763.                     arrayList18.clear();
  764.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  765.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  766.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  767.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  768.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(" - " + Game_Calendar.getDate_ByTurnID(Game_Calendar.TURN_ID + CFG.game.getGuarantee(this.lCivs.get(i), CFG.getActiveCivInfo())), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
  769.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(" [" + CFG.langManager.get("TurnsX", CFG.game.getGuarantee(this.lCivs.get(i), CFG.getActiveCivInfo())) + "]", CFG.COLOR_TEXT_OPTIONS_NS_HOVER));
  770.                         } else {
  771.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  772.                             arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  773.                         }
  774.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList18));
  775.                         arrayList18.clear();
  776.                     }
  777.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  778.                     return;
  779.                 }
  780.                 if (this.iDiploImageID == Images.diplo_vassal) {
  781.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  782.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList19 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  783.                     arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Vassals"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  784.                     arrayList19.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  785.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList19));
  786.                     arrayList19.clear();
  787.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  788.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  789.                             arrayList19.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  790.                             arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
  791.                         } else {
  792.                             arrayList19.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  793.                             arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  794.                         }
  795.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList19));
  796.                         arrayList19.clear();
  797.                     }
  798.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  799.                     return;
  800.                 }
  801.                 if (this.iDiploImageID == Images.diplo_heart) {
  802.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  803.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList20 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  804.                     arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("FriendlyCivilizations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  805.                     arrayList20.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  806.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList20));
  807.                     arrayList20.clear();
  808.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  809.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  810.                             arrayList20.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  811.                             arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName() + ": "));
  812.                             arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text("+" + (float)((int)(CFG.game.getCivRelation_OfCivB(CFG.getActiveCivInfo(), this.lCivs.get(i)) * 10.0f)) / 10.0f, CFG.COLOR_TEXT_MODIFIER_POSITIVE));
  813.                         } else {
  814.                             arrayList20.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  815.                             arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  816.                         }
  817.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList20));
  818.                         arrayList20.clear();
  819.                     }
  820.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  821.                     return;
  822.                 }
  823.                 if (this.iDiploImageID == Images.diplo_rivals) {
  824.                     ArrayList<MenuElement_Hover_v2_Element2> arrayList = new ArrayList<MenuElement_Hover_v2_Element2>();
  825.                     ArrayList<MenuElement_Hover_v2_Element_Type> arrayList21 = new ArrayList<MenuElement_Hover_v2_Element_Type>();
  826.                     arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Enemies"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
  827.                     arrayList21.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
  828.                     arrayList.add(new MenuElement_Hover_v2_Element2(arrayList21));
  829.                     arrayList21.clear();
  830.                     for (int i = 0; i < this.lCivs.size(); ++i) {
  831.                         if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
  832.                             arrayList21.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
  833.                             arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName() + ": "));
  834.                             arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text("" + (float)((int)(CFG.game.getCivRelation_OfCivB(CFG.getActiveCivInfo(), this.lCivs.get(i)) * 10.0f)) / 10.0f, CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
  835.                         } else {
  836.                             arrayList21.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
  837.                             arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
  838.                         }
  839.                         arrayList.add(new MenuElement_Hover_v2_Element2(arrayList21));
  840.                         arrayList21.clear();
  841.                     }
  842.                     this.menuElementHover = new MenuElement_Hover_v2(arrayList);
  843.                     return;
  844.                 }
  845.                 this.menuElementHover = null;
  846.             }
  847.         }
  848.         catch (IndexOutOfBoundsException indexOutOfBoundsException) {
  849.             this.menuElementHover = null;
  850.         }
  851.     }
  852.  
  853.     private final void updateMoveable() {
  854.         if (this.getButtonsWidth() - CFG.PADDING > this.getWidth() - iDiploWidth) {
  855.             this.moveable = true;
  856.         } else {
  857.             this.moveable = false;
  858.             this.iButtonsPosX = 0;
  859.         }
  860.     }
  861.  
  862.     private final int getButtonsWidth() {
  863.         return (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * this.lCivs.size() + CFG.PADDING;
  864.     }
  865.  
  866.     @Override
  867.     protected boolean getMoveable() {
  868.         return this.moveable;
  869.     }
  870.  
  871.     @Override
  872.     protected int getCurrent() {
  873.         return this.iButtonsPosX;
  874.     }
  875.  
  876.     @Override
  877.     protected void setCurrent(int n) {
  878.         if (n > 0) {
  879.             n = 0;
  880.             CFG.menuManager.setUpdateSliderMenuPosX(true);
  881.             this.scrollModeY = false;
  882.         } else if (n < -(this.getButtonsWidth() - this.getWidth())) {
  883.             n = -(this.getButtonsWidth() - this.getWidth());
  884.             CFG.menuManager.setUpdateSliderMenuPosX(true);
  885.             this.scrollModeY = false;
  886.         }
  887.         if (this.iButtonsPosX != n) {
  888.             this.iButtonsPosX = n;
  889.             CFG.setRender_3(true);
  890.         }
  891.     }
  892.  
  893.     @Override
  894.     protected boolean getIsScrollable() {
  895.         return this.moveable;
  896.     }
  897.  
  898.     @Override
  899.     protected void srollByWheel(int n) {
  900.         this.scrollModeY = false;
  901.         this.setCurrent(this.getCurrent() + n);
  902.     }
  903.  
  904.     @Override
  905.     protected boolean getAnotherView() {
  906.         return false;
  907.     }
  908.  
  909.     @Override
  910.     protected final void scrollTheMenu() {
  911.         if (this.moveable && this.iScrollPosX > 0 && this.iScrollPosX2 > 0 && (float)Math.abs(this.iScrollPosX - this.iScrollPosX2) > 3.0f * CFG.DENSITY) {
  912.             this.fScrollNewMenuPosY = (float)(this.iScrollPosX - this.iScrollPosX2) * 1.25f;
  913.             this.scrollModeY = true;
  914.         }
  915.     }
  916.  
  917.     @Override
  918.     protected final void setScrollPosY(int n) {
  919.         this.iScrollPosX2 = this.iScrollPosX;
  920.         this.iScrollPosX = n;
  921.     }
  922.  
  923.     @Override
  924.     protected void setTypeOfButton(Button.TypeOfButton typeOfButton) {
  925.         this.iScrollPosX2 = -1;
  926.         this.iScrollPosX = -1;
  927.         this.scrollModeY = false;
  928.     }
  929.  
  930.     @Override
  931.     protected void setAnotherView(boolean bl) {
  932.         if (this.iHoveredID >= 0) {
  933.             if (!CFG.game.getCiv(CFG.getActiveCivInfo()).getControlledByPlayer()) {
  934.                 CFG.game.disableDrawCivilizationRegions(CFG.getActiveCivInfo());
  935.             }
  936.             CFG.setActiveCivInfo(this.lCivs.get(this.iHoveredID));
  937.             try {
  938.                 CFG.game.setActiveProvinceID(CFG.game.getCiv(CFG.getActiveCivInfo()).getCapitalProvinceID());
  939.             }
  940.             catch (IndexOutOfBoundsException indexOutOfBoundsException) {
  941.                 // empty catch block
  942.             }
  943.             CFG.updateActiveCivInfo_CreateNewGame();
  944.             CFG.game.enableDrawCivilizationRegions(CFG.getActiveCivInfo(), 1);
  945.         }
  946.     }
  947.  
  948.     @Override
  949.     protected void setMax(int n) {
  950.         this.row = n == 1;
  951.     }
  952. }
  953.