rui icon indicating copy to clipboard operation
rui copied to clipboard

Z-sorting components based on user interaction

Open ruza-net opened this issue 2 years ago • 1 comments

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)?

ruza-net avatar Nov 27 '22 18:11 ruza-net

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)

wtholliday avatar Nov 27 '22 18:11 wtholliday