From 461a559b4d335fb86c129024fc7a559f64eb4e89 Mon Sep 17 00:00:00 2001 From: JDDev0 Date: Tue, 3 Dec 2024 18:12:09 +0100 Subject: [PATCH] Make the "Color" enum in console lib "Copy" --- console_lib/src/lib.rs | 2 +- src/game/screen/dialog.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/console_lib/src/lib.rs b/console_lib/src/lib.rs index 25f65c9..265492f 100644 --- a/console_lib/src/lib.rs +++ b/console_lib/src/lib.rs @@ -273,7 +273,7 @@ impl Key { } #[repr(i8)] -#[derive(Debug, Clone, Ord, PartialOrd, Eq, PartialEq, Hash)] +#[derive(Debug, Clone, Copy, Ord, PartialOrd, Eq, PartialEq, Hash)] pub enum Color { Black, Blue, diff --git a/src/game/screen/dialog.rs b/src/game/screen/dialog.rs index 6ce56f0..bc82bb6 100644 --- a/src/game/screen/dialog.rs +++ b/src/game/screen/dialog.rs @@ -147,7 +147,7 @@ impl Dialog for DialogOk { let whitespace_count_half = ((width - char_count) as f64 * 0.5) as usize; - console.set_color(self.fg_color.clone(), Color::Yellow); + console.set_color(self.fg_color, Color::Yellow); console.set_cursor_pos(x_start + 1, y_start + 1); console.draw_text(format!( "{}{}{}",