Last active
March 5, 2016 04:32
-
-
Save henriquelalves/97ebdf271f25cd3d5d25 to your computer and use it in GitHub Desktop.
Godot_issue_printing_addon
This file contains hidden or 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
| #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