add copy button
This commit is contained in:
parent
5e5d466edf
commit
7b96493b28
1 changed files with 5 additions and 0 deletions
|
@ -61,6 +61,11 @@ fn ui_system(mut contexts: EguiContexts, mut state: ResMut<State>) {
|
||||||
state.needs_update = true;
|
state.needs_update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let copy_button = ui.button("Copy");
|
||||||
|
if copy_button.clicked() {
|
||||||
|
ui.output_mut(|o| o.copied_text = state.output_value.clone());
|
||||||
|
}
|
||||||
|
|
||||||
let clear_button = ui.button("Clear");
|
let clear_button = ui.button("Clear");
|
||||||
if clear_button.clicked() {
|
if clear_button.clicked() {
|
||||||
state.input_value = "".to_string();
|
state.input_value = "".to_string();
|
||||||
|
|
Loading…
Add table
Reference in a new issue