Skip to content

Commit

Permalink
top_panel: Make selection a/b editable with drag values
Browse files Browse the repository at this point in the history
  • Loading branch information
crumblingstatue committed Nov 5, 2024
1 parent 92057e6 commit 2d8c9c7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/gui/top_panel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ pub fn ui(ui: &mut Ui, gui: &mut Gui, app: &mut App, lua: &Lua, font_size: u16,
if app.hex_ui.select_a.is_some() || app.hex_ui.select_b.is_some() {
ui.label("Selection");
}
if let Some(a) = app.hex_ui.select_a {
ui.label(format!("a: {a}"));
if let Some(a) = &mut app.hex_ui.select_a {
ui.label("a");
ui.add(egui::DragValue::new(a));
}
if let Some(b) = app.hex_ui.select_b {
ui.label(format!("b: {b}"));
if let Some(b) = &mut app.hex_ui.select_b {
ui.label("b");
ui.add(egui::DragValue::new(b));
}
if let Some(sel) = app.hex_ui.selection()
&& let Some(view_key) = app.hex_ui.focused_view
Expand Down

0 comments on commit 2d8c9c7

Please sign in to comment.