Setup UI within feature UI

The feature is not enabled yet.
It will be enabled by default later when ui is ready.
This commit is contained in:
Philip Kristoffersen
2021-09-27 22:29:05 +02:00
parent dc90642e13
commit aeb1251b77
6 changed files with 125 additions and 6 deletions
+7 -6
View File
@@ -7,7 +7,7 @@ mod settings;
mod steam;
mod steamgriddb;
use fltk::{app, prelude::*, window::Window};
mod mainview;
use crate::{
egs::EpicPlatform,
@@ -21,12 +21,13 @@ use steam_shortcuts_util::{shortcut::ShortcutOwned, shortcuts_to_bytes, Shortcut
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let app = app::App::default();
let mut wind = Window::new(100, 100, 400, 300, "Hello from rust");
wind.end();
wind.show();
app.run().unwrap();
#[cfg(feature = "ui")]
{
let app = app::App::default().with_scheme(app::Scheme::Gtk);
let mut ui = mainview::UserInterface::make_window();
app.run().unwrap();
}
let settings = Settings::new()?;
+4
View File
@@ -0,0 +1,4 @@
#![allow(unused_variables)]
#![allow(unused_mut)]
#![allow(unused_imports)]
include!(concat!(env!("OUT_DIR"), "/mainview.rs"));