mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-04 09:11:31 -04:00
i hate force prio i hate force prio
This commit is contained in:
parent
a2389f65ee
commit
d28084c3bf
3 changed files with 22 additions and 22 deletions
loader
include/Geode/cocos/touch_dispatcher
src/hooks
test/members
|
@ -233,10 +233,11 @@ protected:
|
|||
// 4, 1 for each type of event
|
||||
struct ccTouchHandlerHelperData m_sHandlerHelperData[ccTouchMax];
|
||||
|
||||
RT_ADD(
|
||||
CC_SYNTHESIZE_NV(bool, m_bForcePrio, ForcePrio);
|
||||
CC_SYNTHESIZE_NV(int, m_nTargetPrio, TargetPrio);
|
||||
)
|
||||
// 2.2 changes
|
||||
|
||||
CC_SYNTHESIZE_NV(int, m_forcePrio, ForcePrio);
|
||||
CC_SYNTHESIZE_NV(int, m_targetPrio, TargetPrio);
|
||||
int m_inversePrio;
|
||||
};
|
||||
|
||||
// end of input group
|
||||
|
|
|
@ -2,24 +2,20 @@ using namespace geode::prelude;
|
|||
|
||||
// TODO: 2.2 changes touch prio, we need to test how that affects things
|
||||
|
||||
// #include <Geode/modify/CCTouchDispatcher.hpp>
|
||||
#include <Geode/modify/CCTouchDispatcher.hpp>
|
||||
|
||||
// struct ForcePrioRevert : Modify<ForcePrioRevert, CCTouchDispatcher> {
|
||||
// void addTargetedDelegate(CCTouchDelegate* delegate, int priority, bool swallowsTouches) {
|
||||
// m_bForcePrio = false;
|
||||
// if (m_pTargetedHandlers->count() > 0) {
|
||||
// auto handler = static_cast<CCTouchHandler*>(m_pTargetedHandlers->objectAtIndex(0));
|
||||
// priority = handler->getPriority() - 2;
|
||||
// }
|
||||
struct ForcePrioRevert : Modify<ForcePrioRevert, CCTouchDispatcher> {
|
||||
bool isUsingForcePrio() {
|
||||
return true;
|
||||
}
|
||||
|
||||
// CCTouchDispatcher::addTargetedDelegate(delegate, priority, swallowsTouches);
|
||||
// }
|
||||
void addTargetedDelegate(CCTouchDelegate* delegate, int priority, bool swallowsTouches) {
|
||||
m_forcePrio = -2;
|
||||
if (m_pTargetedHandlers->count() > 0) {
|
||||
auto handler = static_cast<CCTouchHandler*>(m_pTargetedHandlers->objectAtIndex(0));
|
||||
m_forcePrio = handler->getPriority() - 2;
|
||||
}
|
||||
|
||||
// void incrementForcePrio(int num) {
|
||||
// m_bForcePrio = false;
|
||||
// }
|
||||
|
||||
// void decrementForcePrio(int num) {
|
||||
// m_bForcePrio = false;
|
||||
// }
|
||||
// };
|
||||
CCTouchDispatcher::addTargetedDelegate(delegate, 0, swallowsTouches);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -34,6 +34,9 @@ GEODE_SIZE_CHECK(SliderTouchLogic, 0x174);
|
|||
GEODE_SIZE_CHECK(CCScrollLayerExt, 0x184);
|
||||
GEODE_SIZE_CHECK(TableView, 0x1dc);
|
||||
GEODE_SIZE_CHECK(CCTextInputNode, 0x1a0);
|
||||
GEODE_SIZE_CHECK(CCTouchDispatcher, 0x6c);
|
||||
|
||||
// GEODE_MEMBER_CHECK(CCTouchDispatcher, m_forcePrio, 0x60);
|
||||
|
||||
GEODE_MEMBER_CHECK(CCTextInputNode, m_maxLabelWidth, 0x164);
|
||||
GEODE_MEMBER_CHECK(CCTextInputNode, m_textField, 0x17c);
|
||||
|
|
Loading…
Add table
Reference in a new issue