Fix: font, font family
This commit is contained in:
@@ -1,3 +1,35 @@
|
||||
function InputText(x, y, width, height) {
|
||||
var bmd = game.add.bitmapData(width, height);
|
||||
var myInput = game.add.sprite(x, y, bmd);
|
||||
|
||||
var contentWidth = width - 20;
|
||||
myInput.canvasInput = new CanvasInput({
|
||||
canvas: bmd.canvas,
|
||||
fontSize: 30,
|
||||
fontFamily: 'Arial',
|
||||
fontColor: '#212121',
|
||||
fontWeight: 'bold',
|
||||
width: contentWidth,
|
||||
padding: 8,
|
||||
borderWidth: 1,
|
||||
borderColor: '#000',
|
||||
borderRadius: 3,
|
||||
boxShadow: '1px 1px 0px #fff',
|
||||
innerShadow: '0px 0px 5px rgba(0, 0, 0, 0.5)',
|
||||
placeHolder: 'Enter message here...'
|
||||
});
|
||||
myInput.inputEnabled = true;
|
||||
myInput.input.useHandCursor = true;
|
||||
myInput.events.onInputUp.add(
|
||||
(function(sprite) {
|
||||
sprite.canvasInput.focus();
|
||||
}).bind(this),
|
||||
this
|
||||
);
|
||||
|
||||
return myInput;
|
||||
}
|
||||
|
||||
function InputTypeText(x, y) {
|
||||
var bmd = game.add.bitmapData(420, 50);
|
||||
var myInput = game.add.sprite(x, y, bmd);
|
||||
|
||||
Reference in New Issue
Block a user