Focus / maybe visible issue

Alundra

08-06-2012 18:24:25

Hi,
New on MyGUI, i have done some works on the gui of the application.All is ok but 4 things need questions :

1) I have a ChatBox, when I press "enter" I set the window visible.Is it possible to set the focus on the EditBox to allow to write directly the message ?
2) If the user select the editbox of the ChatBox, write the message, "enter", I set the ChatWindow not visible but the EditBox stay focus on it.The problem can be reproduced using the console sample.
3) Is it possible to set a cursor who can rotate ?
4) Using "Real" on the gui, the font doesn't scale.One solution ?

Thanks for the help

scrawl

25-07-2012 15:25:55

1) I have a ChatBox, when I press "enter" I set the window visible.Is it possible to set the focus on the EditBox to allow to write directly the message ?

MyGUI::InputManager::getInstance().setKeyFocusWidget(myEditBox);

2) If the user select the editbox of the ChatBox, write the message, "enter", I set the ChatWindow not visible but the EditBox stay focus on it.The problem can be reproduced using the console sample.

just reset the key focus after you hide your window.

MyGUI::InputManager::getInstance().setKeyFocusWidget(NULL);

3) Is it possible to set a cursor who can rotate ?

No, you will need a separate image for each cursor state.

4) Using "Real" on the gui, the font doesn't scale.One solution ?

I would say that's desired behaviour. If you really want/need to scale fonts, adjust the font size manually.