gif plan, start eframe
This commit is contained in:
@@ -1 +0,0 @@
|
||||
/target
|
||||
+22
@@ -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!");
|
||||
});
|
||||
}
|
||||
}
|
||||
+10
-1
@@ -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)))),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user