You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A card game where you need to select and scroll throw many card slots
Describe the problem or limitation you are having in your project
I want a way that my card slots can overlap each other when activated and that the upper card slot in the scene tree takes the input event.
2024-10-16.11-58-27.mp4
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A way to fix this would be having a boolean that sorts the items in reverse, same as in css flex-direction row-reverse.
This way you can have the upper item in the screen to be lower in the scene tree, so the input events will trigger in the different order.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Having a boolean named sort_reverse available in the editor
voidBoxContainer::_resort() {
...
for (int i = 0; i < get_child_count(); i++) {
intindex = i;
if (sort_reverse) {
index = get_child_count() - 1 - i;
}
Control *c = as_sortable_control(index);
}
}
If this enhancement will not be used often, can it be worked around with a few lines of script?
This can not be worked around, the only way i achieved it was writing the same logic for the BoxContainer in GDScript and adding the logic of the reverse sorting
Is there a reason why this should be core and not an add-on in the asset library?
This should be directly integrated in the BoxContainer Node
The text was updated successfully, but these errors were encountered:
Describe the project you are working on
A card game where you need to select and scroll throw many card slots
Describe the problem or limitation you are having in your project
I want a way that my card slots can overlap each other when activated and that the upper card slot in the scene tree takes the input event.
2024-10-16.11-58-27.mp4
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A way to fix this would be having a boolean that sorts the items in reverse, same as in css flex-direction row-reverse.
This way you can have the upper item in the screen to be lower in the scene tree, so the input events will trigger in the different order.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
Having a boolean named sort_reverse available in the editor
If this enhancement will not be used often, can it be worked around with a few lines of script?
This can not be worked around, the only way i achieved it was writing the same logic for the BoxContainer in GDScript and adding the logic of the reverse sorting
Is there a reason why this should be core and not an add-on in the asset library?
This should be directly integrated in the BoxContainer Node
The text was updated successfully, but these errors were encountered: