mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-22 02:45:49 -04:00
hardcode editorui force priority
This commit is contained in:
parent
4a6b5b7c37
commit
f1a32b6aef
1 changed files with 8 additions and 0 deletions
|
@ -12,6 +12,14 @@ struct ForcePrioRevert : Modify<ForcePrioRevert, CCTouchDispatcher> {
|
|||
m_forcePrio = handler->getPriority() - 2;
|
||||
}
|
||||
|
||||
// bugfix for editor: since EditorUI doesn't call registerWithTouchDispatcher
|
||||
// every CCMenu created in init has lower priority than EditorUI, meaning
|
||||
// they are untouchable (EditorUI swallows)
|
||||
// this hardcodes that.
|
||||
if (typeinfo_cast<EditorUI*>(delegate)) {
|
||||
m_forcePrio = -2;
|
||||
}
|
||||
|
||||
CCTouchDispatcher::addTargetedDelegate(delegate, 0, swallowsTouches);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue