gif plan, start eframe

This commit is contained in:
2026-04-17 13:37:05 +02:00
parent 65e95038c8
commit 278dab2ea1
7 changed files with 5478 additions and 4 deletions
-1
View File
@@ -1 +0,0 @@
/target
+22
View File
@@ -0,0 +1,22 @@
use eframe::egui;
#[derive(Default)]
pub struct AniShio {}
impl AniShio {
pub fn new(cc: &eframe::CreationContext<'_>) -> Self {
// Customize egui here with cc.egui_ctx.set_fonts and cc.egui_ctx.set_global_style.
// Restore app state using cc.storage (requires the "persistence" feature).
// Use the cc.gl (a glow::Context) to create graphics shaders and buffers that you can use
// for e.g. egui::PaintCallback.
Self::default()
}
}
impl eframe::App for AniShio {
fn ui(&mut self, ui: &mut egui::Ui, frame: &mut eframe::Frame) {
egui::CentralPanel::default().show_inside(ui, |ui| {
ui.heading("Hello World!");
});
}
}
View File
+10 -1
View File
@@ -1,3 +1,12 @@
mod app;
use app::AniShio;
fn main() {
println!("Hello, world!");
let native_options = eframe::NativeOptions::default();
eframe::run_native(
"AniShio",
native_options,
Box::new(|cc| Ok(Box::new(AniShio::new(cc)))),
);
}