Closed FabianElsmer closed 9 years ago
Good catch, this one was tricky :)
Phaser have it's own Components model, it imposes that children components to be of type Phaser.Sprite and to workaround it,when using Phaser, EZGUI will wrap it's components inside a phaser Sprite which donc containt setState function (specific to EZGUI).
I added a function to check this and execute the right code to set tabs states. tested with phaser and it's working for me.
please confirm :)
Yeah it works now.
fine :) So I'm closing this issue, thank you for reporting and test.
Hey guys, When you take the Phaser Example index.html and replace the guiObj with the one from the Tabs Example, you end up getting an error. The error appears both with Phaser 2.4 and Phaser 2.3.
Tabs.ts #94 "Uncaught TypeError: this.tabsBar.container.children[order].setState is not a function"
It all seems to come down to guiobjects.ts #251 where this happens
So for the Tabs actual Phaser Sprites are used, instead of the Components.
Removing this line to always use the actual child prevents the error, but leaves the tabs unclickable.
Using
works a little bit better, it seems to attempt to switch tabs, but the new content is not actually shown and the tab does not stay selected.