Skip to content

Commit

Permalink
Merge pull request #296 from kesinger/master
Browse files Browse the repository at this point in the history
Add get_default_foreground to src/console.rs
  • Loading branch information
L3nn0x authored Jul 12, 2019
2 parents 718d8d9 + bde77f4 commit 500dd2d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/console.rs
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,14 @@ pub trait Console : AsNative<ffi::TCOD_console_t> {
}
}

/// Return the console's default foreground color.
fn get_default_foreground(&mut self) -> Color {
unsafe {
FromNative::from_native(
ffi::TCOD_console_get_default_foreground(*self.as_native()))
}
}

/// Sets the console's default background color. This is used in several other methods,
/// like: `clear`, `put_char`, etc.
fn set_default_background(&mut self, color: Color) {
Expand Down

0 comments on commit 500dd2d

Please sign in to comment.