IGUIEnvironment::get/setFocus?

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
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

IGUIEnvironment::get/setFocus?

Post by arras »

What exactly IGUIEnvironment::getFocus() and IGUIEnvironment::setFocus() funcions does?
Dances
Posts: 454
Joined: Sat Jul 02, 2005 1:45 am
Location: Canada
Contact:

Post by Dances »

You can get what element is being focused or set it. that is to say if you have a drop down list, a scroll bar, and a button, and you use get focus, irr will tell you whichever is being used or was last used. Set focus will force focus onto one of those elements.

When you click in a text box to type a message here that text box has focus. When you click another one that other one will have focus. When you click a button or an emote, that button or emote gets focus. I hope this makes sense.
eneru
Posts: 40
Joined: Tue Apr 10, 2007 8:38 am

Post by eneru »

btw, last time i tested the focus on a editBox was kept even after the element was hidden via a setVisible(false) => is it normal behaviour or a bug ??
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

Dances >> Yes thats make sense. Thanks a lot.
Post Reply