0 votes

Hi I was struggling a lot of hours because my lineedits don´t worked. The virtual keyboard was shown but you weren´t able to input letters on the lineedit. So I realized that was because I was moving the screen like this:
the parent of the scene is Control, so:
Control.position -= 900
I removed that line of code that was executed when the lineedit was focused and now it´s working again, but my keyboard is overlamping some part of the game that I need to show, so How I can move the screen up?

Godot version 3.2.3 stable
in Engine by (126 points)

1 Answer

+1 vote
Best answer

After moving your screen using control.position.y -=900 grab focus with your line edit my_line_edit.grab_focus()

by (3,080 points)
selected by

I think is the same that what I am doing, I am connecting the signal focus entered and then
Control.position -= 900 and that break all

Hmm well position is supposed to be a Vector2(xpos, ypos)
Xpos being left-right and Ypos being up-down
So something like Control.position -= Vector2 (0, 900) should do the trick
Also gonna go out on a limb here and assume by Control you mean the node reference to control and not that your code actually has Control.position -= 900

If it does you can get the main scene by using get_tree().get_current_scene()

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.