Skip to content

Commit 4227ce9

Browse files
Change theme
1 parent fe983a8 commit 4227ce9

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

build.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
use slint_build::CompilerConfiguration;
2+
13
fn main() {
2-
slint_build::compile("ui/main.slint").expect("Slint build failed");
4+
let config = CompilerConfiguration::new()
5+
.with_style("cosmic-dark".into());
6+
7+
slint_build::compile_with_config("ui/main.slint", config)
8+
.expect("Slint build failed");
39
}

src/main.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,17 @@ fn run_game(cfg: &Config) {
121121

122122
let mut command = Command::new("love");
123123
command.arg(&path);
124-
command.status()
125-
.expect("Running love2d yielded an error");
124+
// command.status()
125+
// .expect("Running love2d yielded an error");
126+
let status = command.status();
127+
128+
if let Err(e) = status {
129+
open_error_window_safe(
130+
Some("Failed to run game".to_string()),
131+
Some("An error was yielded from love2d.".to_string()),
132+
Some(e.to_string())
133+
);
134+
}
126135

127136
// Restore main.lua
128137
let mut command = Command::new("git");

0 commit comments

Comments
 (0)