void OnGUI()
    {
        GUI.skin = this.CustomGUISkin;

        CommonMenuUtilities.drawCenterBoxHeader(this.CustomGUISkin, this._title, this._boxWidth, this._boxHeight);

        CommonMenuUtilities.drawSingleLabelLine("BATTLE REPORT");

        GUILayout.FlexibleSpace();

        CommonMenuUtilities.drawSingleLabelLine("Days Fought\t\t" + (this._LevelInformations.getBattleTime() / 1440) + 1);
        GUILayout.FlexibleSpace();

        CommonMenuUtilities.drawSingleLabelLine("Soldiers Remaining\t\t" + this._LevelInformations.getNumSoldiers());
        CommonMenuUtilities.drawSingleLabelLine("Soldiers Lost\t\t" + this._LevelInformations.getNumSoldiersKilled());
        GUILayout.FlexibleSpace();

        CommonMenuUtilities.drawSingleLabelLine("Enemies Remaining\t\t" + this._LevelInformations.getNumEnemies());
        CommonMenuUtilities.drawSingleLabelLine("Enemies Killed\t\t" + this._LevelInformations.getNumEnemiesKilled());
        GUILayout.FlexibleSpace();

        if (GUILayout.Button("Continue"))
        {
            this.GuiAudioSource.PlayOneShot(this.Click1);
            this._ContinueResponseFunction();
        }
        GUILayout.FlexibleSpace();

        CommonMenuUtilities.endCenterBox();
    }
Пример #2
0
    void OnGUI()
    {
        GUI.skin = this.CustomGUISkin;

        //Replace "briefing" with the name of the map or something (should be in the intro text file)
        CommonMenuUtilities.drawCenterBoxHeader(this.CustomGUISkin, "", this._boxWidth, this._boxHeight);

        GUILayout.FlexibleSpace();

        this._drawPicture();

        GUILayout.FlexibleSpace();

        this._drawText();

        GUILayout.FlexibleSpace();
        if (GUILayout.Button("Continue"))
        {
            this.GuiAudioSource.PlayOneShot(this.Click1);
            this._ContinueResponseFunction();
        }
        ;
        GUILayout.FlexibleSpace();

        CommonMenuUtilities.endCenterBox();
    }
    public static void drawOptionsMenu(GUISkin CustomGuiSkin)
    {
        CommonMenuUtilities.drawCenterBoxHeader(CustomGuiSkin, "OPTIONS", CommonMenuUtilities._mainMenuWidth, CommonMenuUtilities._mainMenuHeight);

        CommonMenuUtilities.drawButton("Back", exitOptions);

        CommonMenuUtilities.endCenterBox();
    }
Пример #4
0
    private void _drawPauseMenu()
    {
        if (CommonMenuUtilities.showOptions)
        {
            CommonMenuUtilities.drawOptionsMenu(GUI.skin);
            return;
        }

        CommonMenuUtilities.drawMainMenuHeader(GUI.skin);

        CommonMenuUtilities.drawButton("Resume Game", unpauseGame);

        CommonMenuUtilities.drawCommonMainMenuItems();

        CommonMenuUtilities.endCenterBox();
    }
Пример #5
0
    void OnGUI()
    {
        GUI.skin = this.CustomGUISkin;

        if (CommonMenuUtilities.showOptions)
        {
            CommonMenuUtilities.drawOptionsMenu(GUI.skin);
            return;
        }

        CommonMenuUtilities.drawMainMenuHeader(GUI.skin);

        CommonMenuUtilities.drawButton("Start Game", startGame);

        CommonMenuUtilities.drawCommonMainMenuItems();

        CommonMenuUtilities.endCenterBox();
    }
Пример #6
0
    private void _drawPotentialSelectableUnitsBox()
    {
        CommonMenuUtilities.drawMainMenuHeader(GUI.skin, "Select Unit");

        foreach (GameObject SelectableUnit in this._Player.PotentialSelectedUnits)
        {
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            //Just display the first squaddie info for now
            //In reality we should display the leader stuff
            Unit        UnitInfo      = SelectableUnit.GetComponent <Unit>();
            SquadMember FirstSquaddie = UnitInfo.SquadMembers[0] as SquadMember;

            GUILayout.Label(FirstSquaddie.SquadViewTexture);
            GUILayout.Space(10.0f);
            if (GUILayout.Button(FirstSquaddie.name))               //Player selected one of these guys

            {
                this.GuiAudioSource.PlayOneShot(this.Click1);
                Time.timeScale = 1;
                this._Player.PotentialSelectedUnits.RemoveRange(0, this._Player.PotentialSelectedUnits.Count);
                this._Player.SelectedUnit = SelectableUnit;

                //Unit.displaySelectSprite() should already handle deselecting previously-selected unit
                this._Player.displaySelectSprite();
                break;
            }

            GUILayout.FlexibleSpace();

            GUILayout.EndHorizontal();

            //For vertical space
            GUILayout.FlexibleSpace();
        }

        CommonMenuUtilities.endCenterBox();
    }