Exemplo n.º 1
0
    void OnGUI()
    {
        GUI.DrawTexture(screenArea, splashBackground, ScaleMode.ScaleAndCrop, false, 0);

        GUILayout.BeginArea(guiArea);
        GUILayout.BeginVertical();
        GUILayout.Label("Galactoid", GuiFunctions.getTitleStyle());
        GUILayout.Label(currentSubtitle, GuiFunctions.getSubtitleStyle());
        GUILayout.EndVertical();

        if (currentMenu == Menus.main)
        {
            drawMain();
        }
        if (currentMenu == Menus.loadGame)
        {
            drawLoadGame();
        }
        if (currentMenu == Menus.newGame)
        {
            drawNewGame();
        }

        GUILayout.EndArea();
    }
Exemplo n.º 2
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);
    }