-
-
Notifications
You must be signed in to change notification settings - Fork 240
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2.0 Jump + Label, Event Button Sorting (#934)
* Add Goto and Label event This reimplements the goto and label functionality. GoTo only allows to jump inside the timeline, while change timeline now has a label settings as well, that allows to start the given timeline at a specific point. Alternatively you can also specify a label when starting a timeline in code by doing DialogicGameHandler.start_timeline(resource, label). The label is optional though. The event icons are a bit to big. Emilio should fix that. * Implement event button sorting and class names Added class names to the events that were missing one. Implemented button sorting again. * Make sure events don't save empty/null properties * Unify Change Timeline and GoTo into Jump event The new jump event is basically a Change timeline event with a label selector. If no timeline is selected (or the current one), it will just jump to a label with the name inside the current timeline. * Make ResourcePicker allow empty values
- Loading branch information
1 parent
f34a89d
commit 7f05e22
Showing
17 changed files
with
110 additions
and
55 deletions.
There are no files selected for viewing
This file contains 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
4 changes: 0 additions & 4 deletions
4
addons/dialogic/Editor/Images/Event Icons/Main Icons/go-to.svg
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
tool | ||
extends DialogicEvent | ||
|
||
class_name DialogicConditionEvent | ||
|
||
enum ConditionTypes {IF, ELIF, ELSE} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
tool | ||
extends DialogicEvent | ||
|
||
class_name DialogicEndBranchEvent | ||
|
||
var this_is_an_end_event | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
tool | ||
extends DialogicEvent | ||
class_name DialogicChangeTimelineEvent | ||
|
||
# DEFINE ALL PROPERTIES OF THE EVENT | ||
var Timeline :DialogicTimeline = null | ||
var Label : String = "" | ||
|
||
func _execute() -> void: | ||
if Timeline and Timeline != dialogic_game_handler.current_timeline: | ||
print("---------------switching timelines----------------") | ||
dialogic_game_handler.start_timeline(Timeline, Label) | ||
elif Label: | ||
dialogic_game_handler.jump_to_label(Label) | ||
finish() | ||
|
||
|
||
################################################################################ | ||
## INITIALIZE | ||
################################################################################ | ||
|
||
# SET ALL VALUES THAT SHOULD NEVER CHANGE HERE | ||
func _init() -> void: | ||
event_name = "Jump" | ||
event_color = Color("#12b76a") | ||
event_category = Category.TIMELINE | ||
event_sorting_index = 0 | ||
|
||
|
||
|
||
################################################################################ | ||
## SAVING/LOADING | ||
################################################################################ | ||
func get_shortcode() -> String: | ||
return "jump" | ||
|
||
func get_shortcode_parameters() -> Dictionary: | ||
return { | ||
#param_name : property_name | ||
"timeline" : "Timeline", | ||
"label" : "Label", | ||
} | ||
|
||
|
||
################################################################################ | ||
## EDITOR REPRESENTATION | ||
################################################################################ | ||
|
||
func build_event_editor(): | ||
add_header_edit('Timeline', ValueType.Timeline, 'Timeline:') | ||
add_header_edit('Label', ValueType.SinglelineText, 'Label:') | ||
|
File renamed without changes
This file contains 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
File renamed without changes
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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