Skip to content

Commit

Permalink
Add confirm button to clear text and reset settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuuuube committed Jun 29, 2024
1 parent 01cf6b7 commit 0d762d1
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/gui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@ impl eframe::App for HentaiganaInputGui {
ui.close_menu();
}

if ui.button("Clear text").clicked() {
self.text = "".to_owned();
ui.close_menu();
}
ui.menu_button("Clear text", |ui| {
if ui.button("Confirm").clicked() {
self.text = "".to_owned();
ui.close_menu();
}
});
});

ui.menu_button("Settings", |ui| {
Expand Down Expand Up @@ -143,10 +145,12 @@ impl eframe::App for HentaiganaInputGui {
ui.end_row();
});

if ui.button("Reset").clicked() {
self.settings = HentaiganaInputSettings::default();
ui.close_menu();
}
ui.menu_button("Reset", |ui| {
if ui.button("Confirm").clicked() {
self.settings = HentaiganaInputSettings::default();
ui.close_menu();
}
});
});
});

Expand Down

0 comments on commit 0d762d1

Please sign in to comment.