GDevelop icon indicating copy to clipboard operation
GDevelop copied to clipboard

[bug] - In Scene Editor - Buttons, Sliders and other Custom Objects always stay on top of other objects (Text, Sprites...) - never considering Z Order

Open Skess01 opened this issue 11 months ago • 1 comments

Is there an existing issue for this?

Describe the bug

In Scene Editor - Buttons, Sliders and other Custom Objects always stay on top of other objects (Text, Sprites...) - never considering Z Order.

When you overlap buttons and sliders the one added or edited last is placed on top (just edit it and save it, no need to actually change it).

Then in Preview Z Order is correct, so what you see in scene editor is different from what you see in preview (and perhaps I suppose in published version).

  • Seems to me that this problem is present from version 5.3.189 onward (I've done a test with buttons in 5.3.188 and was ok to me).

Here the link to forum topic: https://forum.gdevelop.io/t/bug-buttons-objects-and-other-custom-objects-in-scene-editor-always-on-top-z-order-broken/55601

Screenshot - custom objects overlap ko in scene editor custom-objects-z-order-ko-in-editor

Screenshot - custom objects overlap ok in preview - according to z order custom-objects-z-order-ok-in-preview

Test Project GDEV-cust-obj-z-order-broken_20240315_1637.zip

Steps to reproduce

  1. Add a Button in the scene editor
  2. Add a Text in the scene editor
  3. Add a Sprite in the scene editor
  4. Put the text over the Button (you'll see always the Text behind the Button, despite the Z Order)
  5. Put the Sprite over the Button (you'll see always the Sprite behind the Button, despite the Z Order)
  6. Run the Preview (you'll see Text and Sprite over the Button or behind according to the Z Order)
  7. Add a Slider in the scene editor
  8. Put the Slider over the Button
  9. Change the Z Order of the Slider to -1 (you'll see always the Slider over the Button)
  10. Edit the Button Properties, without changes select Apply (you'll see now the Button over the Slider)
  11. Edit the Slider Properties, without changes select Apply (you'll see now the Slider over the Button - despite the Z Order)
  12. Run the preview - the objects will respect Z Order, but in the scene editor you'll see them differently

GDevelop platform

Desktop

GDevelop version

5.3.195 (editor full version: 5.3.195-d4cdb3ff83daa9197aca553cb345fcf53da211b6, core version: 4.0.99-0-release)

Platform info

OS (e.g. Windows, Linux, macOS, Android, iOS)

Windows

OS Version (e.g. Windows 10, macOS 10.15)

Windows 10

Browser(For Web) (e.g. Chrome, Firefox, Safari)

Device(For Mobile) (e.g. iPhone 12, Samsung Galaxy S21)

Additional context

No response

Skess01 avatar Mar 15 '24 16:03 Skess01

Thanks a lot for the investigations! It should be fixed in the next release.

D8H avatar Jun 04 '24 17:06 D8H