Open Shadowstep33 opened 8 years ago
this is possible, but I think that the behaviour was inconsistend between PIXI and Phaser. to allow click through, you need to add an EZGUI click event handler, and set event.stopped to false.
if you can show a code examples it'll be easier to understand your issue :)
Hello, I am also interested in this issue. I have a layout in the form:
{
component: 'Window'
children: [
{
component: 'Layout'
children: [
{ id: 'btnClose', text: 'Close', component: 'Button', position: { x: 5, y: 5 }, width: 60, height: 40 },
]
}
]
}
I've set an event listener like:
EZGUI.components.btnClose.on('click', () => {
console.log("Close clicked!");
aboutScreen.visible = false;
});
But I can't manage to make the click event to happen. I've also tried to add
z: 1
Or higher numbers like doc says at the level of Layout and Button without any results.
Hello @fr0gs , have you tried to set btnClose z to a value and its parent z to a lower value ? if you did and still not working can you please tell me what version of Phaser/Pixi are you using ?
Hello @alaa-eddine , I've set btnClose z value to 10 and it's parent (the Layout component) z value to 1, still no luck. I've seen that among the examples in this repo a very similar structure is shown and it works properly, I may miss something. I am using Phaser 2.4.9 and the phaser-compat-2.4 file from the dist/ folder in EZGUI
Oki doki, with Phaser 2.4.9 EZGUI does not respond to any events in the GUI definition. I will keep trying with older versions.
Hi, currently I have a Layout the size of the canvas but it is blocking the clicks of objects underneath. The layout contains some buttons, essentially at the corners of the screen:
is there a way to make an EZGUI component (Layout) ignore interaction, but allow some of its children components be interactive or do I have to add the buttons separately so there is no contiguous blocking element in front of the rest of the scene?