mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
avoid convertTouchToNodeSpace because of mac
This commit is contained in:
parent
2d8e988ce3
commit
d6de1187d3
1 changed files with 3 additions and 4 deletions
|
@ -10,10 +10,9 @@ using namespace geode::prelude;
|
|||
|
||||
struct CCTextInputNodeFix : Modify<CCTextInputNodeFix, CCTextInputNode> {
|
||||
bool ccTouchBegan(CCTouch* touch, CCEvent* event) {
|
||||
CCPoint pos = this->convertTouchToNodeSpace(touch);
|
||||
CCSize size = this->getContentSize();
|
||||
|
||||
pos += m_textField->getAnchorPoint() * size;
|
||||
auto const touchPos = touch->getLocation();
|
||||
auto const size = this->getContentSize();
|
||||
auto const pos = this->convertToNodeSpace(touchPos) + m_textField->getAnchorPoint() * size;
|
||||
|
||||
if (pos.x < 0 || pos.x > size.width || pos.y < 0 || pos.y > size.height)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue