mirror of https://codeberg.org/topola/topola.git
egui: arrange the menus more typically
This commit is contained in:
parent
f5ed7a4f90
commit
cf52c95113
|
|
@ -1,4 +1,10 @@
|
||||||
menu-file = File
|
menu-file = File
|
||||||
|
menu-edit = Edit
|
||||||
|
menu-view = View
|
||||||
|
menu-place = Place
|
||||||
|
menu-route = Route
|
||||||
|
menu-inspect = Inspect
|
||||||
|
|
||||||
menu-options = Options
|
menu-options = Options
|
||||||
menu-debug = Debug
|
menu-debug = Debug
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,39 +140,15 @@ impl Top {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
ui.separator();
|
ui.menu_button(tr.text("menu-edit"), |ui| {
|
||||||
|
undo.button(ctx, ui);
|
||||||
|
redo.button(ctx, ui);
|
||||||
|
|
||||||
autoroute.button(ctx, ui);
|
ui.separator();
|
||||||
|
remove_bands.button(ctx, ui);
|
||||||
ui.menu_button(tr.text("menu-options"), |ui| {
|
|
||||||
ui.checkbox(
|
|
||||||
&mut self.autorouter_options.presort_by_pairwise_detours,
|
|
||||||
tr.text("presort-by-pairwise-detours"),
|
|
||||||
);
|
|
||||||
ui.checkbox(
|
|
||||||
&mut self.autorouter_options.router_options.squeeze_under_bands,
|
|
||||||
tr.text("squeeze-under-bands"),
|
|
||||||
);
|
|
||||||
ui.checkbox(
|
|
||||||
&mut self.autorouter_options.router_options.wrap_around_bands,
|
|
||||||
tr.text("wrap-around-bands"),
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
ui.separator();
|
ui.menu_button(tr.text("menu-view"), |ui| {
|
||||||
|
|
||||||
place_via.toggle_widget(ctx, ui, &mut self.is_placing_via);
|
|
||||||
|
|
||||||
remove_bands.button(ctx, ui);
|
|
||||||
|
|
||||||
ui.separator();
|
|
||||||
|
|
||||||
undo.button(ctx, ui);
|
|
||||||
redo.button(ctx, ui);
|
|
||||||
|
|
||||||
ui.separator();
|
|
||||||
|
|
||||||
ui.menu_button(tr.text("menu-debug"), |ui| {
|
|
||||||
ui.checkbox(&mut self.show_ratsnest, tr.text("show-ratsnest"));
|
ui.checkbox(&mut self.show_ratsnest, tr.text("show-ratsnest"));
|
||||||
ui.checkbox(&mut self.show_navmesh, tr.text("show-navmesh"));
|
ui.checkbox(&mut self.show_navmesh, tr.text("show-navmesh"));
|
||||||
ui.checkbox(&mut self.show_bboxes, tr.text("show-bboxes"));
|
ui.checkbox(&mut self.show_bboxes, tr.text("show-bboxes"));
|
||||||
|
|
@ -180,8 +156,33 @@ impl Top {
|
||||||
&mut self.show_origin_destination,
|
&mut self.show_origin_destination,
|
||||||
tr.text("show-origin-destination"),
|
tr.text("show-origin-destination"),
|
||||||
);
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.menu_button(tr.text("menu-place"), |ui| {
|
||||||
|
place_via.toggle_widget(ctx, ui, &mut self.is_placing_via);
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.menu_button(tr.text("menu-route"), |ui| {
|
||||||
|
autoroute.button(ctx, ui);
|
||||||
ui.separator();
|
ui.separator();
|
||||||
|
|
||||||
|
ui.menu_button(tr.text("menu-options"), |ui| {
|
||||||
|
ui.checkbox(
|
||||||
|
&mut self.autorouter_options.presort_by_pairwise_detours,
|
||||||
|
tr.text("presort-by-pairwise-detours"),
|
||||||
|
);
|
||||||
|
ui.checkbox(
|
||||||
|
&mut self.autorouter_options.router_options.squeeze_under_bands,
|
||||||
|
tr.text("squeeze-under-bands"),
|
||||||
|
);
|
||||||
|
ui.checkbox(
|
||||||
|
&mut self.autorouter_options.router_options.wrap_around_bands,
|
||||||
|
tr.text("wrap-around-bands"),
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
ui.menu_button(tr.text("menu-inspect"), |ui| {
|
||||||
compare_detours.button(ctx, ui);
|
compare_detours.button(ctx, ui);
|
||||||
measure_length.button(ctx, ui);
|
measure_length.button(ctx, ui);
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue