tcod-rs icon indicating copy to clipboard operation
tcod-rs copied to clipboard

get_default_foreground not wrapped?

Open kesinger opened this issue 6 years ago • 2 comments

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.

kesinger avatar Jul 07 '19 22:07 kesinger

Yep, looks like it!

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

tomassedovic avatar Jul 08 '19 18:07 tomassedovic

Will do, one sec....

kesinger avatar Jul 12 '19 13:07 kesinger