Changing MainView

Hello, I my proyect I have many Views. For example
Default, the project starts with Main view. But How Can I change this?. How can I do to start with Menu, for example?



In GameInitialize file you have initialization section (see the lowest part of the unit). There you have Application.OnInitialize := @ApplicationInitialize; ---- which refers to procedure ApplicationInitialize slightly above. And in the end of ApplicationInitialize you have Window.Container.View := ViewMain; — this means that right after initialization, ApplicationInitialize will be called, which in turn will make ViewMain the first screen to show. Change it to any other view you have in your game e.g. Window.Container.View := ViewWelcomeScreen; and it will show that one the first.

To provide a concrete example: see e.g. gameinitialize.pas unit in fps_game demo, this line:

You can just change

Window.Container.View := ViewMenu;

to e.g.

Window.Container.View := ViewPlay;

to start from ViewPlay.