move colour constants from gui::colours to util::consts::colours
This commit is contained in:
@@ -1,5 +1,4 @@
|
|||||||
pub mod app;
|
pub mod app;
|
||||||
mod colours;
|
|
||||||
mod debug;
|
mod debug;
|
||||||
pub mod run;
|
pub mod run;
|
||||||
pub mod settings;
|
pub mod settings;
|
||||||
|
|||||||
+5
-2
@@ -1,8 +1,11 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
features,
|
features,
|
||||||
gui::{colours, settings::Settings, tools, ui_ext::UiExt},
|
gui::{settings::Settings, tools, ui_ext::UiExt},
|
||||||
util::{
|
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;
|
use eframe::egui;
|
||||||
|
|||||||
@@ -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,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -13,3 +13,22 @@ pub mod game {
|
|||||||
pub const EXE_LEGACY: &str = "GTA5.exe";
|
pub const EXE_LEGACY: &str = "GTA5.exe";
|
||||||
pub const WINDOW_TITLE: &str = "Grand Theft Auto V";
|
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,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user