1.3.3 • Published 4 months ago

phaser3-pixelinput v1.3.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Input field for Phaser 3 using BitmapText.

Demo

Has:

  • typing
  • multiline support
  • navigation with arrow keys
  • text overflow handling (horizontal and vertical)
  • text selection
  • copy-paste
  • undo-redo

Doesn't have:

  • mouse interaction
  • resizing
  • mobile support

Usage:

In the game config, put

plugins: {
  global: [PixelInputPlugin.DEFAULT_CFG]
}

Then use it like this:

let input_config = {
  x: 25,
  y: 50,
  font: "atari-classic",
  font_size: 8,
  width: 250,
  height: 12,
  allowed_characters: Phaser.GameObjects.RetroFont.TEXT_SET1
};
let input = this.add.pixelInput(input_config);
input.text = "Hello world!";

For a multiline input field, include "\n" in allowed_characters.

1.3.3

4 months ago

1.3.2

4 months ago

1.3.1

4 months ago

1.3.0

4 months ago

1.2.0

4 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago