ajout du plugin dialogical
This commit is contained in:
202
addons/dialogic/Example Assets/Fonts/LICENSE.txt
Normal file
202
addons/dialogic/Example Assets/Fonts/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf
Normal file
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf
Normal file
Binary file not shown.
36
addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf.import
Normal file
36
addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf.import
Normal file
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://cc4xli25271fd"
|
||||
path="res://.godot/imported/Roboto-Bold.ttf-a0c3395776dbc11ee676c5f1ea9c0579.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/Fonts/Roboto-Bold.ttf"
|
||||
dest_files=["res://.godot/imported/Roboto-Bold.ttf-a0c3395776dbc11ee676c5f1ea9c0579.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Italic.ttf
Normal file
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Italic.ttf
Normal file
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://b5c0p00x6g6u5"
|
||||
path="res://.godot/imported/Roboto-Italic.ttf-844485a0171d6031f98f4829003a881a.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/Fonts/Roboto-Italic.ttf"
|
||||
dest_files=["res://.godot/imported/Roboto-Italic.ttf-844485a0171d6031f98f4829003a881a.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Regular.ttf
Normal file
BIN
addons/dialogic/Example Assets/Fonts/Roboto-Regular.ttf
Normal file
Binary file not shown.
@@ -0,0 +1,36 @@
|
||||
[remap]
|
||||
|
||||
importer="font_data_dynamic"
|
||||
type="FontFile"
|
||||
uid="uid://vrrmdx83skor"
|
||||
path="res://.godot/imported/Roboto-Regular.ttf-d9ce0640effe9e93230b445b37d8e692.fontdata"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/Fonts/Roboto-Regular.ttf"
|
||||
dest_files=["res://.godot/imported/Roboto-Regular.ttf-d9ce0640effe9e93230b445b37d8e692.fontdata"]
|
||||
|
||||
[params]
|
||||
|
||||
Rendering=null
|
||||
antialiasing=1
|
||||
generate_mipmaps=false
|
||||
disable_embedded_bitmaps=true
|
||||
multichannel_signed_distance_field=false
|
||||
msdf_pixel_range=8
|
||||
msdf_size=48
|
||||
allow_system_fallback=true
|
||||
force_autohinter=false
|
||||
modulate_color_glyphs=false
|
||||
hinting=1
|
||||
subpixel_positioning=1
|
||||
keep_rounding_remainders=true
|
||||
oversampling=0.0
|
||||
Fallbacks=null
|
||||
fallbacks=[]
|
||||
Compress=null
|
||||
compress=true
|
||||
preload=[]
|
||||
language_support={}
|
||||
script_support={}
|
||||
opentype_features={}
|
||||
12
addons/dialogic/Example Assets/already_read_indicator.gd
Normal file
12
addons/dialogic/Example Assets/already_read_indicator.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Control
|
||||
|
||||
func _ready() -> void:
|
||||
if DialogicUtil.autoload().has_subsystem('History'):
|
||||
DialogicUtil.autoload().History.visited_event.connect(_on_visited_event)
|
||||
DialogicUtil.autoload().History.unvisited_event.connect(_on_not_read_event)
|
||||
|
||||
func _on_visited_event() -> void:
|
||||
show()
|
||||
|
||||
func _on_not_read_event() -> void:
|
||||
hide()
|
||||
@@ -0,0 +1 @@
|
||||
uid://qru8kj5n8hup
|
||||
BIN
addons/dialogic/Example Assets/backgrounds/BubbleEnd.png
Normal file
BIN
addons/dialogic/Example Assets/backgrounds/BubbleEnd.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b3sccqj6l42w6"
|
||||
path="res://.godot/imported/BubbleEnd.png-a2bd812e4aeb33a7c97291d41dcc1793.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/backgrounds/BubbleEnd.png"
|
||||
dest_files=["res://.godot/imported/BubbleEnd.png-a2bd812e4aeb33a7c97291d41dcc1793.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b3mgfla25qml3"
|
||||
path="res://.godot/imported/new-default-dialog.png-1bc90907f2427bd6cdb905ff375cdb22.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/backgrounds/new-default-dialog.png"
|
||||
dest_files=["res://.godot/imported/new-default-dialog.png-1bc90907f2427bd6cdb905ff375cdb22.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/bptc_ldr=0
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
addons/dialogic/Example Assets/backgrounds/rpg_box.webp
Normal file
BIN
addons/dialogic/Example Assets/backgrounds/rpg_box.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dch8fuekijffp"
|
||||
path="res://.godot/imported/rpg_box.webp-6ea0804b52e01599dbc94ffacc31d433.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/backgrounds/rpg_box.webp"
|
||||
dest_files=["res://.godot/imported/rpg_box.webp-6ea0804b52e01599dbc94ffacc31d433.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -0,0 +1,84 @@
|
||||
@tool
|
||||
class_name DialogicRichTextTransitionEffect
|
||||
extends RichTextEffect
|
||||
|
||||
var visible_characters := -1
|
||||
|
||||
@export var bbcode := "animate_in"
|
||||
var cache := []
|
||||
|
||||
@export_range(0.0, 5.0, 0.01) var time := 0.2
|
||||
@export_group("Color", "color")
|
||||
@export var color_modulate: Gradient = null
|
||||
@export var color_replace: Gradient = null
|
||||
@export_group("Scale", "scale")
|
||||
@export var scale_enabled := false
|
||||
@export var scale_curve := Curve.new()
|
||||
@export var scale_pivot := Vector2()
|
||||
@export_group("Position", "position")
|
||||
@export var position_enabled := false
|
||||
@export var position_x_curve := Curve.new()
|
||||
@export var position_y_curve := Curve.new()
|
||||
|
||||
@export_group("Test", "test")
|
||||
@export_range(-0.1, 1.0, 0.1) var test_value := -0.1
|
||||
|
||||
var was_skipped := false
|
||||
var was_reset := false
|
||||
|
||||
|
||||
func reset() -> void:
|
||||
was_reset = true
|
||||
was_skipped = false
|
||||
cache.clear()
|
||||
|
||||
|
||||
func skip() -> void:
|
||||
was_skipped = true
|
||||
|
||||
|
||||
func _process_custom_fx(char_fx: CharFXTransform) -> bool:
|
||||
var char_age :float = 0.0
|
||||
if test_value >= 0:
|
||||
char_age = test_value
|
||||
|
||||
else:
|
||||
if visible_characters == 0:
|
||||
cache.clear()
|
||||
return false
|
||||
if was_reset:
|
||||
if visible_characters != -1:
|
||||
was_reset = false
|
||||
else:
|
||||
return false
|
||||
|
||||
if len(cache) < visible_characters or visible_characters == -1 or was_skipped:
|
||||
if char_fx.range.x >= len(cache):
|
||||
cache.append(char_fx.elapsed_time)
|
||||
|
||||
if was_skipped:
|
||||
for i in range(len(cache)):
|
||||
cache[i] = char_fx.elapsed_time-time
|
||||
|
||||
if len(cache) > char_fx.range.x:
|
||||
char_age = char_fx.elapsed_time - cache[char_fx.range.x]
|
||||
|
||||
var text_server := TextServerManager.get_primary_interface()
|
||||
var trans: float = clamp(char_age, 0.0, time)/time
|
||||
|
||||
if color_replace:
|
||||
var c := color_replace.sample(trans)
|
||||
c.a = 1
|
||||
char_fx.color = char_fx.color.lerp(c, color_replace.sample(trans).a)
|
||||
if color_modulate:
|
||||
char_fx.color *= color_modulate.sample(trans)
|
||||
if char_fx.font.is_valid():
|
||||
var glyph_size := text_server.font_get_glyph_size(char_fx.font, Vector2i(16,1), char_fx.glyph_index)
|
||||
if scale_enabled:
|
||||
char_fx.transform = char_fx.transform.translated_local(scale_pivot*glyph_size*Vector2(1, -1)*(1-scale_curve.sample(trans)))
|
||||
char_fx.transform = char_fx.transform.scaled_local(Vector2.ONE*scale_curve.sample(trans))
|
||||
|
||||
if position_enabled:
|
||||
char_fx.transform = char_fx.transform.translated_local(Vector2(position_x_curve.sample(trans), position_y_curve.sample(trans))*glyph_size)
|
||||
|
||||
return true
|
||||
@@ -0,0 +1 @@
|
||||
uid://wf7hpguw17ex
|
||||
@@ -0,0 +1,17 @@
|
||||
[gd_resource type="RichTextEffect" script_class="DialogicRichTextTransitionEffect" load_steps=3 format=3 uid="uid://qegqrr4g2riu"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wf7hpguw17ex" path="res://addons/dialogic/Example Assets/bbcode_transitions/bbcode_transition_effect.gd" id="1_5w3vn"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_5w3vn"]
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5w3vn")
|
||||
bbcode = "fade_in"
|
||||
time = 0.2
|
||||
color_modulate = SubResource("Gradient_5w3vn")
|
||||
scale_enabled = false
|
||||
scale_pivot = Vector2(0, 0)
|
||||
position_enabled = false
|
||||
test_value = -0.1
|
||||
metadata/_custom_type_script = "uid://wf7hpguw17ex"
|
||||
@@ -0,0 +1,24 @@
|
||||
[gd_resource type="RichTextEffect" script_class="DialogicRichTextTransitionEffect" load_steps=4 format=3 uid="uid://hx8qyt5ry3h0"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wf7hpguw17ex" path="res://addons/dialogic/Example Assets/bbcode_transitions/bbcode_transition_effect.gd" id="1_rsak6"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_rsak6"]
|
||||
offsets = PackedFloat32Array(0, 0.6351706)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="Curve" id="Curve_oitc5"]
|
||||
_limits = [0.0, 2.0, 0.0, 1.0]
|
||||
_data = [Vector2(0, 2), 0.0, 0.0, 0, 0, Vector2(0.40294844, 1.0066038), -0.13865282, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_rsak6")
|
||||
bbcode = "fade_scale_in"
|
||||
time = 0.30000000000000004
|
||||
color_modulate = SubResource("Gradient_rsak6")
|
||||
scale_enabled = true
|
||||
scale_curve = SubResource("Curve_oitc5")
|
||||
scale_pivot = Vector2(0.5, 0.5)
|
||||
position_enabled = false
|
||||
test_value = -0.1
|
||||
metadata/_custom_type_script = "uid://wf7hpguw17ex"
|
||||
@@ -0,0 +1,35 @@
|
||||
[gd_resource type="RichTextEffect" script_class="DialogicRichTextTransitionEffect" load_steps=6 format=3 uid="uid://c8b884puc720d"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wf7hpguw17ex" path="res://addons/dialogic/Example Assets/bbcode_transitions/bbcode_transition_effect.gd" id="1_n3lqs"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_n3lqs"]
|
||||
offsets = PackedFloat32Array(0, 0.45292622)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_lhhwu"]
|
||||
interpolation_mode = 1
|
||||
offsets = PackedFloat32Array(0, 0.6666667, 0.86513996)
|
||||
colors = PackedColorArray(0.5208, 0.76631993, 0.93, 0, 0.5242275, 0.76595265, 0.93170327, 1, 0.5208, 0.76631993, 0.93, 0)
|
||||
|
||||
[sub_resource type="Curve" id="Curve_lhhwu"]
|
||||
_data = [Vector2(0.002457004, 1), 0.0, -1.993977, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 2
|
||||
|
||||
[sub_resource type="Curve" id="Curve_4i73d"]
|
||||
_limits = [0.0, 1.5, 0.0, 1.0]
|
||||
_data = [Vector2(0, 0.6627359), 0.0, 1.7969435, 0, 0, Vector2(0.4987715, 1.0308962), -1.6188686, -1.6188686, 0, 0, Vector2(0.66093373, 1), -0.34929827, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_n3lqs")
|
||||
bbcode = "fancy_in"
|
||||
time = 0.4
|
||||
color_modulate = SubResource("Gradient_n3lqs")
|
||||
color_replace = SubResource("Gradient_lhhwu")
|
||||
scale_enabled = true
|
||||
scale_curve = SubResource("Curve_4i73d")
|
||||
scale_pivot = Vector2(0.5, 0)
|
||||
position_enabled = true
|
||||
position_x_curve = SubResource("Curve_lhhwu")
|
||||
test_value = -0.1
|
||||
metadata/_custom_type_script = "uid://wf7hpguw17ex"
|
||||
@@ -0,0 +1,35 @@
|
||||
[gd_resource type="RichTextEffect" script_class="DialogicRichTextTransitionEffect" load_steps=6 format=3 uid="uid://dnxkgwncm1pt5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://wf7hpguw17ex" path="res://addons/dialogic/Example Assets/bbcode_transitions/bbcode_transition_effect.gd" id="1_ur6c5"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_ur6c5"]
|
||||
offsets = PackedFloat32Array(0, 0.5089058)
|
||||
colors = PackedColorArray(1, 1, 1, 0, 1, 1, 1, 1)
|
||||
|
||||
[sub_resource type="Curve" id="Curve_5qe3f"]
|
||||
_limits = [-0.5, 0.51556605, 0.0, 1.0]
|
||||
_data = [Vector2(0, 0.0235914), 0.0, 0.0, 0, 0, Vector2(0.019656021, -0.2441923), 0.0, 0.0, 0, 0, Vector2(0.046683047, 0.17305207), 0.0, 0.0, 0, 0, Vector2(0.1081081, -0.23173726), 0.0, 0.0, 0, 0, Vector2(0.16216215, 0.12323183), 0.0, 0.0, 0, 0, Vector2(0.2997543, -0.16946197), 0.0, 0.0, 0, 0, Vector2(0.38329238, 0.042274), 0.0, 0.0, 0, 0, Vector2(0.46928746, -0.107186675), 0.0, 0.0, 0, 0, Vector2(0.5135135, 0.054729044), 0.0, 0.0, 0, 0, Vector2(0.66339064, -0.07604903), 0.0, 0.0, 0, 0, Vector2(0.86240786, 0.054729044), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 12
|
||||
|
||||
[sub_resource type="Curve" id="Curve_ur6c5"]
|
||||
_limits = [-0.5, 0.51556605, 0.0, 1.0]
|
||||
_data = [Vector2(0, 0.042274), 0.0, 0.0, 0, 0, Vector2(0.051597048, -0.13209677), 0.0, 0.0, 0, 0, Vector2(0.09336609, 0.21041724), 0.0, 0.0, 0, 0, Vector2(0.14742014, -0.25664735), 0.0, 0.0, 0, 0, Vector2(0.22850122, 0.098321736), 0.0, 0.0, 0, 0, Vector2(0.31203932, -0.107186675), 0.0, 0.0, 0, 0, Vector2(0.44717443, 0.054729044), 0.0, 0.0, 0, 0, Vector2(0.5995086, -0.08227658), 0.0, 0.0, 0, 0, Vector2(0.8132678, 0.042274), 0.0, 0.0, 0, 0, Vector2(1, 0), 0.0, 0.0, 0, 0]
|
||||
point_count = 10
|
||||
|
||||
[sub_resource type="Curve" id="Curve_qelc7"]
|
||||
_data = [Vector2(0, 0.57688683), 0.0, 0.0, 0, 0, Vector2(0.14250615, 0.77311325), 0.0, 0.0, 0, 0, Vector2(0.2850123, 0.6443397), 0.0, 0.0, 0, 0, Vector2(0.41769046, 0.7976416), 0.0, 0.0, 0, 0, Vector2(0.5503686, 0.74245286), 0.0, 0.0, 0, 0, Vector2(0.6781328, 0.8712265), 0.0, 0.0, 0, 0, Vector2(0.79606885, 0.8528303), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 8
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ur6c5")
|
||||
bbcode = "shaky_in"
|
||||
time = 0.4
|
||||
color_modulate = SubResource("Gradient_ur6c5")
|
||||
scale_enabled = true
|
||||
scale_curve = SubResource("Curve_qelc7")
|
||||
scale_pivot = Vector2(0.5, 0.5)
|
||||
position_enabled = true
|
||||
position_x_curve = SubResource("Curve_5qe3f")
|
||||
position_y_curve = SubResource("Curve_ur6c5")
|
||||
test_value = -0.1
|
||||
metadata/_custom_type_script = "uid://wf7hpguw17ex"
|
||||
51
addons/dialogic/Example Assets/default_event.gd
Normal file
51
addons/dialogic/Example Assets/default_event.gd
Normal file
@@ -0,0 +1,51 @@
|
||||
@tool
|
||||
extends DialogicEvent
|
||||
|
||||
# DEFINE ALL PROPERTIES OF THE EVENT
|
||||
# var MySetting: String = ""
|
||||
|
||||
func _execute() -> void:
|
||||
# I have no idea how this event works ;)
|
||||
finish()
|
||||
|
||||
|
||||
#region INITIALIZE
|
||||
################################################################################
|
||||
|
||||
# SET ALL VALUES THAT SHOULD NEVER CHANGE HERE
|
||||
func _init() -> void:
|
||||
event_name = "Default"
|
||||
event_color = Color("#ffffff")
|
||||
event_category = "Main"
|
||||
event_sorting_index = 0
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region SAVING/LOADING
|
||||
################################################################################
|
||||
func get_shortcode() -> String:
|
||||
return "default_shortcode"
|
||||
|
||||
|
||||
func get_shortcode_parameters() -> Dictionary:
|
||||
return {
|
||||
#param_name : property_name
|
||||
#"arg_name" : "NameOfProperty",
|
||||
}
|
||||
|
||||
# You can alternatively overwrite these 3 functions:
|
||||
# - to_text(),
|
||||
# - from_text(),
|
||||
# - is_valid_event()
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region EDITOR REPRESENTATION
|
||||
################################################################################
|
||||
|
||||
func build_event_editor() -> void:
|
||||
pass
|
||||
|
||||
#endregion
|
||||
1
addons/dialogic/Example Assets/default_event.gd.uid
Normal file
1
addons/dialogic/Example Assets/default_event.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://dgs7be3hh1crk
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.8 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bgn2ci6nu85t5"
|
||||
path="res://.godot/imported/next-indicator-dialogic-1.png-694f122eff55e969b54cc43e62eb4758.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/next-indicator/next-indicator-dialogic-1.png"
|
||||
dest_files=["res://.godot/imported/next-indicator-dialogic-1.png-694f122eff55e969b54cc43e62eb4758.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
addons/dialogic/Example Assets/next-indicator/next-indicator.png
Normal file
BIN
addons/dialogic/Example Assets/next-indicator/next-indicator.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
@@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://u0o8qgccs5df"
|
||||
path="res://.godot/imported/next-indicator.png-e3b7b80d9da791a1d0a061a728b6f781.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/next-indicator/next-indicator.png"
|
||||
dest_files=["res://.godot/imported/next-indicator.png-e3b7b80d9da791a1d0a061a728b6f781.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
4
addons/dialogic/Example Assets/sound-effects/LICENSE.txt
Normal file
4
addons/dialogic/Example Assets/sound-effects/LICENSE.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
Copyright (c) 2020 Tim Krief.
|
||||
|
||||
Typing sound effects by Tim Krief are licensed under a Creative
|
||||
Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) License.
|
||||
BIN
addons/dialogic/Example Assets/sound-effects/typing1.wav
Normal file
BIN
addons/dialogic/Example Assets/sound-effects/typing1.wav
Normal file
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://b6c1p14bc20p1"
|
||||
path="res://.godot/imported/typing1.wav-b241c6aab4ce82bf04caf8687873cae0.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/sound-effects/typing1.wav"
|
||||
dest_files=["res://.godot/imported/typing1.wav-b241c6aab4ce82bf04caf8687873cae0.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
BIN
addons/dialogic/Example Assets/sound-effects/typing2.wav
Normal file
BIN
addons/dialogic/Example Assets/sound-effects/typing2.wav
Normal file
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c3uw4nft0de13"
|
||||
path="res://.godot/imported/typing2.wav-64cf50045b34db7d5ef5da984070e0a7.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/sound-effects/typing2.wav"
|
||||
dest_files=["res://.godot/imported/typing2.wav-64cf50045b34db7d5ef5da984070e0a7.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
BIN
addons/dialogic/Example Assets/sound-effects/typing3.wav
Normal file
BIN
addons/dialogic/Example Assets/sound-effects/typing3.wav
Normal file
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dnboblpkf0fqi"
|
||||
path="res://.godot/imported/typing3.wav-083712282583242958aaa68128694f95.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/sound-effects/typing3.wav"
|
||||
dest_files=["res://.godot/imported/typing3.wav-083712282583242958aaa68128694f95.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
BIN
addons/dialogic/Example Assets/sound-effects/typing4.wav
Normal file
BIN
addons/dialogic/Example Assets/sound-effects/typing4.wav
Normal file
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://c2viukvbub6v6"
|
||||
path="res://.godot/imported/typing4.wav-4e7a00fb19b7dd0bdfd8e323401b6162.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/sound-effects/typing4.wav"
|
||||
dest_files=["res://.godot/imported/typing4.wav-4e7a00fb19b7dd0bdfd8e323401b6162.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
BIN
addons/dialogic/Example Assets/sound-effects/typing5.wav
Normal file
BIN
addons/dialogic/Example Assets/sound-effects/typing5.wav
Normal file
Binary file not shown.
@@ -0,0 +1,24 @@
|
||||
[remap]
|
||||
|
||||
importer="wav"
|
||||
type="AudioStreamWAV"
|
||||
uid="uid://dwcre3fjf3cj8"
|
||||
path="res://.godot/imported/typing5.wav-5315fa96c84bd3957d157e8c978c1f04.sample"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://addons/dialogic/Example Assets/sound-effects/typing5.wav"
|
||||
dest_files=["res://.godot/imported/typing5.wav-5315fa96c84bd3957d157e8c978c1f04.sample"]
|
||||
|
||||
[params]
|
||||
|
||||
force/8_bit=false
|
||||
force/mono=false
|
||||
force/max_rate=false
|
||||
force/max_rate_hz=44100
|
||||
edit/trim=false
|
||||
edit/normalize=false
|
||||
edit/loop_mode=0
|
||||
edit/loop_begin=0
|
||||
edit/loop_end=-1
|
||||
compress/mode=0
|
||||
Reference in New Issue
Block a user