do so many things

This commit is contained in:
2025-04-07 12:19:06 +01:00
parent c284bad06b
commit 68cf28dad8
12 changed files with 572 additions and 248 deletions
+10 -3
View File
@@ -1,9 +1,7 @@
use crate::util::consts::{ENHANCED, LEGACY};
use std::time::Instant;
use sysinfo::System;
const ENHANCED: &str = "GTA5_Enhanced.exe";
const LEGACY: &str = "GTA5.exe";
pub struct ForceClose {
pub button_text: String,
pub prompting: bool,
@@ -20,6 +18,14 @@ impl Default for ForceClose {
}
}
impl ForceClose {
pub fn prompting(&mut self) {
self.button_text = "Are you sure?".to_string();
self.prompting = true;
self.interval = Instant::now();
}
}
pub fn activate(sysinfo: &mut System) {
sysinfo.refresh_all();
sysinfo
@@ -29,4 +35,5 @@ pub fn activate(sysinfo: &mut System) {
.for_each(|(_, p)| {
p.kill();
});
sysinfo.refresh_all();
}