Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI Layers: depth variable affects draw order of UI instances #9626

Open
2 tasks done
gurpreetsinghmatharoo opened this issue Mar 4, 2025 · 1 comment
Open
2 tasks done
Assignees
Labels
runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Milestone

Comments

@gurpreetsinghmatharoo
Copy link

Description

UIL_Tutorial_Ahead_Pause.zip

Run the project and the UI buttons won't appear.

Image

This is because of the code in obj_player End Step event:

with (all)
{
    depth = -bbox_bottom;
}

Disabling this code makes the buttons appear again.

Image

Expected Change

Setting the depth of a UI layer instance should not change its draw order.

Steps To Reproduce

  1. Start GameMaker
  2. Follow steps above
  3. See the issue

How reliably can you recreate this issue using your steps above?

Always

Which version of GameMaker are you reporting this issue for?

2024.1300 (Betas)

Which platform(s) are you seeing the problem on?

Windows

Sample Package Attached?

  • I have attached my bug package

Sample Project Added?

  • I have included a small sample project
@gurpreetsinghmatharoo gurpreetsinghmatharoo added the runner-bug In-game bugs with the "GameMaker Studio 2" runtimes label Mar 4, 2025
@stuckie stuckie moved this from Triage to Todo in Team Workload Mar 4, 2025
@stuckie stuckie added this to the 2024.13 milestone Mar 4, 2025
@jackerley
Copy link

This isn't incorrect functionality, it is sorting the instances on the ui layer according to depth. After some discussion instead of changing this, we'll add some helper functions, layer_get_type and is_on_gui_layer as an instance method to make it simple to avoid this behaviour if you wish to only do something to room space instances etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Todo
Development

No branches or pull requests

3 participants