Skip to content

Instantly share code, notes, and snippets.

@willnationsdev
Created July 29, 2019 21:30
Show Gist options
  • Save willnationsdev/b1b425dadd62797aedd46318a1aa7462 to your computer and use it in GitHub Desktop.
Save willnationsdev/b1b425dadd62797aedd46318a1aa7462 to your computer and use it in GitHub Desktop.
vim_editor_plugin
var c = Control.new()
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, c)
for a_child in c.get_parent().get_children():
if a_child is HBoxContainer:
for a_btn in a_child.get_children():
if a_btn is BaseButton and a_btn.text == "Vim":
main_screen_btn = a_btn
break
if main_screen_btn:
break
c.free()
main_screen_btn.emit_signal("pressed")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment