Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: MilesMando on Thu 24/05/2007 16:12:22

Title: Trouble with a TEXT BOX ( input box ) and AZERTY keyboard layout.(accented char.
Post by: MilesMando on Thu 24/05/2007 16:12:22
Hello and first of all thank you for all.

...and sorry because I do not control English well.

Im code noob so,

How to use the keys of a foreign keyboards in a control “text box” (input) ?
because for the french AZERTY keyboard the digits 0 to 9 are on the same keys, but to be typed the shift key must be pressed. The unshifted positions are used for accented characters.

or

how to simulate a striking of key when input box is active ??,
this dont work and freeze the game like a pause:

(in interface click)


if ((interface == 14) && (button == 9)) {
on_key_press(49);

String text = cororep2.Text;
text = text.Append("à _ my accented character");
cororep2.Text = text;

return;
 
}
}





thank you miles time and that the angel for the videogames you guards all !
Title: Re: Trouble with a TEXT BOX ( input box ) and AZERTY keyboard layout.(accented c
Post by: MilesMando on Thu 24/05/2007 18:07:36
OK sorry its solved

Just set the gui "persistent" and put the code on "on key pressed" :



if (keycode==233) {    //for exempl the french "a" with an accent
  String text = mycontrol.Text;
  text = text.Append("x");   //  x is the character
  mycontrol.Text = text;
}