[fixed]Edit box problem.
[fixed]Edit box problem.
I have this little problem with irrlicht's edit boxes.
I can't find the right words to describe this so I made the screenshot:
When I selected rotation field it got okay, but I would like it to be like that from the start, because I can't see the whole/any text that was set.
I can't find the right words to describe this so I made the screenshot:
When I selected rotation field it got okay, but I would like it to be like that from the start, because I can't see the whole/any text that was set.
Working on game: Marrbles (Currently stopped).
Re: Edit box problem.
Sorry i dont see whats wrong?
Re: Edit box problem.
look at value for rotation, it's "3(0,0,0)". The full text should be "vec3(0,0,0)". I seem to have found the problem, though I can't fix it for constructor.
The code I used before was:
And when I changed that to:
It works okay. Though I'd prefer to be able to set that from the addEditBox(...) function.
The code I used before was:
Code: Select all
ebox=GUIEnvironment()->addEditBox(irr::core::stringw(myString().c_str()).c_str(),irr::core::recti(0,0,0,0),true,0,-1);
Code: Select all
ebox=this->m_device->getGUIEnvironment()->addEditBox(L"",irr::core::recti(0,0,0,0),true,0,-1);
ebox->setAutoScroll(false);
ebox->setText(irr::core::stringw(myString().c_str()).c_str());
Working on game: Marrbles (Currently stopped).
-
- Posts: 758
- Joined: Mon Mar 31, 2008 3:32 pm
- Location: Bulgaria
Re: Edit box problem.
I guess he refers to the position and scale editboxes, where the "3" should be vec3, but it`s cut off for some reason.
EDIT: Looks like serengeor was faster =P
EDIT: Looks like serengeor was faster =P
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Re: Edit box problem.
I recently started changing a few things for editbox. Which Irrlicht version are you using?
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
Re: Edit box problem.
From SVN revision 3804 I think.
Edit: So I guess I can call this one pretty much solved
Edit: So I guess I can call this one pretty much solved
Working on game: Marrbles (Currently stopped).
Re: Edit box problem.
I don't know - I haven't seen that problem so far. I'm irritated by irr::core::recti(0,0,0,0) - that doesn't look like a valid rectangle - but in your screenshots you seem to use other values. Do you have some code which I can use to reproduce the bug exactly? Then I can try if this is fixed or still has to be fixed.serengeor wrote:From SVN revision 3804 I think.
Edit: So I guess I can call this one pretty much solved
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
Re: Edit box problem.
Here it is:CuteAlien wrote:Do you have some code which I can use to reproduce the bug exactly? Then I can try if this is fixed or still has to be fixed.
Code: Select all
#include "irrlicht.h"
int main()
{
irr::IrrlichtDevice * device = irr::createDevice(irr::video::EDT_OPENGL);
irr::gui::IGUIEnvironment * env = device->getGUIEnvironment();
irr::gui::IGUIEditBox * ebox=env->addEditBox(irr::core::stringw("somevalue").c_str(),irr::core::recti(0,0,0,0),true,0,-1);
irr::gui::IGUIEditBox * ebox2=env->addEditBox(irr::core::stringw("someothervalue").c_str(),irr::core::recti(0,0,0,0),true,0,-1);
ebox->setRelativePosition(irr::core::recti(0,0,120,20));
ebox2->setRelativePosition(irr::core::recti(0,0,160,20));
ebox->setRelativePosition(irr::core::position2di(10,10));
ebox2->setRelativePosition(irr::core::position2di(10,40));
while(device->run())
{
device->getVideoDriver()->beginScene();
env->drawAll();
device->getVideoDriver()->endScene();
}
}
Working on game: Marrbles (Currently stopped).
Re: Edit box problem.
Ok, thanks - I can reproduce it with this code. The problem is that you have autoscroll enabled and a tiny rect when you set your first text. So it scrolls to the end because that's what autoscroll does. And that is still the scroll-position when you change the rectangle size later on - I suppose it needs to be reset there to 0 probably. I just have to think some more about it if this could cause any troubles (probably not). But will get to it in the evening (or one of the next evenings...).
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
Re: Edit box problem.
Fixed in svn release branch 1.7 in r3873. Will be in trunk 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
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm