Game Development Community

GuiMLTextEditCtrl, keyboard focus issues

by Ingo Seidel · in Torque Game Engine Advanced · 05/20/2009 (1:28 am) · 0 replies

Hi,

I have a dialog with a multi line text control (GuiMLTextEditCtrl) in the game. The user should be able to enter some text in this field while in the game. However, when entering text, the key strokes are not consumed by the GuiMLTextEditCtrl and are also processed by the key map again, i.e. when typing a "w", the "w" will appear in the text window and the avatar will also move forward. How can I set the focus to lie entirely in the GuiMLTextEditCtrl? The same thing works perfectly for GuiTextEditCtrls - in this case the focus is solely on the input box and the avatar does not move when "asdw" is pressed.

Also, the GuiMLTextEditCtrl only works if I put it in a GuiControl that is itself contained in a GuiScrollCtrl. If add the GuiMLTextEditCtrl directly to the window or add it directly to the GuiScrollCtrl, I won't be able to type text into the input field.

best regards

ingo