noob question - tabs?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
dark chazz
Posts: 26
Joined: Tue Nov 11, 2008 5:20 pm

noob question - tabs?

Post by dark chazz »

sorry if I'm totally a noob but I got confused between IGUITabControl and IGUITab.

so can anyone tell me how I can add tabs to a window?
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

Hi dark chazz!

the IGUITabControl contains the whole TabWindow inclusive all Tabs added about IGUITabControl->addTab().

Simply read the API: http://irrlicht.sourceforge.net/docu/cl ... ntrol.html for IGUITabControl

and

http://irrlicht.sourceforge.net/docu/cl ... i_tab.html for IGUITab
dark chazz
Posts: 26
Joined: Tue Nov 11, 2008 5:20 pm

Post by dark chazz »

hmm....

can you post a code here that creates tabs in a window , please?
CuteAlien
Admin
Posts: 9694
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Some tabs, untested but probably working:

Code: Select all

       // ok this line depends on from where you get the environment
	irr::gui::IGUIEnvironment * env = GetGUIEnvironment();
	if ( !env )
		return;

	core::rect<s32> rect(10,10,300,100);

	IGUITabControl* tabCtrl1 = env->addTabControl (rect, NULL, false, true, -1);
	if ( tabCtrl1 )
	{
		tabCtrl1->addTab (L"caption_tab", -1);
		tabCtrl1->addTab (L"caption_tab 2", -1);
		tabCtrl1->addTab (L"caption_tab 3", -1);
	}
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply