Created
July 29, 2019 21:30
-
-
Save willnationsdev/b1b425dadd62797aedd46318a1aa7462 to your computer and use it in GitHub Desktop.
vim_editor_plugin
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
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