예제 #1
0
    private void drawNewGame()
    {
        GUILayout.BeginHorizontal();
        GUILayout.Space(buttonSpace);
        GUILayout.BeginVertical();

        GUILayout.Label("Ship Name:", GuiFunctions.getButtonStyle());
        newShipName = GUILayout.TextField(newShipName);

        {
            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("Begin", GuiFunctions.getButtonStyle()))
            {
                menuAction = MenuActions.submitNewGame;
            }

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }

        GUILayout.EndVertical();
        GUILayout.Space(buttonSpace);
        GUILayout.EndHorizontal();
    }
예제 #2
0
    private void drawMain()
    {
        GUILayout.BeginHorizontal();
        GUILayout.Space(buttonSpace);
        GUILayout.BeginVertical();

        if (GUILayout.Button("New Ship", GuiFunctions.getButtonStyle()))
        {
            menuAction = MenuActions.newGame;
        }
        if (GUILayout.Button("Continue", GuiFunctions.getButtonStyle()))
        {
            menuAction = MenuActions.loadGame;
        }
        if (GUILayout.Button("Exit", GuiFunctions.getButtonStyle()))
        {
            menuAction = MenuActions.exitGame;
        }

        GUILayout.EndVertical();
        GUILayout.EndHorizontal();
    }
예제 #3
0
    public MenuActions draw()
    {
        MenuActions menuAction = MenuActions.none;

        GUI.DrawTexture(splashArea, mainBackground, ScaleMode.ScaleAndCrop, false, 0);

        GUILayout.BeginArea(guiArea);
        GUILayout.BeginVertical();
        {
            GUILayout.Label("Galactoid", GuiFunctions.getTitleStyle());
            GUILayout.Label("Pause", GuiFunctions.getSubtitleStyle());

            GUILayout.FlexibleSpace();

            GUILayout.BeginHorizontal();
            {
                GUILayout.Space(buttonSpace);
                GUILayout.BeginVertical();
                GUILayout.FlexibleSpace();
                if (GUILayout.Button("Resume", GuiFunctions.getButtonStyle()))
                {
                    menuAction = MenuActions.resumeGame;
                }
                if (GUILayout.Button("Save & Exit", GuiFunctions.getButtonStyle()))
                {
                    menuAction = MenuActions.gotoMainMenu;
                }
                GUILayout.EndVertical();
            }
            GUILayout.EndHorizontal();
        }
        GUILayout.EndVertical();
        GUILayout.EndArea();

        return(menuAction);
    }