mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-31 07:10:28 -04:00
im crying with more prio
This commit is contained in:
parent
bedd6d3f59
commit
9b8a1a470f
1 changed files with 9 additions and 1 deletions
|
@ -8,10 +8,18 @@ struct ForcePrioRevert : Modify<ForcePrioRevert, CCTouchDispatcher> {
|
|||
void addTargetedDelegate(CCTouchDelegate* delegate, int priority, bool swallowsTouches) {
|
||||
m_targetPrio = 0xb00b5; // fuck you windows i hate you for inlining isUsingForcePrio
|
||||
|
||||
if (auto handler = this->findHandler(delegate)) {
|
||||
log::debug("already have handler with prio {}", handler->m_nPriority);
|
||||
}
|
||||
|
||||
m_forcePrio = -1;
|
||||
if (m_pHandlersToAdd->count() > 0) {
|
||||
auto handler = static_cast<CCTouchHandler*>(m_pHandlersToAdd->objectAtIndex(0));
|
||||
m_forcePrio = std::min(m_forcePrio, handler->getPriority() - 1);
|
||||
}
|
||||
if (m_pTargetedHandlers->count() > 0) {
|
||||
auto handler = static_cast<CCTouchHandler*>(m_pTargetedHandlers->objectAtIndex(0));
|
||||
m_forcePrio = handler->getPriority() - 1;
|
||||
m_forcePrio = std::min(m_forcePrio, handler->getPriority() - 1);
|
||||
}
|
||||
|
||||
// bugfix for editor: since EditorUI doesn't call registerWithTouchDispatcher
|
||||
|
|
Loading…
Add table
Reference in a new issue