rexrainbow / phaser3-rex-notes

Notes of phaser3 engine
MIT License
1.21k stars 260 forks source link

Setting scrollable panel or grid table to draggable true, can't click on underlying objects anymore #274

Closed djdabs closed 2 years ago

djdabs commented 2 years ago

Looking at these examples below:

Grid table - https://codepen.io/rexrainbow/pen/XyJbWX Scrollable Panel - https://codepen.io/rexrainbow/pen/YMyBom

When setting the table or panel to draggable: true, can no longer click on the underlying buttons/items

rexrainbow commented 2 years ago

It is normal. The draggable area and clickable children game objects are different game objects. To click these children game objects under draggable panel, you might set

scene.input.topOnly = false

See scrollable panel demo, line 112.

djdabs commented 2 years ago

Works! You rock, thank you!