feature: prioritize active dropdown boxes if they are in the same Z-Index #49
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Currently, if you have multiple dropdowns in a frame, they are prioritized in the order they were added (last in the top).
This means that if you are adding a bunch of dropdowns in a column (perhaps using a
forloop), the dropdown box of the ones above will be overshadowed by the label of the ones below.Minimal Working Example
https://user-images.githubusercontent.com/43142209/227669717-fc23b552-ae45-4d98-8b0a-8e42034d91be.mp4
Desired Solution
For me, a reasonable solution would be to prioritize rendering the dropdown box over the dropdown label whenever they are in the same index.
Alternative Solutions
From basalt's part:
https://user-images.githubusercontent.com/43142209/227669644-4c612f34-b3b1-4a53-99d6-c884d3547e3a.mp4
From my part:
forloop. (i.e.for i = 3, 1, -1 do):setZIndex(3 - i))Both of these workarounds resolve the issue.
https://user-images.githubusercontent.com/43142209/227668535-5e518eb1-c6ca-4df7-9d9f-5cf6132fb1e2.mp4
Additional context
Although the workarounds (from my part) are quite simple, I think it's reasonable for a developer using the API to assume the dropdowns boxes (on the same level) would be prioritized over labels.
As an example, in the Windows API for GUI, it's true (and expected) that if you add a couple of dropdowns in a column one after another, when you click on the first dropdown, its box won't be overshadowed by the dropdowns below it. I think it's reasonable to assume the same behaviour in basalt.
Edit: I now realize this is probably a bug report, not a feature request... oh well ¯\_(ツ)_/¯
Hello, thank you - this is a very good idea and i will try to implement it! But i will need a couple of days, especially because currently is a interesting beta to test! :P
It's working now.