[DONE]Would need more rows in the ComboBox gui...

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

[DONE]Would need more rows in the ComboBox gui...

Post by christianclavet »

Hi, Looking at the code, I just saw that the combobox is limited to max 5 rows of text.

as this is defined: MaxSelectionRows(5) in

Code: Select all

CGUIComboBox::CGUIComboBox(IGUIEnvironment* environment, IGUIElement* parent,
    s32 id, core::rect<s32> rectangle)
    : IGUIComboBox(environment, parent, id, rectangle),
    ListButton(0), SelectedText(0), ListBox(0), LastFocus(0),
    Selected(-1), HAlign(EGUIA_UPPERLEFT), VAlign(EGUIA_CENTER), MaxSelectionRows(5), HasFocus(false)
{ 
I find it OK as a default value, but would be nice if we could get methods to change the values along the way.
Methods could be like this:

Code: Select all

CGUIComboBox::setMaxSelectionRows (s32 MaxRows)
{
    MaxSelectionRows=MaxRows;
}
 
s32 MaxRows CGUIComboBox::getMaxSelectionRows()
{
    Return MaxSelectionRows;
}
Last edited by christianclavet on Sun Sep 16, 2012 10:52 pm, edited 1 time in total.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Would need more rows in the ComboBox gui...

Post by CuteAlien »

It's already changed like that in trunk ;-)
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
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Re: Would need more rows in the ComboBox gui...

Post by christianclavet »

ha! Cool! :) Thanks CuteAlien! I'm still using 1.7.3 for my project.
Once Irrlicht 1.8 will be out, that will give me another reason to switch the lib inside my project! (changing the cursor pointer is another great thing you added that I will use for the stretching windows I have implemented)
Post Reply