Advertisement
Guest User

Untitled

a guest
May 31st, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Haxe 1.00 KB | None | 0 0
  1.         public static var characterNameField:TextField = new TextField();
  2.  
  3.  
  4.         //This creates a text field which you can edit, still need to handle the getting of the info from the text field and saving of it.
  5.         var fontSize = 30;
  6.         characterNameField.defaultTextFormat = new TextFormat(Assets.getFont("Fonts/TIMES.TTF").fontName, fontSize);
  7.         characterNameField.selectable = true;
  8.         characterNameField.text = characterName;
  9.         characterNameField.type = TextFieldType.INPUT;
  10.         characterNameField.x = 210;
  11.         characterNameField.width = 270;
  12.         characterNameField.height = 50;
  13.         characterNameField.y = 150;
  14.         characterNameField.restrict = "A-Z 0-0 a-z";
  15.         characterNameField.maxChars = 16;
  16.         characterName = characterNameField.text;
  17.         //characterNameField.autoSize = TextFieldAutoSize.LEFT;
  18.         characterNameField.background = true;
  19.         characterNameField.backgroundColor = 0xababab;
  20.         characterNameField.border = true;
  21.        
  22.         myStage.addChild(pleaseEnterCharacterNameTextField);
  23.         myStage.addChild( characterNameField );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement