Skip to content

Commit

Permalink
Fixed some mistakes made during wrapper cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
willnationsdev committed Jul 14, 2018
1 parent 045917b commit 31afda1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion addons/godot-plugin-refresher/plugin.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ name="Godot Plugin Refresher"
description="A toolbar addition to facilitate toggling off/on a selected plugin."
author="willnationsdev"
version="1.0"
script="plugin.gd"
script="plugin_refresher_plugin.gd"
3 changes: 3 additions & 0 deletions addons/godot-plugin-refresher/plugin_refresher.gd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ signal request_refresh_plugin(p_name)

onready var options = $OptionButton

func _ready():
reload_items()

func reload_items():
if not options:
return
Expand Down
1 change: 1 addition & 0 deletions addons/godot-plugin-refresher/plugin_refresher.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ group = null
icon = ExtResource( 2 )
flat = true
align = 1
_sections_unfolded = [ "icon" ]

[connection signal="pressed" from="RefreshButton" to="." method="_on_RefreshButton_pressed"]
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ func _enter_tree():
refresher = PluginRefresherScn.instance()
add_control_to_container(CONTAINER_TOOLBAR, refresher)

#var efs = get_editor_interface().get_resource_filesystem()
#efs.connect("filesystem_changed", self, "_on_filesystem_changed")
var efs = get_editor_interface().get_resource_filesystem()
efs.connect("filesystem_changed", self, "_on_filesystem_changed")

#refresher.connect("request_refresh_plugin", self, "_on_request_refresh_plugin")
refresher.connect("request_refresh_plugin", self, "_on_request_refresh_plugin")

func _exit_tree():
remove_control_from_container(CONTAINER_TOOLBAR, refresher)
Expand All @@ -23,5 +23,6 @@ func _on_filesystem_changed():
refresher.reload_items()

func _on_request_refresh_plugin(p_name):
print("Refreshing plugin: ", p_name)
get_editor_interface().set_plugin_enabled(p_name, false)
get_editor_interface().set_plugin_enabled(p_name, true)

0 comments on commit 31afda1

Please sign in to comment.