Sign in to follow this  
ftguy2018

Pixi plugin error with text

Recommended Posts

Hello, I am trying to add the pixi plugin but I am getting an error "Uncaught TypeError: this._addText is not a function" , I am using game.SystemText, is this class not supported when using Pixi ?

Share this post


Link to post
Share on other sites

It sounds it is when I do switch the debug panel that I am getting some addtext error.....also Sprite  tint and tintalpha do not seem to work when using pixi plugin so is there a way to control the tint and alpha ?

Share this post


Link to post
Share on other sites

Hi @ftguy2018

I've had a similar error in the past, so I just want to double check ...

When you close your project, it tells you which engine version you are using with the project - looks like you are on the latest.

Could you also check, that you have the latest WebGL/Pixi plugin? I've had issues in the past because one of my plugins wasn't up to date.

If that doesn't work, it's probably a bug.

Share this post


Link to post
Share on other sites

You are welcome, I will update and report later on....btw, I have another question totally off topic, do we have some way to input text using Panda2 ? You see, for example, if we need to enter a player's name, etc....

Share this post


Link to post
Share on other sites

@ftguy2018

For text input, it really depends on your target platform and the kind of solution you are looking for. You have few options, use the keydown function to read what buttons user presses and show the content. Use DOM input element with HTML/CSS, this way you could use the browsers built-in keyboard on mobile, if that suits your needs. Or then you could build your own on-screen keyboard, something similar i did on Panda Remote.

Let me know if you need any help!

Share this post


Link to post
Share on other sites

@ftguy2018

I just added support for CSS loading to the engine. Once CSS file is loaded, it will be automatically added to the webpage.

Just update your engine to latest dev version. Now minimal example of using Panda 2 with AlertifyJS library would look something like this:

game.module(
    'game.main'
)
.body(function() {

game.addAsset('alertify.js');
game.addAsset('alertify.css');
game.addAsset('bootstrap.css');

game.createScene('Main', {
    click: function() {
        alertify.alert('Ready!');
    }
});

});

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.