Skip to content

Commit

Permalink
Make the "Color" enum in console lib "Copy"
Browse files Browse the repository at this point in the history
  • Loading branch information
JDDev0 committed Dec 3, 2024
1 parent acf8e27 commit 461a559
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion console_lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/game/screen/dialog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
"{}{}{}",
Expand Down

0 comments on commit 461a559

Please sign in to comment.