Game Development Community

GuiTextEditCtrl - focus issues

by Orion Elenzil · in Torque Game Engine · 12/29/2005 (3:35 pm) · 1 replies

So i added a GuiWindowCtrl to the playGUI,
and in the GuiWindowCtrl is a GuiTextEditCtrl.

Two issues immediately pop up:

1. once the user clicks in the TextEdit, the text edit doesn't give up focus until the user presses return or tab.
- including clicking on empty space in the WindowCtrl or in empty space in the main PlayGUI.
- which means that keystrokes for navigating etc are sent to the text edit.
- it'd be nice if a click on empty space took focus away from the TextEdit.

2. assuming the TextEdit does have focus, the user has typed some text and pressed return, the TextEdit then gives up focus, and if the user wants to type more text, they need to click in the TextEdit again.
- how can i have that not happen ?


I'm not seeing much support in torque script for GUI focus control, is that the case ?

tia,
orion

#1
12/31/2005 (6:47 pm)
There's quite a bit of focus control ability. Have you looked at the setFirstResponder stuff?

Torque's GUI is NeXT flavored so it can be a little weird initially.