2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 22:27:43 +00:00

Add True and False tests for bitwise enums

This commit is contained in:
Jack Andersen
2019-04-02 18:30:35 -10:00
parent 9bb21b0b32
commit 8ba5cf9a8b
4 changed files with 6 additions and 6 deletions

View File

@@ -446,7 +446,7 @@ void RootView::touchMove(const boo::STouchCoord& coord, uintptr_t tid) {
void RootView::charKeyDown(unsigned long charCode, boo::EModifierKey mods, bool isRepeat) {
for (View* v : m_views)
v->charKeyDown(charCode, mods, isRepeat);
if (m_activeTextView && (mods & (boo::EModifierKey::Ctrl | boo::EModifierKey::Command)) != boo::EModifierKey::None) {
if (m_activeTextView && True(mods & (boo::EModifierKey::Ctrl | boo::EModifierKey::Command))) {
if (charCode == 'c' || charCode == 'C')
m_activeTextView->clipboardCopy();
else if (charCode == 'x' || charCode == 'X')
@@ -462,7 +462,7 @@ void RootView::charKeyUp(unsigned long charCode, boo::EModifierKey mods) {
}
void RootView::specialKeyDown(boo::ESpecialKey key, boo::EModifierKey mods, bool isRepeat) {
if (key == boo::ESpecialKey::Enter && (mods & boo::EModifierKey::Alt) != boo::EModifierKey::None) {
if (key == boo::ESpecialKey::Enter && True(mods & boo::EModifierKey::Alt)) {
m_window->setFullscreen(!m_window->isFullscreen());
return;
}