tomassedovic / tcod-rs

Rust bindings for libtcod 1.6.3 (the Doryen library/roguelike toolkit)
Do What The F*ck You Want To Public License
229 stars 45 forks source link

get_default_foreground not wrapped? #295

Open kesinger opened 5 years ago

kesinger commented 5 years ago

Unless I'm missing something, console.rs wraps get_default_background but not get_default_foreground.

I'd think the fix would be something like adding:

fn get_default_foreground(&mut self) -> Color {
    unsafe {
        FromNative::from_native(
            ffi::TCOD_console_get_default_foreground(*self.as_native()))
    }
}

to console.rs since it looks like everything else is there at the c level.

tomassedovic commented 5 years ago

Yep, looks like it!

Would you mind opening a pull request? That snippet looks good to me.

kesinger commented 5 years ago

Will do, one sec....