-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,31 @@ | ||
use synfig_core::version::*; | ||
use eframe::egui; | ||
|
||
fn main() { | ||
println!("Welcome to Synfig-rs v{}", get_version()); | ||
let native_options = eframe::NativeOptions::default(); | ||
let _ = eframe::run_native( | ||
"Synfig-rs Studio", | ||
native_options, | ||
Box::new(|cc| Ok(Box::new(SynfigStudio::new(cc)))), | ||
); | ||
} | ||
|
||
#[derive(Default)] | ||
struct SynfigStudio {} | ||
|
||
impl SynfigStudio { | ||
fn new(cc: &eframe::CreationContext<'_>) -> Self { | ||
// Customize egui here with cc.egui_ctx.set_fonts and cc.egui_ctx.set_visuals. | ||
// 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 SynfigStudio { | ||
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) { | ||
egui::CentralPanel::default().show(ctx, |ui| { | ||
ui.heading("Toolbox"); | ||
}); | ||
} | ||
} |