Fix: font, font family

This commit is contained in:
2019-06-21 23:20:17 +09:00
parent f9d5008afc
commit d800d41313
5 changed files with 92 additions and 25 deletions
+32
View File
@@ -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);