Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
47
Sprout/addons/dialogic/Editor/dialogic_editor.gd
Normal file
47
Sprout/addons/dialogic/Editor/dialogic_editor.gd
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
@tool
|
||||
class_name DialogicEditor
|
||||
extends Control
|
||||
|
||||
## Base class for all dialogic editors.
|
||||
|
||||
# These signals will automatically be emitted if current_resource_state is changed.
|
||||
signal resource_saved()
|
||||
signal resource_unsaved()
|
||||
|
||||
var current_resource: Resource
|
||||
|
||||
## State of the current resource
|
||||
enum ResourceStates {Saved, Unsaved}
|
||||
var current_resource_state: ResourceStates:
|
||||
set(value):
|
||||
current_resource_state = value
|
||||
if value == ResourceStates.Saved:
|
||||
resource_saved.emit()
|
||||
else:
|
||||
resource_unsaved.emit()
|
||||
|
||||
var editors_manager: Control
|
||||
|
||||
## Overwrite. Register to the editor manager in here.
|
||||
func _register() -> void:
|
||||
pass
|
||||
|
||||
|
||||
## If this editor supports editing resources, load them here (overwrite in subclass)
|
||||
func _open_resource(resource:Resource) -> void:
|
||||
pass
|
||||
|
||||
|
||||
## If this editor supports editing resources, save them here (overwrite in subclass)
|
||||
func _save_resource() -> void:
|
||||
pass
|
||||
|
||||
|
||||
## Overwrite. Called when this editor is shown. (show() doesn't have to be called)
|
||||
func _open(extra_info:Variant = null) -> void:
|
||||
pass
|
||||
|
||||
|
||||
## Overwrite. Called when another editor is opened. (hide() doesn't have to be called)
|
||||
func _close():
|
||||
pass
|
||||
Loading…
Add table
Add a link
Reference in a new issue