use std::{path::PathBuf, sync::LazyLock}; use egui::ScrollArea; mod editors; mod explorer; mod scene; mod util; use crate::{ editors::{ asset_editor::Asset, content_editor, note_editor, object_editor::ObjectInstance, tags::Tag, template_editor::Template, }, explorer::Explorer, }; static VERSION: &str = "0.1.0"; static PROJECT_FOLDER: LazyLock = LazyLock::new(|| { let mut path = std::env::current_dir().unwrap(); path.push("project"); path }); fn main() { let app = Interface::new(); let options = eframe::NativeOptions { viewport: egui::ViewportBuilder::default().with_inner_size([800.0, 600.0]), ..Default::default() }; let _ = eframe::run_native("Code Editor", options, Box::new(|_cc| Ok(Box::new(app)))); } pub struct Interface { // dialog: Option, right_panel_content: RightPanelContent, editor: content_editor::MainEditor, scene: scene::EditorScene, explorer: Explorer, } impl eframe::App for Interface { fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) { egui_extras::install_image_loaders(ctx); self.configure_appearance(ctx); self.render_top_panel(ctx); self.render_left_panel(ctx); self.render_right_panel(ctx); self.render_main_content(ctx); } } pub enum RightPanelContent { Template(Box