Open ThePandaJam opened 5 years ago
I have a similar problem regarding the change in the width of the input.
Whether the width is changed correctly in ur project?
I mean this line: nameInput.width = 300;
I found a fix for this issue. Just needed to add more attributes
var nameInput = game.add.inputField(500, 498, {
font: "30px 'Press Start 2P'",
fill: '#ffffff',
fillAlpha: 0,
fontWeight: 'bold',
width: 400,
max: 20,
padding: 2,
borderWidth: 1,
borderColor: '#000',
borderRadius: 6,
placeHolder: 'Anonymous',
textAlign: 'left',
zoom: true,
cursorColor : '#ffffff'
});
nameInput.startFocus();
The last line is pretty important by the way.
@MajorKuprich That width change worked fine, the text there would go outside the white box, as per the width I set. It's just the white box that wouldn't go away no matter what i did to the attributes regarding background colour. I fixed it now, take a look at the code above. :)
Hi! I'm trying to make a transparent text input box (or one with the same colour as the background image) in my game and I've been changing the properties to suit my needs, but the box still shows up white. Can't really find much help elsewhere online...
Here's my code:
I'm using Phaser v2.3.0 @AleBles