Skip to content

Commit

Permalink
implement showUI
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Jun 22, 2024
1 parent 4b28ed2 commit c2d6226
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/hooks/EditorUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,12 @@ struct EditorUIHook : Modify<EditorUIHook, EditorUI> {
}
return EditorUI::ccTouchEnded(touch, event);
}

void showUI(bool show) {
EditorUI::showUI(show);

auto alliumButton = static_cast<CCMenuItemSpriteExtra*>(this->getChildByIDRecursive("allium-button"_spr));
alliumButton->setEnabled(show);
alliumButton->setVisible(show);
}
};

0 comments on commit c2d6226

Please sign in to comment.