Skip to content

Commit 545c7f5

Browse files
committed
Remove all cancels
1 parent d6aac08 commit 545c7f5

4 files changed

Lines changed: 0 additions & 46 deletions

File tree

src/modules/CanvasRotate/CanvasRotate.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -243,18 +243,6 @@ void CREditorUI::ccTouchEnded(CCTouch* touch, CCEvent* event) {
243243
module->m_preTransformTouch.erase(touchRef);
244244
}
245245

246-
void CREditorUI::ccTouchCancelled(CCTouch* touch, CCEvent* event) {
247-
auto module = CanvasRotate::get();
248-
Ref<CCTouch> touchRef = touch;
249-
250-
module->m_preTransformTouch[touchRef] = touchRef->getLocation();
251-
252-
module->m_rotationNode->translate(touchRef);
253-
EditorUI::ccTouchCancelled(touchRef, event);
254-
255-
module->m_preTransformTouch.erase(touchRef);
256-
}
257-
258246
CCArray* CRLevelEditorLayer::objectsInRect(CCRect rect, bool ignoreLayerCheck) {
259247
auto result = CCArray::create();
260248

src/modules/CanvasRotate/CanvasRotate.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class $modify(CREditorUI, EditorUI) {
3333
(void) self.setHookPriorityPre("EditorUI::ccTouchBegan", Priority::EarlyPre);
3434
(void) self.setHookPriorityPre("EditorUI::ccTouchMoved", Priority::EarlyPre);
3535
(void) self.setHookPriorityPre("EditorUI::ccTouchEnded", Priority::EarlyPre);
36-
(void) self.setHookPriorityPre("EditorUI::ccTouchCancelled", Priority::EarlyPre);
3736
(void) self.setHookPriorityPre("EditorUI::scrollWheel", Priority::EarlyPre);
3837
}
3938

@@ -52,7 +51,6 @@ class $modify(CREditorUI, EditorUI) {
5251
bool ccTouchBegan(CCTouch* touch, CCEvent* event);
5352
void ccTouchMoved(CCTouch* touch, CCEvent* event);
5453
void ccTouchEnded(CCTouch* touch, CCEvent* event);
55-
void ccTouchCancelled(CCTouch* touch, CCEvent* event);
5654
void triggerSwipeMode();
5755
void updateSliderRotation(float dt);
5856
};

src/modules/TransformFix.cpp

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,6 @@ void TFGJTransformControl::ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEven
8080
GJTransformControl::ccTouchEnded(touch, event);
8181
}
8282

83-
void TFGJTransformControl::ccTouchCancelled(cocos2d::CCTouch* touch, cocos2d::CCEvent* event) {
84-
85-
auto fields = m_fields.self();
86-
if (fields->m_touchInMenu) {
87-
fields->m_touchInMenu = false;
88-
89-
auto menu = getMenu();
90-
if (!menu) return;
91-
92-
menu->ccTouchCancelled(touch, event);
93-
return;
94-
}
95-
GJTransformControl::ccTouchCancelled(touch, event);
96-
}
97-
9883
void TFGJTransformControl::scaleButtons(float scale) {
9984
GJTransformControl::scaleButtons(scale);
10085
if (tinker::utils::getMod<"razoom.improved_transform_controls">()) return;
@@ -171,18 +156,4 @@ void TFGJScaleControl::ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEvent* e
171156
return;
172157
}
173158
GJScaleControl::ccTouchEnded(touch, event);
174-
}
175-
176-
void TFGJScaleControl::ccTouchCancelled(cocos2d::CCTouch* touch, cocos2d::CCEvent* event) {
177-
auto fields = m_fields.self();
178-
if (fields->m_touchInMenu) {
179-
fields->m_touchInMenu = false;
180-
181-
auto menu = getMenu();
182-
if (!menu) return;
183-
184-
menu->ccTouchCancelled(touch, event);
185-
return;
186-
}
187-
GJScaleControl::ccTouchCancelled(touch, event);
188159
}

src/modules/TransformFix.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,11 @@ class $modify(TFGJTransformControl, GJTransformControl) {
2424
bool ccTouchBegan(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
2525
void ccTouchMoved(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
2626
void ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
27-
void ccTouchCancelled(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
2827

2928
static void _onModify(auto& self) {
3029
(void) self.setHookPriorityBeforePre("GJTransformControl::ccTouchBegan", "razoom.improved_transform_controls");
3130
(void) self.setHookPriorityBeforePre("GJTransformControl::ccTouchMoved", "razoom.improved_transform_controls");
3231
(void) self.setHookPriorityBeforePre("GJTransformControl::ccTouchEnded", "razoom.improved_transform_controls");
33-
(void) self.setHookPriorityBeforePre("GJTransformControl::ccTouchCancelled", "razoom.improved_transform_controls");
3432
}
3533
};
3634

@@ -49,5 +47,4 @@ class $modify(TFGJScaleControl, GJScaleControl) {
4947
bool ccTouchBegan(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
5048
void ccTouchMoved(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
5149
void ccTouchEnded(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
52-
void ccTouchCancelled(cocos2d::CCTouch* touch, cocos2d::CCEvent* event);
5350
};

0 commit comments

Comments
 (0)