how can i make a Edit Box?

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
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

how can i make a Edit Box?

Post by mepatuhoo »

how can i use the addEditBox() every time i use it like the addListBox() it will not work. i can get the addListBox() to work on my program but if i swich it with addEditBox() to get a box that the user can type in it has errors. how should i go about setting up an addEditBox()
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

are you passing the correct parameters to addEditBox?
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

how should i pass the parameters are they the same as addListBox()?
pfo
Posts: 370
Joined: Mon Aug 29, 2005 10:54 pm
Location: http://web.utk.edu/~pfox1

Post by pfo »

how should i pass the parameters are they the same as addListBox()?
I doubt it, to find out, go to the Irrlicht website, go to API then search for the addEditBox function. Take a look at the parameters you can pass to setup an editbox.
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

i looked at it and i dont know how its explaining the function. could you show and example code that could help me out. or explain how to read the api i dont understand what part is the part you use to make the edit box :(
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

We can try it the other way around: Show us how you use addEditBox() now and show us the errors you get.
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

IGUIEditBox (rect< s32 > (210, 380, 330, 400));


and the errors are

Project\main.cpp #include expects "FILENAME" or <FILENAME>
Project\main.cpp In function `int main()':
Project\main.cpp cannot allocate an object of type `irr::gui::IGUIEditBox'
Project\main.cpp because the following virtual functions are abstract:
irrlicht-0.14.0\irrlicht-0.14.0\include\IGUIEditBox.h virtual void irr::gui::IGUIEditBox::setOverrideFont(irr::gui::IGUIFont*)
irrlicht-0.14.0\include\IGUIEditBox.h virtual void irr::gui::IGUIEditBox::setOverrideColor(irr::video::SColor)
irrlicht-0.14.0\include\IGUIEditBox.h virtual void irr::gui::IGUIEditBox::enableOverrideColor(bool)
irrlicht-0.14.0\include\IGUIEditBox.h virtual void irr::gui::IGUIEditBox::setMax(irr::s32)
irrlicht-0.14.0\include\IGUIEditBox.h virtual irr::s32 irr::gui::IGUIEditBox::getMax()
irrlicht-0.14.0\examples\Project\Makefile.win [Build Error] [main.o] Error 1

thats all the error's
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

Ok you just aren't calling addEditBox() at all. What you do is trying to create it per constructor call, which is not possible for an interface.

Just use addEditBox instead: http://irrlicht.sourceforge.net/docu/cl ... nt.html#a4

You also might want to read the gui tutorial: http://irrlicht.sourceforge.net/tut005.html

Also correct the #include statement the compiler complains about.
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

could you show me an example of a working edit box code
Baal Cadar
Posts: 377
Joined: Fri Oct 28, 2005 10:28 am
Contact:

Post by Baal Cadar »

We're going in circles here. What part from my answer and the manual and the tutorial did you not understand? What specific problem do you have after reading this?

I can only speak for myself: I am willing to help, but I won't let you get away the lazy way. :)
mepatuhoo
Posts: 42
Joined: Mon Dec 19, 2005 2:16 am

Post by mepatuhoo »

well i looked at the api and i just dont get it. now if the api showed and example and then explaned how to change things by using the example code then that could help. but the api code has nothing with real varibles that would make sence. like where do i put the x and y stuff and is there anything else that i need in it . it dusnt show that in the api. it shows stuff lile rectangle and other things that if you tryed using bring back errors i tend to work good off of example code but how they explan it in the api i just dont get. i need a cheat sheet just to understand the api. :cry:
Post Reply