fix inputnode touches behaving weirdly in certain situations

This commit is contained in:
dankmeme01 2024-05-05 09:18:10 +02:00
parent c48e8ad8d4
commit 29b4732173
2 changed files with 0 additions and 9 deletions
loader
include/Geode/ui
src/ui/nodes

View file

@ -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;

View file

@ -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);