Game Development Community

GuiObjectView - question

by Jorgen Ewelonn · in Torque Game Engine · 03/23/2004 (6:41 am) · 4 replies

Hey all, this is really a noob question since I'm still trying to learn how to work the scripts.
(wonder when I don't need to add that disclaimer anymore). :-)

My question:
I added this to my project:
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=4063
It is the resource to add DTS shapes to a gui.

Anyone using this and have it to show a DTS shape in the MainMenu.gui ?
I want it to show some cool logo on the start menu so ....

You don't really need to tell me how, I'd just like to bash my head bloddy myself until I get it to work.

On a side-note:
It puzzles me where to actually post different questions since the general discussion and the engine specifics seem to contain almost the same questions.

#1
03/23/2004 (6:42 am)
We use a modified version of this control for our vehicle fitting screens. It is really simple to use and the resource pretty much shows in detail, with an example or anything. What problem are you having?
#2
03/23/2004 (6:57 am)
Well John, what I'm trying to do is to add a dts object to the main menu, the one with the start-mission, option and quit buttons etc.
It is meant to show the game logo and perhaps spin a bit while doing it :-)

The thing is, all I've done so far is purely art-related and I have yet to master all basic concepts of TGE scripting. I am probably doing something wrong but to be sure, I was wondering if it was possible to do what I am trying to..

Did I just make things more fuzzy ?? :-)
#3
03/23/2004 (7:13 am)
Well what have you done to try and get this working?

Pretty much go in to the GUI editor, add a control of type GuiObjectView, set the name to something like "view". Then in script, the way we did it with our fitting screen is use the onWake callback:

mainMenuGui::onWake()
{
   // assuming you named you GuiObjectView control "view"
   view.setObject("logo", "blah/data/shapes/logo/logo.dts", "", 0);
}

That will show the DTS file. It won't spin. We had to modify the GUI control to support spinning.
#4
03/23/2004 (7:33 am)
*me blushes*, I should have figured I needed to call the MainMenuGui...

Thank you John, it worked like a charm....
I'll try to read all info I can find on how to script this beast, I feel totally lost, but your explanation made sense.

I'll just add the spin to the animation in the DTS.

Thanks once again...