From c6ba7674e6ccbed249c8633f5fbc1b735a57df17 Mon Sep 17 00:00:00 2001 From: alyx Date: Tue, 16 Apr 2024 13:26:18 -0400 Subject: Code --- src/main.rs | 8 ++++++++ src/template.rs | 18 ++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 src/main.rs create mode 100644 src/template.rs (limited to 'src') 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 { + 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 + } +} -- cgit v1.2.3-70-g09d2