diff --git a/src/app.rs b/src/app.rs index a55379c..a17f9c5 100644 --- a/src/app.rs +++ b/src/app.rs @@ -12,7 +12,7 @@ use zip::{write::SimpleFileOptions, ZipArchive, ZipWriter}; use crate::{ keyframe::{Keyframe, KeyframeType}, - sequencer::{Change, ChangeData, Sequencer, SequencerState}, + sequencer::{Sequencer, SequencerState}, settings::{MonitorEdge, Settings, SettingsPage}, }; @@ -535,6 +535,17 @@ impl eframe::App for App { } }); }); + ui.menu_button("Record", |ui| { + if ui + .add(egui::Button::new(if self.sequencer.recording.load(Ordering::Relaxed) {"Stop Recording"} else { "Start Recording"}).shortcut_text("F8")) + .clicked() + { + self.sequencer.toggle_recording(); + ui.close_menu(); + } + ui.add(egui::Checkbox::new(&mut self.sequencer.clear_before_recording, "Overwrite Recording")); + ui.add(egui::Checkbox::new(&mut self.settings.retake_screenshots, "Retake Screenshots")); + }); }); }); diff --git a/src/sequencer.rs b/src/sequencer.rs index 8673f45..362bbaa 100644 --- a/src/sequencer.rs +++ b/src/sequencer.rs @@ -91,7 +91,7 @@ pub struct Sequencer { play: Arc, #[serde(skip)] was_recording: bool, - clear_before_recording: bool, + pub clear_before_recording: bool, #[serde(skip)] recording_instant: Arc>, #[serde(skip)]