Skip to content

Commit

Permalink
Add a bar showing crude interaction hints
Browse files Browse the repository at this point in the history
  • Loading branch information
jansol committed Dec 19, 2021
1 parent dcfb231 commit d792a07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/ui/graph.rs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,14 @@ impl Graph {
});

self.nodes_ctx.show(ui_nodes, links, ui);
egui::TopBottomPanel::bottom("control_hints").show_inside(ui, |ui| {
ui.horizontal(|ui| {
ui.label("[MMB] Move canvas");
ui.label("[LMB] Move node");
ui.label("[LMB] Connect port");
ui.label("[ALT]+[LMB] Disconnect port");
})
});

for (&id, node) in self.nodes.iter_mut() {
node.position = self.nodes_ctx.get_node_pos_screen_space(id as usize);
Expand Down

0 comments on commit d792a07

Please sign in to comment.