Jump to content

need help with EZGUI


Recommended Posts

Hello, i've try to use phaser 2.4.2 in Electron and EZGUI is not working, in any sample files is working but when run in electron is nothing happen




thisis some code

var guiContainer;var guiObj = {    //this ID must be unique, it'll help you easily access the gui component throught EZGUI.components.myWindow    id: 'myWindow',    //this the component ID, EZGUI define those components: Window, Button, Checkbox, Slider, Radio...    //but you can create your own components or extend existing    component: 'Window',    //This is the padding space from the component borders    padding: 4,    //component position relative to parent    position: { x: 10, y: 10 },    width: 500,    height: 500};window.onload = function () {    window.game = new Phaser.Game(PhaserConf);    // Game GUI    //Set EZGUI renderer    EZGUI.renderer = game.renderer;    //  Add the States your game has.    window.game.state.add('Boot', GameStates.Boot);    window.game.state.add('Preloader', GameStates.Preloader);    window.game.state.add('SplashScreen', GameStates.SplashScreen);    // GameScenes    window.game.state.add('Login', GameStates.Login);    window.game.state.add('Game', GameStates.Game);    //  Now start the Boot state.    window.game.state.start('Boot');    //load EZGUI themes    //here you can pass multiple themes    EZGUI.Theme.load(['./assets/kenney-theme/kenney-theme.json'], function (s) {        alert('work');        var guiContainer = EZGUI.create(guiObj, 'kenney');    });};

Please suggest me, thank you.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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