Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_default_foreground not wrapped? #295

Open
kesinger opened this issue Jul 7, 2019 · 2 comments
Open

get_default_foreground not wrapped? #295

kesinger opened this issue Jul 7, 2019 · 2 comments

Comments

@kesinger
Copy link
Contributor

kesinger commented Jul 7, 2019

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
Copy link
Owner

Yep, looks like it!

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

@kesinger
Copy link
Contributor Author

Will do, one sec....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants