diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 8 | ||||
-rw-r--r-- | src/template.rs | 18 |
2 files changed, 26 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..76b3ff7 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,8 @@ +use eframe::Result; + +mod template; + +fn main() -> Result<()> { + let native_options = eframe::NativeOptions::default(); + eframe::run_native("`eframe` Template", native_options, Box::new(template::TemplateApp::generate)) +} diff --git a/src/template.rs b/src/template.rs new file mode 100644 index 0000000..9e3695d --- /dev/null +++ b/src/template.rs @@ -0,0 +1,18 @@ +#![allow(unused_variables)] + +use eframe::egui; + +pub struct TemplateApp; + +impl TemplateApp { + pub fn generate(cc: &eframe::CreationContext<'_>) -> Box<dyn eframe::App> { + Box::new(TemplateApp) + } +} + +impl eframe::App for TemplateApp { + fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { + // CODEGEN START - PUT CUSTOM CODE ABOVE AND BELOW + // CODEGEN END + } +} |