ajout du plugin dialogical

This commit is contained in:
2026-01-10 13:00:58 +01:00
parent 8917a02a7b
commit c130c47042
884 changed files with 49385 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
extends DialogicBackground
## The default background scene.
## Extend the DialogicBackground class to create your own background scene.
@onready var image_node: TextureRect = $Image
@onready var color_node: ColorRect = $ColorRect
func _ready() -> void:
image_node.expand_mode = TextureRect.EXPAND_IGNORE_SIZE
image_node.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_COVERED
image_node.anchor_right = 1
image_node.anchor_bottom = 1
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)
else:
image_node.texture = null
color_node.color = Color.from_string(argument, Color.TRANSPARENT)

View File

@@ -0,0 +1 @@
uid://ci7s5odxo7543

View File

@@ -0,0 +1,29 @@
[gd_scene load_steps=2 format=3 uid="uid://cl6g6ymkhjven"]
[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
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_nkdrp")
[node name="ColorRect" type="ColorRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Image" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 0