Topic: Add new menu screens

What I want to do is add a button that says "Play" to my main menu, and when they click that players will be able to then see the Story Mode, Verses, Online, and Training Mode options.

I see the Screens under Global > GUI Options > Screens, however, there are no options to add screens. I assume I have to code in additional screens which is fine as I have Source.

I have duplicated the MainMenu screen and edited it how I like, with a button on the screen that says "play", however I can not find what script the "DefaultMainMenuScreen._____" functions are. I understand I can just duplicate the code and change the names, I just don't know what file they are in.

If some one could point me in the direction, or show me a better way of doing this, I would appreciate it. I can also provide pictures if I need to.

Share

Thumbs up Thumbs down

Re: Add new menu screens

I have made some progress. I went into the UFE.cs file itself and duplicated all the code I could see that pointed to another screen (as in I used the options menu as a template, and copied everything related to calling the options menu, then changed it to the "PlayScreen"). The main compiler error I am getting now is
"Assets\UFE\Engine\Scripts\Core\Manager\UFE.cs(709,9): error CS0246: The type or namespace name 'PlayScreen' could not be found (are you missing a using directive or an assembly reference?)"

The code it is talking about is
"    public PlayScreen GetPlayScreen(){
        return UFE.config.gameGUI.playScreen;
    }"

Which I just copied from line 681 of the UFE.cs script which says "
    public static OptionsScreen GetOptionsScreen(){
        return UFE.config.gameGUI.optionsScreen;
    }"

I do not see any other instance that I am missing to reference to the Play screen script that I made.

My play screens public class is DefaultPlayScreen : PlayScreen.

I can not attach it to the PlayScreen UI_Prefab because of the compiler error.

Share

Thumbs up Thumbs down