ftguy2018 Posted June 12, 2018 Share Posted June 12, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 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 ? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @ftguy2018 What engine version are you using? Could you try to update to latest version? Thanks! Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 I have updated to the latest dev version 2.7.1 I think....I am not sure why but every time I am switching the debug panel I have this error Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 Also can you please advise on the tint issue for the sprite ? it is working perfectly when not using Pixi plugin...thank you. Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Share Posted June 12, 2018 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. Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 yes it says 2.7.1 dev, I downloaded the plugin today from the panda2.io website, so do I assume I have the latest version ?!? Quote Link to comment Share on other sites More sharing options...
Ninjadoodle Posted June 12, 2018 Share Posted June 12, 2018 Hi @ftguy2018 Yup, I'm pretty sure you do - it's most likely a bug. @enpu is pretty quick at fixing these, so I'm sure it will be resolved soon Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @ftguy2018 Just updated PixiJS plugin to 1.2.2 which should fix the error: https://www.panda2.io/plugins Thanks for letting me know! Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 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.... Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 Working good ^^ Thank you for the quick fix. Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @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! Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 Yes, I think it will be good if I could use the AlertifyJS lib, do you know if it is possible to have this library running with Panda2 ? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @ftguy2018 Any JavaScript library should be possible to use with Panda 2. In the end, Panda 2 game is just a simple HTML page with some JavaScript code. Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 What should I do with the CSS file ? Is there any tutorial how I can add (inject) the CSS file provided with that library into the panda2 project ? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 @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!'); } }); }); Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 Wow...I am pretty impress with the speed of your update, no doubt the Panda2 engine is going to be great tool of use...^^ I will try this as soon as I can.... Quote Link to comment Share on other sites More sharing options...
ftguy2018 Posted June 12, 2018 Author Share Posted June 12, 2018 Working perfectly and so now I have a way to prompt the user for data, thank you very much ? Quote Link to comment Share on other sites More sharing options...
enpu Posted June 12, 2018 Share Posted June 12, 2018 Great to hear that it works! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.