Game Development Community

Is it possible to implement a GUI like this in Torque?

by PJjerry · in Torque Game Engine · 05/12/2006 (4:04 pm) · 11 replies

The screanshot looks like this.

With charts, tabs for classificaion, and of course a 3D scene, and a real-time input/bounce message textboxes.

Any ideas? Or what resource existed I should check out?

Thanks in advance!!

#1
05/12/2006 (4:14 pm)
Yes, but it is not trivial. Look at Constructor and ShowTool Pro. Both use Torque and a number of great GUI enhancements. Btu they aren't trivial enhancements. I would recommend playing with the showtool that comes with the engine first and look at how it works. And then work from there.
#2
05/12/2006 (4:21 pm)
Thanks for the direction.

I think the most part I need are the tables, which I couldn't find any info in the show engine code.

I also have Showtool Pro but the code is protected...

Do you have any more suggestion?

Another quick question is was the Constructor released? I saw tons of beta shipping news, read some blogs and threads, but right now I am just waiting the gg guys to update their front webpages to "hey! Constructor is shipping!" :)

You know the correct milestone?


Thank again for the rapid reply! :D
#3
05/12/2006 (5:01 pm)
Jerry, you're not very clear on what you want. First you're talking a GUI with a scene, then it's all full fledged 3d mesh editor (ala Constructor).

If you want a 3D mesh Editor, like Constructor - it will not be easy. But that's not the impression I got from your first post, although David's suggests it.

If you indeed just want what you described in your initial post, then it's easy.

Have you checked out the in-engine editors that come with Torque? They are basically what you're asking for, I would check them out to see how they are done. A few GUI elements, and a gameTsControl which renders the scene of your choice.
#4
05/12/2006 (5:33 pm)
Re Tables,
i think you would have to implement a guiTableControl yourself,
altho there are existing controls which could help start you in the right direction.

specifically the tree and textlist controls.
#5
05/12/2006 (5:44 pm)
No. Constructor hasn't been released yet. We are all waiting. I was speaking specifically of the screenshots and 3D view, guides, and such from Dave's blogs.
#6
05/12/2006 (7:38 pm)
Thanks a lot. I'll do my homework and figure it out :)

@Stefan:
I just need a GUI with some tables like the snapshot I've given.

@Orion:
The info is extremely useful. Thanks a lot!

@David:
Thanks for your follow-up.
#7
05/13/2006 (2:42 am)
@PJerry,

Yes, you can make tables in Torque GUI, I've recently made a game that needed a level configuration tool. Imagine a Pac-Man maze where you must configure how many cherries and grapes you should get and the order you should get them.

The trick was doing a mix of GUI edditing and scripting. Create a container and insert the elements you need thru scripting the container's on wake function.

HTH
#8
05/13/2006 (10:32 am)
@Bruno,

Thanks the detailed explaination! :D

The "scripting" you mentioned refers to the *.gui file, or I have to hardcode it in the *.cs file?

So, sounds like it's possible to *dymatically* add or remove a row if using the scripting, isn't it?

My intension is to load a bunch of data recordset from a database and show them in the table; something like the V2 component "dataset" in Flash 7 or higher.
#9
05/13/2006 (6:31 pm)
First of all, keep in mind that .gui files ARE .cs files they are both written in TorqueScript.

If you edit a .GUI file you'll see a huge :
new whateverGuiObject(YourGuiObjectName) 
{ 
    new whateverElseObject()
          { name = "whatever"; size = ..... } 
}

It's just nicer to keep the onWake function next to the waked object. So it would go on like this :
function whateverElseObject::OnWake(%this)
{
    // create the table
   new IdontKnowTheSintaxTable(MyTable)
   {
       numRows = %rows;
       numCols = %cols;
   } 

   // read the file
   
  while !eof
      // insert each row in table

}

function whateverElseObject::OnSleep(%this)
{
   // delete MyTable
}
#10
05/14/2006 (9:40 am)
The GuiTextListCtrl can do very simple tables. It allows you to add/modify/remove/sort rows and have multiple cells in a row by using tab characters. You can set each table size in pixels as well.

It's nice for simple table display tasks, but you'd need to extend if it you want to draw the cell boerds, user-resizeable cells or multi-line text support.
#11
06/07/2006 (9:47 am)
Thank Bruno again for your further explaination!
And thank you Manoel, too!