Example #1
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();
    }
Example #2
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();
    }
Example #3
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();
    }