Commit e9afd3c
I added a new flag to the UiBuilder so that it is possible to move child
widgets around the ui tree without losing state information.
Currently there is no way to create child widgets with the same id at
different locations in the ui tree since ids change in relation the the
parent id. With the new flag a unique global scope can be created which
always results in the same ids even at different locations.
You still need to ensure that the widgets only get rendered once in
frame.
This feature can be used to fix a issue i am having with the
https://github.com/lucasmerlin/hello_egui crate.
* Closes lucasmerlin/hello_egui#75
* [X] I have followed the instructions in the PR template
---------
Co-authored-by: Emil Ernerfeldt <[email protected]>
1 parent 3aee525 commit e9afd3c
2 files changed
+39
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
250 | 251 | | |
251 | 252 | | |
252 | 253 | | |
| 254 | + | |
253 | 255 | | |
254 | 256 | | |
255 | 257 | | |
| |||
287 | 289 | | |
288 | 290 | | |
289 | 291 | | |
290 | | - | |
291 | | - | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
292 | 300 | | |
293 | 301 | | |
294 | 302 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
45 | 74 | | |
46 | 75 | | |
47 | 76 | | |
| |||
0 commit comments