Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

STUCK: setTint on Text GameObject doesn't appear to be working for me


Recommended Posts

Hey guys, I am using Phaser 3.8.0

I was looking at this as an example https://labs.phaser.io/view.html?src=src\input\mouse\text input test.js

and it appears to be working on Phaser 3.8.0 on the sample but when I use the code below in my scene's "create" method, I can see the event in my console logs and if I change the code to "setColor('red')" the text properly turns red... just curious what I am doing wrong here or missing with setting the tint of the font?


encounterSceneContext.menuAttack = this.add.text(55, 210, "Attack", { fontSize: '10px', fill: '#ffffff' });
            encounterSceneContext.menuRun = this.add.text(55, 225, "Escape", { fontSize: '10px', fill: '#ffffff' });

                new Phaser.Geom.Rectangle(0, 0, encounterSceneContext.menuAttack.width, encounterSceneContext.menuAttack.height),

                new Phaser.Geom.Rectangle(0, 0, encounterSceneContext.menuRun.width, encounterSceneContext.menuRun.height),

            this.input.on('gameobjectover', function (pointer, gameObject) {
                gameObject.setTint(0xff0000, 0xff0000, 0xffff00, 0xff00ff);

            this.input.on('gameobjectout', function (pointer, gameObject) {


Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...