`GhostNode`s should support `ZIndex` and `GlobalZIndex`

Aperta
#26,280 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
game-dev

Direzione di ricerca

Start by reading the related discussion in #26263 and trace how GhostNode descendants become layout roots and receive ZIndex and GlobalZIndex. The issue describes the desired propagation behavior and gives an example, but does not name implementation files or tests. Done means non-ghost descendants inherit the ghost ancestor's ordering values as described.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

A-UI C-Feature D-Straightforward S-Ready-For-Implementation X-Uncontroversial

What problem does this solve or what need does it fill?

GhostNodes should support ZIndex and GlobalZIndex.

It's natural and then they could be used to create ordered sub z layers.

Some related discussion here: #26263

What solution would you like?

I've made a draft implementation already.

Basically GlobalZIndex and ZIndex on GhostNodes propagate to their non-ghost descendants down the tree.

Example:

commands.spawn((
            GhostNode,
            GlobalZIndex(MY_Z_LAYER),            
    )).add_children(&[back_panel_id, middle_panel_id, front_panel_id]);

The three entities with ids back_panel_id, middle_panel_id, and front_panel_id will all be layout roots occupying the same MY_Z_LAYER

What alternative(s) have you considered?

Other solutions to solve and/or work around the problem presented.

Additional context

Any other information you would like to add such as related previous work,
screenshots, benchmarks, etc.

Lingua principale
Rust
Stelle
49.7k
Fork
5k
Merge medio
3g 19h
PR unite (30g)
134

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di bevyengine/bevy

Tutte le issue di bevyengine/bevy

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.