Page 1 of 1

IGUIEnvironment::get/setFocus?

Posted: Thu Jun 21, 2007 5:27 pm
by arras
What exactly IGUIEnvironment::getFocus() and IGUIEnvironment::setFocus() funcions does?

Posted: Thu Jun 21, 2007 6:10 pm
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.

Posted: Thu Jun 21, 2007 6:59 pm
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 ??

Posted: Thu Jun 21, 2007 10:42 pm
by arras
Dances >> Yes thats make sense. Thanks a lot.