tomassedovic/tcod-rs — pull request #42 by tomassedovic (2014-11-20 22:57:56+00:00)
Title: Use the bitflags macro where appropriate

Some of our enums weren't supposed to be enums at all since their values could
be mixed and matched.

This replaces `FontFlags` and `KeyPressFlag` enums with `bitflags!` macros.
These define values that can be joined together.

This is a breaking change. You should change code like this:

Console::set_custom_font(font_path, &[LayoutTcod, TypeGreyscale])

to:

Console::set_custom_font(font_path, FONT_LAYOUT_TCOD | FONT_TYPE_GREYSCALE);

And:

Console::check_for_keypress(KeyPressedOrReleased);

to:

Console::check_for_keypress(KEY_PRESSED | KEY_RELEASED);

(or any other combination you need)

Closes #40