I’m designing a user interface for a simple racegame and have made a level where the players can give in their names.
the textarea’s are created inside a FOR-loop limited by the amount of players. by default i’ve set these values to player1,2,…
Is there a way I can somehow access the events called when a textarea is selected so I can
1)clear the default text
or
2)select the default text so it dissapears upon new input ?
My code so far
var arr=new Array();
arr[0]=“player1”;
arr[1]=“player2”;
arr[2]=“player3”;
arr[3]=“player4”;
for(i=0;i<PlayerPrefs.GetInt(“NumberofPlayers”);i++){
arr = GUI.TextArea (Rect (0, yw, 250, 25),arr*);*
yw+=25;
PlayerPrefs.SetString(“player”+i,arr*);*
* }*
Anyone got a sollution for this issue ?
Thx Wouter