Multiple Sheet question


20-10-2007 19:16:55


I want to use multiple sheets:
one for the ingame HUD and one for the ingame Menu / server stats.

Now when I write

this->ingameMenuSheet = GUIManager->createSheet();
this->ingameMenuSheet->setName( "ingameMenuSheet" );

this->hudSheet = GUIManager->createSheet();
this->hudSheet->setName( "hudSheet" );

followed by some other code creating labels...

and later on I want to access the sheets:

this->GUIManager->getSheet( "hudSheet" )

It doesn't seem to be able to find the sheet.

Am I understanding something wrong here?

I'm using the current svn-version of quickgui.

Are sheets thought to be used this way?
Or should I use two GUIManagers instead?

Thanks in advance!



20-10-2007 19:56:50

You are correct in its use, it may be a bug, I'll look into it. I have to run out for now, but in order to display a sheet, you should call

mGUIManager->setActiveSheet(ingameMenuSheet );

I'll see what I can find later today.


21-10-2007 00:25:25

Yep, dumb mistake. Forgot the line of code to push the reference of the Sheet onto the vector.. :oops:

Latest revision has the fix committed. Thanks for bringing this up!


21-10-2007 11:13:44

It works great now!

At this point I'd like to say: thanks for your work, quickGUI is a real charm!
It perfectly fits in our app (university project / game).

Just a few lines of code, and you have a gui :)

Keep it up!