spinnerbox Posted November 12, 2017 Share Posted November 12, 2017 I am using this code to create my text field on screen: screenTypingTextField = gameObject.add.text(200, 520, "", si.Utility.getTextStyleScreenTypingTextGreen()); screenTypingTextField.alpha = 0.5; screenTypingTextField.anchor.setTo(0.5, 0.5); //screenTypingTextField.width = 480; //screenTypingTextField.height = 240; thisObject.menuObjects.add(screenTypingTextField); textStyleScreenTypingTextGreen = { font :'70pt Arial', align : 'center', fill: 'Green' }, As you can see I have commented the width and height rows. Its because when i run this code again by entering the same scene that uses this code, it then starts to spread the text over all screen, even bigger. Is this the right way to create text and then set its width and height? Or I should just use the font to set text field size? here is a picture of my typing text field in green spread all over the screen Link to comment Share on other sites More sharing options...
spinnerbox Posted November 13, 2017 Author Share Posted November 13, 2017 Nobody understands what is happening? Link to comment Share on other sites More sharing options...
spinnerbox Posted November 13, 2017 Author Share Posted November 13, 2017 Well I found a workaround solution by removing the width/height statements and setting font size as large as 140pt Still don't understand what is wrong with the text fields though Link to comment Share on other sites More sharing options...
Recommended Posts