Add addons
This commit is contained in:
parent
2c862b2235
commit
3367bad24f
527 changed files with 36197 additions and 0 deletions
59
Sprout/addons/dialogic/Events/Jump/event_label.gd
Normal file
59
Sprout/addons/dialogic/Events/Jump/event_label.gd
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
@tool
|
||||
class_name DialogicLabelEvent
|
||||
extends DialogicEvent
|
||||
|
||||
## Event that is used as an anchor. You can use the DialogicJumpEvent to jump to this point.
|
||||
|
||||
|
||||
### Settings
|
||||
|
||||
## Used to identify the label. Duplicate names in a timeline will mean it always chooses the first.
|
||||
var name: String = ""
|
||||
|
||||
|
||||
################################################################################
|
||||
## EXECUTE
|
||||
################################################################################
|
||||
|
||||
func _execute() -> void:
|
||||
# This event is mainly implemented in the DialogicGameHandlers jump_to_label() method.
|
||||
finish()
|
||||
|
||||
|
||||
################################################################################
|
||||
## INITIALIZE
|
||||
################################################################################
|
||||
|
||||
func _init() -> void:
|
||||
event_name = "Label"
|
||||
set_default_color('Color2')
|
||||
event_category = Category.Timeline
|
||||
event_sorting_index = 1
|
||||
continue_at_end = true
|
||||
|
||||
|
||||
func _get_icon() -> Resource:
|
||||
return load(self.get_script().get_path().get_base_dir().path_join('icon_label.png'))
|
||||
|
||||
|
||||
################################################################################
|
||||
## SAVING/LOADING
|
||||
################################################################################
|
||||
|
||||
func get_shortcode() -> String:
|
||||
return "label"
|
||||
|
||||
|
||||
func get_shortcode_parameters() -> Dictionary:
|
||||
return {
|
||||
#param_name : property_info
|
||||
"name" : {"property": "name", "default": ""},
|
||||
}
|
||||
|
||||
|
||||
################################################################################
|
||||
## EDITOR REPRESENTATION
|
||||
################################################################################
|
||||
|
||||
func build_event_editor():
|
||||
add_header_edit('name', ValueType.SinglelineText, '')
|
||||
Loading…
Add table
Add a link
Reference in a new issue