Facebook
From Tiny Macaque, 1 Year ago, written in Plain Text.
This paste is a reply to Untitled from Obese Frog - go back
Embed
Viewing differences between Untitled and Re: Untitled
// Decompiled with: CFR 0.152
// Class Version: 6
package age.of.civilizations2.jakowski.lukasz;

import age.of.civilizations2.jakowski.lukasz.Button;
import age.of.civilizations2.jakowski.lukasz.CFG;
import age.of.civilizations2.jakowski.lukasz.Game_Calendar;
import age.of.civilizations2.jakowski.lukasz.ImageManager;
import age.of.civilizations2.jakowski.lukasz.Images;
import age.of.civilizations2.jakowski.lukasz.MenuElement;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element2;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Flag;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Image;
import age.of.civilizations2.jakowski.lukasz.MenuElement_Hover_v2_Element_Type_Text;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;

SpriteBatch;
import com.badlogic.gdx.math.Rectangle;
import com.badlogic.gdx.scenes.scene2d.utils.ScissorStack;
import java.util.ArrayList;
import java.util.List;

class Button
Button_Diplomacy
extends MenuElement Button {
    protected TypeOfButton typeOfButton;
    
static int iDiploWidth = 0;
    
private Checkbox oCheckbox;
    
int iDiploImageID;
    
protected String sText = null;
    protected int iTextWidth = -1;
    protected int iTextHeight;
    protected int iTextPositionX;
    protected TextPosition textPosition;
    protected 
List lCivs;
    private 
boolean checkbox row = false;
    private boolean checkboxState moveable false;

    Button() {
false;
    private int iButtonsPosX;
    private boolean scrollModeY = false;
    private int iScrollPosX = -1;
    private int iScrollPosX2 = -1;
    private float fScrollNewMenuPosY = 0.0f;
    protected int iHoveredID = -1;

    protected static final void setMaxDiploWidth(int n) {
        if (n + Button_Diplomacy.getMaxDiploWidth_ExtraPadding() > iDiploWidth) {
            iDiploWidth = n + Button_Diplomacy.getMaxDiploWidth_ExtraPadding();
        }
    }

    protected static final void init(String string, int n, int n2, int n3, int n4, int n5, boolean bl, boolean bl2, boolean bl3, boolean bl4) getMaxDiploWidth_ExtraPadding() {
        this.init(string, n, n2, n3, n4, n5, bl, bl2, bl3, bl4, null);
return CFG.PADDING * 4;
    }

    protected final void init(String string, int Button_Diplomacy(int n, List list, int n2, int n3, int n4) {
        this.init("", 0, n2, n3, 
n4, int n5, boolean bl, boolean bl2, boolean bl3, boolean bl4, TypeOfButton typeOfButton) {
CFG.CIV_FLAG_HEIGHT + CFG.PADDING * 2, true, true, false, false);
        this.iDiploImageID = n;
        this.lCivs = new ArrayList();
        for (int i = 0; i < list.size(); ++i) {
            this.lCivs.add(list.get(i));
        }
        this.updateMoveable();
        this.typeOfElement = MenuElement.TypeOfElement.BUTTON;
        this.setPosX(n2);
        this.setPosY(n3);
        this.setWidth(n4);
        this.setHeight(n5);
        this.setText(string);
        this.iTextPositionX = n;
        this.textPosition = n < 0 ? new TextPosition(){

            @Override
            public int getTextPosition() {
                return Button.this.getWidth() / 2 - Button.this.getTextWidth() / 2;
            }
        } : new TextPosition(){

            @Override
            public int getTextPosition() {
                return Button.this.iTextPositionX;
            }
        };
        this.checkbox = bl3;
        this.checkboxState = bl4;
        this.oCheckbox = this.buildCheckbox();
        this.setClickable(bl);
        this.setVisible(bl2);
        this.typeOfButton = typeOfButton;
DIPLOMACY_INFO;
    }

    @Override
    protected final void draw(SpriteBatch spriteBatch, int n, int n2, boolean bl, boolean bl2) {\n        if (this.getClickable()) {\n            this.drawButtonBG(spriteBatch, n, n2, bl);\n        } else {\n            spriteBatch.setColor(1.0f, 1.0f, 1.0f, 0.45f);\n            this.drawButtonBG(spriteBatch, n, n2, bl);\n            spriteBatch.setColor(Color.WHITE);\n        }\n        this.oCheckbox.drawCheckBox(spriteBatch, n, n2, bl2);\n        this.drawText(spriteBatch, n, n2, bl);\n    }\n\n    protected Checkbox buildCheckbox() {\n        if (this.checkbox) {\n            return new Checkbox(){\n\n                @Override\n                public void drawCheckBox(SpriteBatch spriteBatch, int n, int n2, boolean bl) {\n                    if (Button.this.getCheckboxState()) {\n                        spriteBatch.setColor(new Color(0.55f, 0.8f, 0.0f, 0.25f));\n                    } else {\n                        spriteBatch.setColor(new Color(0.8f, 0.137f, 0.0f, 0.25f));\n                    }\n                    ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, Button.this.getPosX() + n, Button.this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + 1 + n2, Button.this.getWidth() / 4, Button.this.getHeight() - 2, false, false);\n                    spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.3f));\n                    ImageManager.getImage(Images.gradient).draw(spriteBatch, Button.this.getPosX() + n, Button.this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + 1 + n2, Button.this.getWidth(), Button.this.getHeight() / 4, false, false);\n                    ImageManager.getImage(Images.gradient).draw(spriteBatch, Button.this.getPosX() + n, Button.this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + Button.this.getHeight() - 1 + n2 - Button.this.getHeight() / 4, Button.this.getWidth(), Button.this.getHeight() / 4, false, true);\n                    spriteBatch.setColor(Color.WHITE);\n                }\n            };\n        }\n        return new Checkbox(){\n\n            @Override\n            public void drawCheckBox(SpriteBatch spriteBatch, int n, int n2, boolean bl) {\n            }\n        };\n    }\n\n    protected void drawButtonBG(SpriteBatch spriteBatch, int n, int n2, boolean bl) {
    }\n\n    protected void drawText(SpriteBatch spriteBatch, int n, int n2, boolean bl) {\n                if (bl) {
(this.scrollModeY) {
            if (Math.abs(this.fScrollNewMenuPosY) > 1.0f) {
                this.setCurrent(this.iButtonsPosX + (int)this.fScrollNewMenuPosY);
                this.fScrollNewMenuPosY *= 0.97f;
            } else {
                this.scrollModeY = false;
            }
            CFG.drawText(spriteBatch, setRender_3(true);
        }
        if (this.row) {
            spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_TITLE_BLUE.r, CFG.COLOR_GRADIENT_TITLE_BLUE.g, CFG.COLOR_GRADIENT_TITLE_BLUE.b, 0.1f));
            ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, 
this.getTextToDraw(), getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), this.getHeight());
            spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.125f));
            ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight());
            ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.
getPosX() + this.textPosition.getTextPosition() getWidth() - this.getWidth() / 2 + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight(), true, false);
            if (bl || this.getIsHovered()) {
                spriteBatch.setColor(new Color(CFG.COLOR_INFO_BOX_GRADIENT.r, CFG.COLOR_INFO_BOX_GRADIENT.g, CFG.COLOR_INFO_BOX_GRADIENT.b, 0.75f));
                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);
            }
            spriteBatch.setColor(new Color(CFG.COLOR_INFO_BOX_GRADIENT.r, CFG.COLOR_INFO_BOX_GRADIENT.g, CFG.COLOR_INFO_BOX_GRADIENT.b, 0.45f));
            ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), CFG.PADDING);
            ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.
getPosY() + this.getHeight() - this.getHeight() / this.iTextHeight / 2 ImageManager.getImage(Images.gradient).getHeight() + n2, this.getColor(bl));
getWidth(), this.getHeight() / 3, false, true);
            spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.6f));
            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);
            ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
        } else {
            spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_TITLE_BLUE.r, CFG.drawTextWithShadow(spriteBatch, COLOR_GRADIENT_TITLE_BLUE.g, CFG.COLOR_GRADIENT_TITLE_BLUE.b, 0.335f));
            ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, 
this.getTextToDraw(), getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), this.getHeight());
            spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.075f));
            ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight());
            ImageManager.getImage(Images.slider_gradient).draw(spriteBatch, this.
getPosX() + this.textPosition.getTextPosition() getWidth() - this.getWidth() / 2 + n, this.getPosY() - ImageManager.getImage(Images.slider_gradient).getHeight() + n2, this.getWidth() / 2, this.getHeight(), true, false);
            if (bl || this.getIsHovered()) {
                spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.75f));
                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);
            }
            spriteBatch.setColor(new Color(0.06f, 0.06f, 0.1f, 0.65f));
            ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.gradient).getHeight() + n2, this.getWidth(), this.getHeight() / 4);
            ImageManager.getImage(Images.gradient).draw(spriteBatch, this.getPosX() + n, this.
getPosY() + this.getHeight() - this.getHeight() / this.iTextHeight / 2 ImageManager.getImage(Images.gradient).getHeight() + n2, this.getColor(bl));
getWidth(), this.getHeight() / 4, false, true);
            spriteBatch.setColor(new Color(0.0f, 0.0f, 0.0f, 0.6f));
            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);
            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);
            spriteBatch.setColor(new Color(CFG.COLOR_GRADIENT_DIPLOMACY.r, CFG.COLOR_GRADIENT_DIPLOMACY.g, CFG.COLOR_GRADIENT_DIPLOMACY.b, 0.85f));
            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);
            ImageManager.getImage(Images.pix255_255_255).draw(spriteBatch, this.getPosX() + n, this.getPosY() - ImageManager.getImage(Images.pix255_255_255).getHeight() + n2, this.getWidth(), 1);
        }
    }\n\n    protected Color getColor(boolean bl) {\n        return bl ? CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE :         spriteBatch.setColor(Color.WHITE);
        ImageManager.getImage(this.iDiploImageID).draw(spriteBatch, this.getPosX() + (iDiploWidth - ImageManager.getImage(this.iDiploImageID).getWidth()) / 2 + n, this.getPosY() + 
(this.getClickable() ? getHeight() - ImageManager.getImage(this.iDiploImageID).getHeight()) / 2 + n2);
        Rectangle rectangle = 
new Rectangle(this.getPosX() + iDiploWidth + n, CFG.GAME_HEIGHT - this.getPosY() - n2, this.getWidth() - iDiploWidth, -this.getHeight());
        spriteBatch.flush();
        ScissorStack.pushScissors(rectangle);
        for (int i = 0; i < this.lCivs.size(); ++i) {
            if (this.lCivs.get(i) >= 0) {
                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);
            } else {
                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);
            }
            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);
        }
        if (this.getIsHovered() && this.iHoveredID >= 0) {
            spriteBatch.setColor(new 
Color(0.38f, 0f, 0.38f, 0f, 0.38f, 1.0f) : new Color(0.49f, 0f, 0.49f, 0.49f, 0.5f));
55f));
            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);
            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);
            spriteBatch.setColor(Color.WHITE);
        }
        try {
            spriteBatch.flush();
            ScissorStack.popScissors();
        }
        catch (IllegalStateException illegalStateException) {
            // empty catch block
        }
    }

    @Override
    protected String getText() void updateHover(int n, int n2, int n3, int n4) {
        return if (n >= n3 + this.sText;
getPosX() && n <= n3 + this.getPosX() + this.getWidth() && n2 >= n4 + this.getPosY() && n2 <= n4 + this.getPosY() + this.getHeight()) {
            for (int i = 0; i < this.lCivs.size(); ++i) {
                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;
                this.setHoveredID(i);
                return;
            }
        }
        this.setHoveredID(-1);
    }

    private final void setHoveredID(int n) {
        if (this.iHoveredID != n) {
            this.iHoveredID = n;
            this.buildElementHover();
        }
    }

    @Override
    protected String getTextToDraw() void buildElementHover() {
        return this.sText;
    }

    @Override
    public void setText(String string) {
        block8: {
            this.sText = string;
try {
            try {
                ArrayList arrayList = new ArrayList();
                ArrayList arrayList2 = new ArrayList();
                
if (string != null) (this.iDiploImageID == Images.diplo_alliance) {
                    CFG.glyphLayout.setText(CFG.fontMain, arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AlliedWith") + ": "));
                    if (CFG.FOG_OF_WAR < 2 || 
this.getText());
                    
lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_war) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AtWarWith") + ": "));
                    if (CFG.FOG_OF_WAR < 2 || 
this.iTextWidth = (int)CFG.glyphLayout.width;
                    
lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_defensive_pact) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DefensivePact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || 
this.iTextHeight = (int)CFG.glyphLayout.height;
lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.top_gold2) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("WarReparations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_relations_inc) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_relations) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsFrom") + ":", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_relations_dec) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DiplomaticRelationsAreSuspended"), CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_loan) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Loans") + ": ", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text("" + this.lCivs.size(), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_gift) {
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        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));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                        arrayList2.clear();
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AGiftFromCivA", CFG.langManager.get("Undiscovered")), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                        arrayList2.clear();
                    }
                } else if (this.iDiploImageID == Images.hre_icon) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("IsPartOfHRE"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_truce) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HasATruceWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_non_aggression) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("NonAggressionPact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_access_has) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GivesMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_access_gives) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HaveMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_guarantee_gives) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_guarantee_has) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeTheirIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName()));
                        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));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_vassal) {
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Vassal") + ": "));
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID), CFG.PADDING, 0));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered"), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1, CFG.PADDING, 0));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_heart) {
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName() + ": "));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(Images.diplo_heart, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else if (this.iDiploImageID == Images.diplo_rivals) {
                    if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName() + ": "));
                        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));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList2.add(new MenuElement_Hover_v2_Element_Type_Image(Images.diplo_rivals, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                } else {
                    if (CFG.FOG_OF_WAR < 2 || this.iTextHeight = 0;
                    this.iTextWidth = 0;
lCivs.get(this.iHoveredID) >= 0) {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(this.iHoveredID)));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(this.iHoveredID)).getCivName(), CFG.COLOR_BUTTON_GAME_TEXT_ACTIVE));
                    } else {
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                        arrayList2.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                    }
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList2));
                    arrayList2.clear();
                }
                this.menuElementHover = new MenuElement_Hover_v2(arrayList);
            }
            catch (IndexOutOfBoundsException indexOutOfBoundsException) {
                if (CFG.LOGS) (this.iDiploImageID == Images.diplo_alliance) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList3 = new ArrayList();
                    arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get(CFG.game.getAlliance(CFG.game.getCiv(CFG.getActiveCivInfo()).getAllianceID()).getAllianceName()), 
CFG.exceptionStack(indexOutOfBoundsException);
COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList3.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList3));
                    arrayList3.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList3.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList3.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList3.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList3));
                        arrayList3.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
            }\n            catch (NullPointerException nullPointerException) {\n                                if (CFG.LOGS) (this.iDiploImageID == Images.diplo_war) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList4 = new ArrayList();
                    arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("AtWarWith"), 
CFG.exceptionStack(nullPointerException);
COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList4.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList4));
                    arrayList4.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList4.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList4.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList4.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList4));
                        arrayList4.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
            }\n            catch (IllegalArgumentException illegalArgumentException) {\n                                if (!CFG.LOGS) break block8;
                
(this.iDiploImageID == Images.diplo_non_aggression) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList5 = new ArrayList();
                    arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HasSignedNonAggressionPactWith"), 
CFG.exceptionStack(illegalArgumentException);
COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList5.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList5));
                    arrayList5.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList5.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList5.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList5.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList5));
                        arrayList5.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_truce) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList6 = new ArrayList();
                    arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("TruceWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList6.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList6));
                    arrayList6.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList6.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList6.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList6.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList6));
                        arrayList6.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_loan) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList7 = new ArrayList();
                    arrayList7.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Loans") + ": ", CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList7.add(new MenuElement_Hover_v2_Element_Type_Text("" + this.lCivs.size(), CFG.COLOR_TEXT_MODIFIER_NEUTRAL));
                    arrayList7.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList7));
                    arrayList7.clear();
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.top_gold2) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList8 = new ArrayList();
                    arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("WarReparations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList8.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList8));
                    arrayList8.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList8.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList8.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList8.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList8));
                        arrayList8.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_defensive_pact) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList9 = new ArrayList();
                    arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DefensivePact"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList9.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList9));
                    arrayList9.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList9.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList9.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList9.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList9));
                        arrayList9.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_relations_inc) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList10 = new ArrayList();
                    arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsWith"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList10.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList10));
                    arrayList10.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList10.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList10.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList10.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList10));
                        arrayList10.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_relations) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList11 = new ArrayList();
                    arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("ImprovingRelationsFrom"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList11.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList11));
                    arrayList11.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList11.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList11.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList11.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList11));
                        arrayList11.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_relations_dec) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList12 = new ArrayList();
                    arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("DiplomaticRelationsAreSuspended"), CFG.COLOR_TEXT_MODIFIER_NEGATIVE2));
                    arrayList12.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList12));
                    arrayList12.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList12.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList12.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList12.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList12));
                        arrayList12.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_gift) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList13 = new ArrayList();
                    arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Gift"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList13.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList13));
                    arrayList13.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList13.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList13.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList13.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList13));
                        arrayList13.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.hre_icon) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList14 = new ArrayList();
                    arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("IsPartOfHRE"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList14.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList14));
                    arrayList14.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList14.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList14.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList14.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList14));
                        arrayList14.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_access_has) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList15 = new ArrayList();
                    arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GivesMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList15.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList15));
                    arrayList15.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList15.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList15.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList15.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList15));
                        arrayList15.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_access_gives) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList16 = new ArrayList();
                    arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("HaveMilitaryAccess"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList16.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList16));
                    arrayList16.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList16.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList16.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList16.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList16));
                        arrayList16.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_guarantee_gives) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList17 = new ArrayList();
                    arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList17.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList17));
                    arrayList17.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList17.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList17.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList17.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList17));
                        arrayList17.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_guarantee_has) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList18 = new ArrayList();
                    arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("GuaranteeTheirIndependence"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList18.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList18));
                    arrayList18.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList18.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                            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));
                            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));
                        } else {
                            arrayList18.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList18.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList18));
                        arrayList18.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_vassal) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList19 = new ArrayList();
                    arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Vassals"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList19.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList19));
                    arrayList19.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList19.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName()));
                        } else {
                            arrayList19.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList19.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList19));
                        arrayList19.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_heart) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList20 = new ArrayList();
                    arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("FriendlyCivilizations"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList20.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList20));
                    arrayList20.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList20.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName() + ": "));
                            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));
                        } else {
                            arrayList20.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList20.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList20));
                        arrayList20.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                if (this.iDiploImageID == Images.diplo_rivals) {
                    ArrayList arrayList = new ArrayList();
                    ArrayList arrayList21 = new ArrayList();
                    arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Enemies"), CFG.COLOR_TEXT_NUM_OF_PROVINCES));
                    arrayList21.add(new MenuElement_Hover_v2_Element_Type_Image(this.iDiploImageID, CFG.PADDING, 0));
                    arrayList.add(new MenuElement_Hover_v2_Element2(arrayList21));
                    arrayList21.clear();
                    for (int i = 0; i < this.lCivs.size(); ++i) {
                        if (CFG.FOG_OF_WAR < 2 || this.lCivs.get(i) >= 0) {
                            arrayList21.add(new MenuElement_Hover_v2_Element_Type_Flag(this.lCivs.get(i)));
                            arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.game.getCiv(this.lCivs.get(i)).getCivName() + ": "));
                            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));
                        } else {
                            arrayList21.add(new MenuElement_Hover_v2_Element_Type_Flag(-1));
                            arrayList21.add(new MenuElement_Hover_v2_Element_Type_Text(CFG.langManager.get("Undiscovered")));
                        }
                        arrayList.add(new MenuElement_Hover_v2_Element2(arrayList21));
                        arrayList21.clear();
                    }
                    this.menuElementHover = new MenuElement_Hover_v2(arrayList);
                    return;
                }
                this.menuElementHover = null;
            }
        }
        catch (IndexOutOfBoundsException indexOutOfBoundsException) {
            this.menuElementHover = null;
        }
    }

    protected private final void setCheckbox(boolean bl) updateMoveable() {
        if (this.getButtonsWidth() - CFG.PADDING > this.checkbox getWidth() - iDiploWidth) {
            this.moveable 
bl;
true;
        } else {
            this.moveable = false;
            this.iButtonsPosX = 0;
        }
    }

    private final int getButtonsWidth() {
        return (CFG.CIV_FLAG_WIDTH + CFG.PADDING) * this.lCivs.size() + CFG.PADDING;
    }

    @Override
    protected boolean getCheckboxState() getMoveable() {
        return this.checkboxState;
moveable;
    }

    @Override
    protected final void setCheckboxState(boolean bl) int getCurrent() {
        return this.checkboxState = bl;
iButtonsPosX;
    }

    @Override
    protected void setTypeOfButton(TypeOfButton typeOfButton) setCurrent(int n) {
        if (n > 0) {
            n = 0;
            CFG.menuManager.setUpdateSliderMenuPosX(true);
            
this.typeOfButton scrollModeY typeOfButton;
false;
        } else if (n < -(this.getButtonsWidth() - this.getWidth())) {
            n = -(this.getButtonsWidth() - this.getWidth());
            CFG.menuManager.setUpdateSliderMenuPosX(true);
            this.scrollModeY = false;
        }
        if (this.iButtonsPosX != n) {
            this.iButtonsPosX = n;
            CFG.setRender_3(true);
        }
    }

    @Override
    protected int getTextWidth() boolean getIsScrollable() {
        return this.iTextWidth;
moveable;
    }

    @Override
    protected int getTextPos() void srollByWheel(int n) {
        return this.iTextPositionX;
scrollModeY = false;
        this.setCurrent(this.getCurrent() + n);
    }

    @Override
    protected int getTextHeight() boolean getAnotherView() {
        return this.iTextHeight;
false;
    }

    static interface TextPosition @Override
    protected final void scrollTheMenu() 
{
        public int getTextPosition();
if (this.moveable && this.iScrollPosX > 0 && this.iScrollPosX2 > 0 && (float)Math.abs(this.iScrollPosX - this.iScrollPosX2) > 3.0f * CFG.DENSITY) {
            this.fScrollNewMenuPosY = (float)(this.iScrollPosX - this.iScrollPosX2) * 1.25f;
            this.scrollModeY = true;
        }
    }

    static interface Checkbox @Override
    protected final void setScrollPosY(int n) 
{
        public void drawCheckBox(SpriteBatch var1, int var2, int var3, boolean var4);
this.iScrollPosX2 = this.iScrollPosX;
        this.iScrollPosX = n;
    }

    @Override
    
protected static enum void setTypeOfButton(Button.TypeOfButton typeOfButton) {
        KEYBOARD,
        KEYBOARD_NUM,
        KEYBOARD_ACTIVE,
        KEYBOARD_SAVE,
        KEYBOARD_OPTIONS;

this.iScrollPosX2 = -1;
        this.iScrollPosX = -1;
        this.scrollModeY = false;
    }

    @Override
    protected void setAnotherView(boolean bl) {
        if (this.iHoveredID >= 0) {
            if (!CFG.game.getCiv(CFG.getActiveCivInfo()).getControlledByPlayer()) {
                CFG.game.disableDrawCivilizationRegions(CFG.getActiveCivInfo());
            }
            CFG.setActiveCivInfo(this.lCivs.get(this.iHoveredID));
            try {
                CFG.game.setActiveProvinceID(CFG.game.getCiv(CFG.getActiveCivInfo()).getCapitalProvinceID());
            }
            catch (IndexOutOfBoundsException indexOutOfBoundsException) {
                // empty catch block
            }
            CFG.updateActiveCivInfo_CreateNewGame();
            CFG.game.enableDrawCivilizationRegions(CFG.getActiveCivInfo(), 1);
        }
    }

    @Override
    protected void setMax(int n) {
        this.row = n == 1;
    }
}