Skip to content

Instantly share code, notes, and snippets.

@henriquelalves
Last active March 5, 2016 04:32
Show Gist options
  • Select an option

  • Save henriquelalves/97ebdf271f25cd3d5d25 to your computer and use it in GitHub Desktop.

Select an option

Save henriquelalves/97ebdf271f25cd3d5d25 to your computer and use it in GitHub Desktop.
Godot_issue_printing_addon
#CUSTOM_DOCK.GD
tool
extends VBoxContainer
# member variables here, example:
# var a=2
# var b="textvar"
func _ready():
# Called every time the node is added to the scene.
# Initialization here
pass
func _on_Button_pressed():
print("Printing on terminal")
pass
# DOCK_PLUGIN.GD
tool
extends EditorPlugin
var dock = null
func _enter_tree():
# When this plugin node enters tree, add the custom type
dock = preload("res://addons/custom_dock/custom_dock.scn").instance()
add_control_to_dock( DOCK_SLOT_LEFT_UL, dock )
func _exit_tree():
# Remove from docks (must be called so layout is updated and saved)
remove_control_from_docks(dock)
# Remove the node
dock.free()
func edit(object):
print(object)
func forward_input_event(event):
return true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment