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?
noob question - tabs?
-
- Posts: 45
- Joined: Thu Apr 24, 2008 7:54 pm
- Location: Wickede, Germany
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
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
-
- Posts: 26
- Joined: Tue Nov 11, 2008 5:20 pm
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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm