Skip to content

Commit 9e560d2

Browse files
author
AleBles
committed
made start/end focus public
1 parent 3876350 commit 9e560d2

6 files changed

+19
-19
lines changed

build/phaser-input.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ declare module Fabrique {
9797
/**
9898
* Focus is lost on the input element, we disable the cursor and remove the hidden input element
9999
*/
100-
private endFocus();
100+
endFocus(): void;
101101
/**
102102
*
103103
*/
104-
private startFocus();
104+
startFocus(): void;
105105
private keyUpProcessor();
106106
/**
107107
* Update the text value in the box, and make sure the cursor is positioned correctly

build/phaser-input.js

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/phaser-input.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/phaser-input.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "phaser-input",
33
"author": "OrangeGames",
4-
"version": "1.2.1",
4+
"version": "1.2.2",
55
"description": "Adds input boxes to Phaser like CanvasInput, but also works for WebGL and Mobile, made for Phaser only.",
66
"contributors": [
77
{

ts/InputField.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ module Fabrique {
167167
return;
168168
}
169169

170-
if (null !== this.placeHolder) {
171-
this.placeHolder.visible = false;
172-
}
173-
174170
if (this.inputOptions.zoom && !Fabrique.Plugins.InputField.Zoomed) {
175171
this.zoomIn();
176172
}
@@ -210,7 +206,7 @@ module Fabrique {
210206
/**
211207
* Focus is lost on the input element, we disable the cursor and remove the hidden input element
212208
*/
213-
private endFocus() {
209+
public endFocus() {
214210
this.domElement.removeEventListener();
215211

216212
if(this.blockInput === true) {
@@ -241,9 +237,13 @@ module Fabrique {
241237
/**
242238
*
243239
*/
244-
private startFocus() {
240+
public startFocus() {
245241
this.focus = true;
246-
242+
243+
if (null !== this.placeHolder) {
244+
this.placeHolder.visible = false;
245+
}
246+
247247
if (this.game.device.desktop) {
248248
//Timeout is a chrome hack
249249
setTimeout(() => {

0 commit comments

Comments
 (0)