move colour constants from gui::colours to util::consts::colours

This commit is contained in:
2025-11-07 00:34:42 +00:00
parent c34cf187d5
commit a8b04bb72b
4 changed files with 24 additions and 19 deletions
-1
View File
@@ -1,5 +1,4 @@
pub mod app;
mod colours;
mod debug;
pub mod run;
pub mod settings;
+5 -2
View File
@@ -1,8 +1,11 @@
use crate::{
features,
gui::{colours, settings::Settings, tools, ui_ext::UiExt},
gui::{settings::Settings, tools, ui_ext::UiExt},
util::{
consts::game::WINDOW_TITLE, persistent_state::PersistentState, system_info::SystemInfo, win,
consts::{colours, game::WINDOW_TITLE},
persistent_state::PersistentState,
system_info::SystemInfo,
win,
},
};
use eframe::egui;
-16
View File
@@ -1,16 +0,0 @@
use crate::features::game_networking::BlockedStatus;
use eframe::egui;
pub const RED: egui::Color32 = egui::Color32::from_rgb(255, 96, 96);
pub const YELLOW: egui::Color32 = egui::Color32::from_rgb(255, 255, 96);
pub const GREEN: egui::Color32 = egui::Color32::from_rgb(96, 255, 96);
impl From<BlockedStatus> for egui::Color32 {
fn from(value: BlockedStatus) -> Self {
match value {
BlockedStatus::Blocked => RED,
BlockedStatus::Failed => YELLOW,
BlockedStatus::Unblocked => GREEN,
}
}
}
+19
View File
@@ -13,3 +13,22 @@ pub mod game {
pub const EXE_LEGACY: &str = "GTA5.exe";
pub const WINDOW_TITLE: &str = "Grand Theft Auto V";
}
pub mod colours {
use crate::features::game_networking::BlockedStatus;
use eframe::egui;
pub const RED: egui::Color32 = egui::Color32::from_rgb(255, 96, 96);
pub const YELLOW: egui::Color32 = egui::Color32::from_rgb(255, 255, 96);
pub const GREEN: egui::Color32 = egui::Color32::from_rgb(96, 255, 96);
impl From<BlockedStatus> for egui::Color32 {
fn from(value: BlockedStatus) -> Self {
match value {
BlockedStatus::Blocked => RED,
BlockedStatus::Failed => YELLOW,
BlockedStatus::Unblocked => GREEN,
}
}
}
}