GuiEditor not giving scrollable window

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
qwertyCoder
Posts: 40
Joined: Wed May 07, 2008 4:37 pm
Location: Asheville, NC, USA

GuiEditor not giving scrollable window

Post by qwertyCoder »

Im trying to use the guieditor that comes with irrlicht 1.7 but when i have any element selected and go to the elements properties, the properties are listed to where a scrollbar would be needed to scroll down to edit all the options.. i can only resize the toolbox so far and its not enough...any ideas?
---------------------------------------

Code: Select all

int main()
{
	if (bCodeDoesntWork)
	{
		int res = AttemptFix(this);
		if (failed(res))
		{
			PullHair();
		}
	}
}
---------------------------------------
qwertyCoder
Posts: 40
Joined: Wed May 07, 2008 4:37 pm
Location: Asheville, NC, USA

Post by qwertyCoder »

so turns out this is a "bug" thats been posted on before....any fixes?
---------------------------------------

Code: Select all

int main()
{
	if (bCodeDoesntWork)
	{
		int res = AttemptFix(this);
		if (failed(res))
		{
			PullHair();
		}
	}
}
---------------------------------------
Shenjoku
Posts: 1
Joined: Thu Jul 30, 2009 6:45 am

Re: GuiEditor not giving scrollable window

Post by Shenjoku »

Bumping because this bug is still active and needs to be fixed! This makes it IMPOSSIBLE to use the editor.

EDIT: Found the fix! Inside of CGUIAttributeEditor::refreshAttribs() inside of the for loop that creates all of the attributes the following lines need to be changed/added:

Original code:

Code: Select all

if (n)
{
  // add custom attribute editor
  AttribList.push_back(n);
  n->setParentID(getID());
  n->grab();
}
else
{
  // create a generic string editor
  AttribList.push_back(new CGUIStringAttribute(Environment, this, getID()));
  // dont grab it because we created it with new
}
Fixed code:

Code: Select all

if (n)
{
  // add custom attribute editor
  AttribList.push_back(n);
  n->setParentID(getID());
  n->grab();
}
else
{
  // create a generic string editor
  n = new CGUIStringAttribute(Environment, this, getID());
  AttribList.push_back(n);
  // dont grab it because we created it with new
}
 
// Add the element as a child so the scroll bar will appear when needed
addChild(n);
CuteAlien
Admin
Posts: 9935
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: GuiEditor not giving scrollable window

Post by CuteAlien »

Ok, nearly forgot about that one, sorry for taking that long. And thanks for the patch - needed another change to work, but it pushed me in the right direction. Is now fixed in 1.7 release branch and trunk will follow soon.
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