Created
February 16, 2018 12:21
-
-
Save TheApeMachine/8be5c7849330c9ac426fbf20237c6cbc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This was my initial code, which sets the cursor before the prompt: | |
func _input(event): | |
if Input.is_key_pressed(KEY_ENTER): | |
insert_text_at_cursor(">") | |
# And this is how I tried to fix it, which seems to just make a mess of things: | |
func _input(event): | |
if Input.is_key_pressed(KEY_ENTER): | |
insert_text_at_cursor("\n") | |
current_line += 1 | |
cursor_set_line(current_line) | |
insert_text_at_cursor(">") | |
cursor_set_column(2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment