Copy json to clipboard

This commit is contained in:
Piotr Siuszko 2023-12-08 08:46:01 +01:00
parent 0909b6e6be
commit a1675b6892
1 changed files with 7 additions and 0 deletions

View File

@ -384,6 +384,13 @@ impl eframe::App for TemplateApp {
});
ui.label(RichText::new("Frames JSON").strong());
egui_json_tree::JsonTree::new("simple-tree", &data.frames_json).show(ui);
if ui
.add(egui::Button::new("Copy JSON to Clipboard"))
.clicked()
{
ui.output_mut(|o| o.copied_text = data.frames_json.to_string());
};
}
ui.separator();
let mut index_to_remove : Option<usize> = None;