Search the Community
Showing results for tags 'event listeners'.
In my main scene I add keyboard event listeners to specific keys in the init() state. Also some of those keys need to be disabled at specific time and re-enabled at specific time. How can I disable/enable input on specific keyboard buttons at runtime?
Hello. I managed to create code that draws a button along with a textfield and also with the four states that a button have, onInputUp, onInputDown, onInputOver and onInputOut. However, it is still experimental, and since I add text object as a child of Phaser.Graphics, the text is a bit blurry. But the bigger issue is, new graphical elements are added without removal, so I have a bug somewhere, or it is just not possbile to create dynamically drawn button with text and all states and to add custom click event handler. I will post another topic for the code itself, but here i just wa
While I was learning the documentation I decided to experiment with the code for a bit. and I encountered a problem. I attempted to make a function that makes a new box, then I would make an HTML Button and when clicking this button the function that I made should be triggered and a box should appear on the screen. Since this didnt work I decided to see if you guys could possibly help me. Here is the code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Babylon.js sample code&l
how to add event listeners for objects in scene loaded from blender