rui
rui copied to clipboard
Z-sorting components based on user interaction
I'd like to make some textboxes which are draggable. That means they'll be able to overlap, so I have to make the one that has been interacted with most recently float on top of the others.
Can I do it with the current facilities (without implementing this manually with canvas)?
I think you could do this by reordering the text box ids in a zlist. Have a look at https://github.com/audulus/rui/blob/main/examples/list.rs
Also, rui is a bit weak right now in text editing facilities and could use some help! There's text_editor which does multiline text (though it's rather incomplete). Probably should have a text_box for single-line text fields (SwiftUI has a similar distinction). (see https://github.com/audulus/rui/issues/9)