mirror of
https://github.com/eliasstepanik/egui_node_graph.git
synced 2026-01-24 03:58:28 +00:00
Add a scrollbar to the node finder
This commit is contained in:
parent
2607f55746
commit
9f7826ae95
@ -65,9 +65,16 @@ where
|
|||||||
|
|
||||||
let mut query_submit = resp.lost_focus() && ui.input().key_down(Key::Enter);
|
let mut query_submit = resp.lost_focus() && ui.input().key_down(Key::Enter);
|
||||||
|
|
||||||
|
let max_height = ui.input().screen_rect.height() * 0.5;
|
||||||
|
let scroll_area_width = resp.rect.width() - 30.0;
|
||||||
|
|
||||||
Frame::default()
|
Frame::default()
|
||||||
.inner_margin(vec2(10.0, 10.0))
|
.inner_margin(vec2(10.0, 10.0))
|
||||||
.show(ui, |ui| {
|
.show(ui, |ui| {
|
||||||
|
ScrollArea::vertical()
|
||||||
|
.max_height(max_height)
|
||||||
|
.show(ui, |ui| {
|
||||||
|
ui.set_width(scroll_area_width);
|
||||||
for kind in all_kinds.all_kinds() {
|
for kind in all_kinds.all_kinds() {
|
||||||
let kind_name = kind.node_finder_label(user_state).to_string();
|
let kind_name = kind.node_finder_label(user_state).to_string();
|
||||||
if kind_name
|
if kind_name
|
||||||
@ -85,6 +92,7 @@ where
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
});
|
||||||
|
|
||||||
submitted_archetype
|
submitted_archetype
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user