Skip to content
Snippets Groups Projects
Commit 69c27141 authored by Finn Bear's avatar Finn Bear
Browse files

Testing egui.

parent 59a42099
No related branches found
No related tags found
No related merge requests found
target/
*.xml
*.iml
.idea/
Cargo.lock 0 → 100644
This diff is collapsed.
[package]
name = "generative_art_cartoon"
version = "0.1.0"
edition = "2021"
[dependencies]
eframe = "0.17"
\ No newline at end of file
use eframe::{egui, epi};
use eframe::egui::{Align, Direction, Layout};
fn main() {
let app = Cartoon::default();
let size = egui::Vec2::new(1280f32, 720f32);
let native_options = eframe::NativeOptions{
always_on_top: false,
maximized: false,
decorated: true,
drag_and_drop_support: false,
icon_data: None,
initial_window_pos: None,
initial_window_size: None,
min_window_size: Some(size),
max_window_size: Some(size),
resizable: false,
transparent: false,
};
eframe::run_native(Box::new(app), native_options);
}
pub struct Cartoon {
}
impl Default for Cartoon {
fn default() -> Self {
Self {}
}
}
impl epi::App for Cartoon {
fn name(&self) -> &str {
"Generative Art Cartoon"
}
/// Put your widgets into a `SidePanel`, `TopPanel`, `CentralPanel`, `Window` or `Area`.
fn update(&mut self, ctx: &egui::Context, frame: &epi::Frame) {
// For inspiration and more examples, go to https://emilk.github.io/egui
/*
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
egui::menu::bar(ui, |ui| {
ui.menu_button("File", |ui| {
if ui.button("Quit").clicked() {
frame.quit();
}
});
});
});
*/
egui::CentralPanel::default().show(ctx, |ui| {
ui.centered_and_justified(|ui| {
egui::CentralPanel::default().show_inside(ui, |ui| {
ui.heading("Generative Art");
ui.label("By TODO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
});
});
});
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment