Agnostic
Member
|
Set focus on text input.
How I can focus a textbox gui?
I have my GUI with:
window+=addtext .create(Rect_C(window.crect.w()/2.7, -0.67f, 0.6f, 0.06f),"").desc("CHAT MESSAGE.");
if(Kb.bp(KB_ENTER))
{
SET FOCUS HERE??
}
Thank u!
|
|
10-03-2011 06:41 AM |
|
Zervox
Member
|
RE: Set focus on text input.
Code:
if(Kb.bp(KB_ENTER)){
addtext.activate();
}
(This post was last modified: 10-03-2011 07:25 AM by Zervox.)
|
|
10-03-2011 07:25 AM |
|
Driklyn
Member
|
RE: Set focus on text input.
|
|
10-03-2011 07:47 AM |
|
Agnostic
Member
|
RE: Set focus on text input.
Code:
if(Kb.bp(KB_ENTER)) {
if (activachat){
keyboard_disable=true;
addtext.kbSet();
} else {
if (addtext() != ""){
AddMessage("Msg");
}
keyboard_disable=false;
addtext.deactivate();
addtext.clear();
}
activachat = !activachat;
}
Its working, thanks!
|
|
10-03-2011 03:50 PM |
|