27 lines
632 B
Rust
27 lines
632 B
Rust
|
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||
|
|
|
||
|
|
use eframe::egui;
|
||
|
|
|
||
|
|
mod app;
|
||
|
|
mod io;
|
||
|
|
mod ui;
|
||
|
|
use app::{TextEditor, config::Config};
|
||
|
|
|
||
|
|
fn main() -> eframe::Result {
|
||
|
|
let options = eframe::NativeOptions {
|
||
|
|
viewport: egui::ViewportBuilder::default()
|
||
|
|
.with_min_inner_size([600.0, 400.0])
|
||
|
|
.with_title("C-Ext")
|
||
|
|
.with_app_id("io.lampnet.c-ext"),
|
||
|
|
..Default::default()
|
||
|
|
};
|
||
|
|
|
||
|
|
let config = Config::load();
|
||
|
|
|
||
|
|
eframe::run_native(
|
||
|
|
"C-Ext",
|
||
|
|
options,
|
||
|
|
Box::new(move |cc| Ok(Box::new(TextEditor::from_config_with_context(config, cc)))),
|
||
|
|
)
|
||
|
|
}
|