mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-10 12:04:36 -04:00
fix inputnode touches behaving weirdly in certain situations
This commit is contained in:
parent
c48e8ad8d4
commit
29b4732173
2 changed files with 0 additions and 9 deletions
loader
|
@ -30,8 +30,6 @@ namespace geode {
|
|||
[[deprecated("Use geode::TextInput from the ui/TextInput.hpp header instead")]]
|
||||
static InputNode* create(float width, char const* placeholder);
|
||||
|
||||
void activate() override;
|
||||
|
||||
CCTextInputNode* getInput() const;
|
||||
cocos2d::extension::CCScale9Sprite* getBG() const;
|
||||
|
||||
|
|
|
@ -22,13 +22,6 @@ CCScale9Sprite* InputNode::getBG() const {
|
|||
return m_bgSprite;
|
||||
}
|
||||
|
||||
void InputNode::activate() {
|
||||
auto const size = m_input->getContentSize();
|
||||
auto const pos = m_input->convertToNodeSpace(getMousePos()) + m_input->m_textField->getAnchorPoint() * size;
|
||||
m_input->onClickTrackNode(true);
|
||||
m_input->updateCursorPosition(pos, { CCPointZero, size });
|
||||
}
|
||||
|
||||
void InputNode::setEnabled(bool enabled) {
|
||||
m_input->setMouseEnabled(enabled);
|
||||
m_input->setTouchEnabled(enabled);
|
||||
|
|
Loading…
Add table
Reference in a new issue