Game Development Community

We have no init.cs

by Matthew W · in Game Design and Creative Issues · 02/28/2008 (9:58 pm) · 2 replies

Hi.


We cant figure out how to open previously saved GUIs. While reading this tutorial i saw they talked about having to update a file called init.cs. There is one in the /starter.fps/client folder like the tutorial points out, but we are using a /tutorial.base starting point and /tutorial.base/client doesnt have one.

How do we get our GUIs to work?

#1
02/29/2008 (1:52 pm)
Copy the starter.fps/client/init.cs over to tutorial.base/client/ and make sure all the paths are correct.
#2
02/29/2008 (2:32 pm)
Actually, i just figured it out and came back here to post the solution for others. Thank you for spending your time to answer my question. :) Here is a way to make it work with a new GUI file named NewGui.gui:

1) Place the new GUI file NewGui.gui in /tutorial.base/client/ui.

2) Go to the /tutorial.base folder and open main.cs

3) Find the function initClient() and add the following line of code at the end of the section "// Load up the shell and game GUIs."

exec("./client/ui/NewGui.gui");

Now, when you run torqueDemo and press 'F10' key to open up the GUI Editor, the second drop-down list at the top will contain NewGui.gui for you to select. Also, instead, you can open the console and type:

Canvas.pushDialog(NewGui);