Text input area in PlayCanvas with font

Hey PlayCanvas community,

I wrote a very simple module for input text area.

Here is the project link, please fork it to use it :
https://playcanvas.com/project/811910/overview/text-input-area-in-playcanvas

Demo :

How to use :

  • Press [ENTER] to active chat box
  • Enter your message
  • Press [ENTER] again to send message

Scripts :
CustomInput.js
This script basically defines an input functionality to the text element.
It has “trigger” attribute, which basically triggers a global event with the text data in it.

CustomText.js
This script basically can be used to set text, it’s not a part of this project but it’s basically being triggered by customInput.js

Let me know if you have any questions.

Here is the script link : Playcanvas-UI-Components/CustomInput.js at master · devcem/Playcanvas-UI-Components · GitHub

Cheers

3 Likes

Nice work! Does it handle mobile text input too?

1 Like

Just added mobile support. Added with prompt tho, it works!

1 Like