summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2024-04-16 13:26:18 -0400
committeralyx <alyx@aleteoryx.me>2024-04-16 13:26:18 -0400
commitc6ba7674e6ccbed249c8633f5fbc1b735a57df17 (patch)
tree1174dffb66143f0eafdd1cee991b051ed450308f /src
parent8c64f6c4627d99b22a3fbe86d321aefe5a6e4a24 (diff)
downloadeframe-canvas-template-c6ba7674e6ccbed249c8633f5fbc1b735a57df17.tar.gz
eframe-canvas-template-c6ba7674e6ccbed249c8633f5fbc1b735a57df17.tar.bz2
eframe-canvas-template-c6ba7674e6ccbed249c8633f5fbc1b735a57df17.zip
Diffstat (limited to 'src')
-rw-r--r--src/main.rs8
-rw-r--r--src/template.rs18
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
+ }
+}