mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-16 21:13:46 +00:00
Updated dialogic
This commit is contained in:
parent
1d11462073
commit
cbb82512ee
483 changed files with 5743 additions and 2177 deletions
|
|
@ -19,6 +19,10 @@ func _update_background(argument:String, _time:float) -> void:
|
|||
if argument.begins_with('res://'):
|
||||
image_node.texture = load(argument)
|
||||
color_node.color = Color.TRANSPARENT
|
||||
elif argument.begins_with('user://'):
|
||||
var ext_image = Image.load_from_file(argument)
|
||||
image_node.texture = ImageTexture.create_from_image(ext_image)
|
||||
color_node.color = Color.TRANSPARENT
|
||||
elif argument.is_valid_html_color():
|
||||
image_node.texture = null
|
||||
color_node.color = Color(argument, 1)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://xwj105ltniqb
|
||||
uid://ci7s5odxo7543
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cl6g6ymkhjven"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://xwj105ltniqb" path="res://addons/dialogic/Modules/Background/DefaultBackgroundScene/default_background.gd" id="1_nkdrp"]
|
||||
[ext_resource type="Script" uid="uid://ci7s5odxo7543" path="res://addons/dialogic/Modules/Background/DefaultBackgroundScene/default_background.gd" id="1_nkdrp"]
|
||||
|
||||
[node name="DefaultBackground" type="Control"]
|
||||
layout_mode = 3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://dhqujsj8oqa7p
|
||||
uid://blaaa6obvwknl
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://020a4llqpjlv
|
||||
uid://6f7qewx7aga
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b6f6s6rsoy2bw
|
||||
uid://m3anyujei6ro
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://y8jr5c8l3e0a
|
||||
uid://dnuvmtb036bi3
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bjqdjfxjcvj7s
|
||||
uid://bed16hbuh4atn
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://d2ghxhx2432ro
|
||||
uid://ctoc2p12vahcc
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://c3bd283fo14yy
|
||||
uid://dknape5pbyevn
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://c63rtrqaasjey
|
||||
uid://dwhod30peco4c
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ var time: float
|
|||
var bg_holder: DialogicNode_BackgroundHolder
|
||||
|
||||
|
||||
@warning_ignore("unused_signal") # Used by scripts inheriting this class
|
||||
signal transition_finished
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cn1cj14nuhrk6
|
||||
uid://cf47aj5eivati
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b2ybl1gbf0jej
|
||||
uid://clabj6a02r7iv
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b7oxjroxkqi5q
|
||||
uid://cuj1xsi7d7r5y
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://5kc4er8aj0s3
|
||||
uid://bue1pfm6eu7ww
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bd73gvgsuaxay
|
||||
uid://bkj1kaqcq5208
|
||||
|
|
|
|||
|
|
@ -35,3 +35,4 @@ func _custom_fade_in(_time:float) -> bool:
|
|||
## If you return false (by default) it will attempt to animate the "modulate" property.
|
||||
func _custom_fade_out(_time:float) -> bool:
|
||||
return false
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://5rp6alg02rv0
|
||||
uid://blsjcvm6gvd78
|
||||
|
|
|
|||
|
|
@ -13,7 +13,11 @@ extends DialogicEvent
|
|||
var scene := ""
|
||||
## The argument that is passed to the background scene.
|
||||
## For the default scene it's the path to the image to show.
|
||||
var argument := ""
|
||||
var argument := "":
|
||||
set(value):
|
||||
if argument != value:
|
||||
argument = value
|
||||
ui_update_needed.emit()
|
||||
## The time the fade animation will take. Leave at 0 for instant change.
|
||||
var fade: float = 0.0
|
||||
## Name of the transition to use.
|
||||
|
|
@ -82,8 +86,8 @@ func get_shortcode() -> String:
|
|||
func get_shortcode_parameters() -> Dictionary:
|
||||
return {
|
||||
#param_name : property_info
|
||||
"scene" : {"property": "scene", "default": ""},
|
||||
"arg" : {"property": "argument", "default": ""},
|
||||
"scene" : {"property": "scene", "default": "", "ext_file":true},
|
||||
"arg" : {"property": "argument", "default": "", "ext_file":true},
|
||||
"fade" : {"property": "fade", "default": 0},
|
||||
"transition" : {"property": "transition", "default": "",
|
||||
"suggestions": get_transition_suggestions},
|
||||
|
|
@ -138,6 +142,10 @@ func build_event_editor() -> void:
|
|||
'_arg_type == ArgumentTypes.IMAGE or _scene_type == SceneTypes.DEFAULT')
|
||||
add_header_edit('argument', ValueType.SINGLELINE_TEXT, {}, '_arg_type == ArgumentTypes.CUSTOM')
|
||||
|
||||
add_body_edit("argument", ValueType.IMAGE_PREVIEW, {'left_text':'Preview:'},
|
||||
'(_arg_type == ArgumentTypes.IMAGE or _scene_type == SceneTypes.DEFAULT) and !argument.is_empty()')
|
||||
add_body_line_break('(_arg_type == ArgumentTypes.IMAGE or _scene_type == SceneTypes.DEFAULT) and !argument.is_empty()')
|
||||
|
||||
add_body_edit("transition", ValueType.DYNAMIC_OPTIONS,
|
||||
{'left_text':'Transition:',
|
||||
'empty_text':'Simple Fade',
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://ccksowqutf0np
|
||||
uid://sioj2uwexnwx
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://cpl0roawa546c
|
||||
uid://bj085abnvwkyh
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://bisx1nk1bjyjc
|
||||
uid://oxcjhq2817c7
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ func update_background(scene := "", argument := "", fade_time := 0.0, transition
|
|||
else:
|
||||
new_viewport = null
|
||||
|
||||
# if there is still a transition going on, stop it now
|
||||
for node in get_children():
|
||||
if node is DialogicBackgroundTransition:
|
||||
node.queue_free()
|
||||
|
||||
|
||||
var trans_script: Script = load(DialogicResourceUtil.guess_special_resource("BackgroundTransition", transition_path, {"path":default_transition}).path)
|
||||
var trans_node := Node.new()
|
||||
trans_node.set_script(trans_script)
|
||||
|
|
@ -107,6 +113,7 @@ func update_background(scene := "", argument := "", fade_time := 0.0, transition
|
|||
trans_node.time = fade_time
|
||||
|
||||
if old_viewport:
|
||||
old_viewport.name = "OldBackground"
|
||||
trans_node.prev_scene = old_viewport.get_meta('node', null)
|
||||
trans_node.prev_texture = old_viewport.get_child(0).get_texture()
|
||||
old_viewport.get_meta('node')._custom_fade_out(fade_time)
|
||||
|
|
@ -115,6 +122,7 @@ func update_background(scene := "", argument := "", fade_time := 0.0, transition
|
|||
old_viewport.get_child(0).render_target_update_mode = SubViewport.UPDATE_ALWAYS
|
||||
trans_node.transition_finished.connect(old_viewport.queue_free)
|
||||
if new_viewport:
|
||||
new_viewport.name = "NewBackground"
|
||||
trans_node.next_scene = new_viewport.get_meta('node', null)
|
||||
trans_node.next_texture = new_viewport.get_child(0).get_texture()
|
||||
new_viewport.get_meta('node')._update_background(argument, fade_time)
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
uid://b41q2p73ce000
|
||||
uid://5uwbnllu1kfv
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue