Questions about IGUITable

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
merovingian
Posts: 37
Joined: Thu Feb 28, 2008 4:34 am
Location: Perth, Western Australia

Questions about IGUITable

Post by merovingian »

I'm trying to use IGUITable for the first time. I think the answer to all the following questions is no, but I am seeking confirmation in case I misunderstand something:

- is it possible to add a column without a caption header?
- is it possible to not have an active column (so I don't have that triangle icon)?
- is it possible to change the colours of the table (such as the 3D highlighting) without affecting the colours of other GUI elements such as buttons?

I ask these questions because I have a two-column table, where each row is a name-value pair - cell values are not changeable by the user, and the columns don't need headings.
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

You don't have to set a caption text, so using L"" as caption would get you an empty header. The row for the header can not be removed currently as far as I see - you might add that wish to the features-tracker, I think it's useful and not hard to do and that way you remind us to think of it.

You should be able to remove the triangle icon by setting yourTable->setDrawFlags(EGTDF_ROWS|EGTDF_COLUMNS).

And no - changing colors always affects the whole skin currently (except in some elements which allow setting override colors).

The easiest way to change that currently would be creating your own table element. You could start with CGUITable sources and adapt them.
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
merovingian
Posts: 37
Joined: Thu Feb 28, 2008 4:34 am
Location: Perth, Western Australia

Post by merovingian »

Thanks for that.

I tried setDrawFlags() as you suggested, but it didn't kill the triangle icon.

Regarding colours, it seems I could create two skins and call the individual draw() methods of each GUI element rather than the drawAll() method of the GUI environment. This still doesn't solve the problems of empty headers or the triangle icon. Also, I would like to change the cell spacing and padding. So it seems I will create my own table as you suggested. Thanks again.
CuteAlien
Admin
Posts: 9716
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

merovingian wrote: I tried setDrawFlags() as you suggested, but it didn't kill the triangle icon.
Hm, I see - just checked source and it only seems to suppress the highlighting. I have to check that some time, I think that should be changed.
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