Uploaded game files
This commit is contained in:
parent
459da513f6
commit
f71e7e39a0
1543 changed files with 50503 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/backgrounds/background-2.png" type="Texture" id=1]
|
||||
|
||||
[node name="DefaultBackground" type="Panel"]
|
||||
self_modulate = Color( 1, 1, 1, 0 )
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
mouse_filter = 2
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
texture = ExtResource( 1 )
|
||||
expand = true
|
||||
stretch_mode = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
[gd_resource type="Theme" load_steps=7 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/backgrounds/background-2.png" type="Texture" id=1]
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/Fonts/Overlock/Overlock-Black.ttf" type="DynamicFontData" id=2]
|
||||
|
||||
[sub_resource type="DynamicFont" id=5]
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id=4]
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 1175, 263 )
|
||||
margin_left = 5.0
|
||||
margin_right = 5.0
|
||||
margin_top = 5.0
|
||||
margin_bottom = 5.0
|
||||
modulate_color = Color( 1, 1, 1, 0.572549 )
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id=1]
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 1175, 263 )
|
||||
margin_left = 5.0
|
||||
margin_right = 5.0
|
||||
margin_top = 5.0
|
||||
margin_bottom = 5.0
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id=3]
|
||||
texture = ExtResource( 1 )
|
||||
region_rect = Rect2( 0, 0, 1175, 263 )
|
||||
margin_left = 5.0
|
||||
margin_right = 5.0
|
||||
margin_top = 5.0
|
||||
margin_bottom = 5.0
|
||||
modulate_color = Color( 0.113725, 0.105882, 0.105882, 0.764706 )
|
||||
|
||||
[resource]
|
||||
Button/colors/font_color = Color( 1, 1, 1, 1 )
|
||||
Button/fonts/font = SubResource( 5 )
|
||||
Button/styles/hover = SubResource( 4 )
|
||||
Button/styles/normal = SubResource( 1 )
|
||||
Button/styles/pressed = SubResource( 3 )
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/History/HistoryButton-theme.tres" type="Theme" id=1]
|
||||
|
||||
[node name="HistoryButton" type="Button"]
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = -20.0
|
||||
margin_right = 58.0
|
||||
theme = ExtResource( 1 )
|
||||
disabled = true
|
||||
text = "History"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
[gd_scene load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/History/HistoryButton-theme.tres" type="Theme" id=1]
|
||||
|
||||
[node name="HistoryButton" type="Button"]
|
||||
anchor_top = 1.0
|
||||
anchor_bottom = 1.0
|
||||
margin_top = -20.0
|
||||
margin_right = 58.0
|
||||
theme = ExtResource( 1 )
|
||||
disabled = true
|
||||
text = "Return"
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
96
project/addons/dialogic/Example Assets/History/HistoryRow.gd
Normal file
96
project/addons/dialogic/Example Assets/History/HistoryRow.gd
Normal file
|
@ -0,0 +1,96 @@
|
|||
tool
|
||||
extends PanelContainer
|
||||
|
||||
export(NodePath) var Audio_Button_Path = @"HBoxContainer/PlayAudioButton"
|
||||
export(NodePath) var Text_Label_Path = @"HBoxContainer/RichTextLabel"
|
||||
|
||||
var audioPath = ''
|
||||
var AudioButton
|
||||
var TextLabel
|
||||
onready var TextContainer = $HBoxContainer
|
||||
onready var ColorRectElement = $ColorRect
|
||||
onready var TextureRectElement = $TextureRect
|
||||
|
||||
"""
|
||||
Example of a HistoryRow. Every time dialog is logged, a new row is created.
|
||||
You can extend this class to customize the logging experience as you see fit.
|
||||
|
||||
This class can be edited or replaced as long as add_history is implemented
|
||||
"""
|
||||
|
||||
class_name HistoryRow
|
||||
|
||||
func _ready():
|
||||
TextLabel = get_node(Text_Label_Path)
|
||||
AudioButton = get_node(Audio_Button_Path)
|
||||
|
||||
assert(TextLabel is RichTextLabel, 'Text_Label must be a rich text label.')
|
||||
assert(AudioButton is Button, 'Audio_Button must be a button.')
|
||||
|
||||
|
||||
func add_history(historyString, newAudio=''):
|
||||
TextLabel.append_bbcode(historyString)
|
||||
audioPath = newAudio
|
||||
if newAudio != '':
|
||||
AudioButton.disabled = false
|
||||
AudioButton.icon = load("res://addons/dialogic/Images/Event Icons/Main Icons/audio-event.svg")
|
||||
AudioButton.flat = false
|
||||
else:
|
||||
AudioButton.disabled = true
|
||||
#AudioButton.icon = load("res://addons/dialogic/Images/Event Icons/Main Icons/text-event.svg")
|
||||
AudioButton.focus_mode = FOCUS_NONE
|
||||
|
||||
|
||||
# Load Theme is called by
|
||||
func load_theme(theme: ConfigFile):
|
||||
# Text
|
||||
var theme_font = DialogicUtil.path_fixer_load(theme.get_value('text', 'font', 'res://addons/dialogic/Example Assets/Fonts/DefaultFont.tres'))
|
||||
TextLabel.set('custom_fonts/normal_font', theme_font)
|
||||
TextLabel.set('custom_fonts/bold_font', DialogicUtil.path_fixer_load(theme.get_value('text', 'bold_font', 'res://addons/dialogic/Example Assets/Fonts/DefaultBoldFont.tres')))
|
||||
TextLabel.set('custom_fonts/italics_font', DialogicUtil.path_fixer_load(theme.get_value('text', 'italic_font', 'res://addons/dialogic/Example Assets/Fonts/DefaultItalicFont.tres')))
|
||||
#name_label.set('custom_fonts/font', DialogicUtil.path_fixer_load(theme.get_value('name', 'font', 'res://addons/dialogic/Example Assets/Fonts/NameFont.tres')))
|
||||
|
||||
# setting the vertical alignment
|
||||
var alignment = theme.get_value('text', 'alignment',0)
|
||||
if alignment <= 2: # top
|
||||
TextContainer.alignment = BoxContainer.ALIGN_BEGIN
|
||||
elif alignment <= 5: # center
|
||||
TextContainer.alignment = BoxContainer.ALIGN_CENTER
|
||||
elif alignment <= 8: # bottom
|
||||
TextContainer.alignment = BoxContainer.ALIGN_END
|
||||
|
||||
var text_color = Color(theme.get_value('text', 'color', '#ffffffff'))
|
||||
TextLabel.set('custom_colors/default_color', text_color)
|
||||
#name_label.set('custom_colors/font_color', text_color)
|
||||
|
||||
TextLabel.set('custom_colors/font_color_shadow', Color('#00ffffff'))
|
||||
#name_label.set('custom_colors/font_color_shadow', Color('#00ffffff'))
|
||||
|
||||
if theme.get_value('text', 'shadow', false):
|
||||
var text_shadow_color = Color(theme.get_value('text', 'shadow_color', '#9e000000'))
|
||||
TextLabel.set('custom_colors/font_color_shadow', text_shadow_color)
|
||||
|
||||
var shadow_offset = theme.get_value('text', 'shadow_offset', Vector2(2,2))
|
||||
TextLabel.set('custom_constants/shadow_offset_x', shadow_offset.x)
|
||||
TextLabel.set('custom_constants/shadow_offset_y', shadow_offset.y)
|
||||
|
||||
# Margin
|
||||
var text_margin = theme.get_value('text', 'margin', Vector2(20, 10))
|
||||
TextContainer.set('margin_left', text_margin.x)
|
||||
TextContainer.set('margin_right', text_margin.x * -1)
|
||||
TextContainer.set('margin_top', text_margin.y)
|
||||
TextContainer.set('margin_bottom', text_margin.y * -1)
|
||||
|
||||
# Backgrounds
|
||||
TextureRectElement.texture = DialogicUtil.path_fixer_load(theme.get_value('background','image', "res://addons/dialogic/Example Assets/backgrounds/background-2.png"))
|
||||
ColorRectElement.color = Color(theme.get_value('background','color', "#ff000000"))
|
||||
|
||||
if theme.get_value('background', 'modulation', false):
|
||||
TextureRectElement.modulate = Color(theme.get_value('background', 'modulation_color', '#ffffffff'))
|
||||
else:
|
||||
TextureRectElement.modulate = Color('#ffffffff')
|
||||
|
||||
ColorRectElement.visible = theme.get_value('background', 'use_color', false)
|
||||
TextureRectElement.visible = theme.get_value('background', 'use_image', true)
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
[gd_scene load_steps=3 format=2]
|
||||
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/History/HistoryRow.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/dialogic/Example Assets/backgrounds/background-2.png" type="Texture" id=2]
|
||||
|
||||
[node name="HistoryRow" type="PanelContainer"]
|
||||
self_modulate = Color( 1, 1, 1, 0 )
|
||||
rect_min_size = Vector2( 0, 28 )
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 0
|
||||
script = ExtResource( 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
visible = false
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 51.0
|
||||
margin_bottom = 43.0
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 51.0
|
||||
margin_bottom = 43.0
|
||||
texture = ExtResource( 2 )
|
||||
expand = true
|
||||
stretch_mode = 1
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_left = 7.0
|
||||
margin_top = 7.0
|
||||
margin_right = 51.0
|
||||
margin_bottom = 43.0
|
||||
size_flags_horizontal = 11
|
||||
size_flags_vertical = 3
|
||||
custom_constants/separation = 8
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="PlayAudioButton" type="Button" parent="HBoxContainer"]
|
||||
margin_right = 36.0
|
||||
margin_bottom = 36.0
|
||||
rect_min_size = Vector2( 36, 36 )
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
flat = true
|
||||
expand_icon = true
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="RichTextLabel" type="RichTextLabel" parent="HBoxContainer"]
|
||||
margin_left = 44.0
|
||||
margin_right = 44.0
|
||||
margin_bottom = 36.0
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
bbcode_enabled = true
|
||||
meta_underlined = false
|
||||
fit_content_height = true
|
||||
scroll_active = false
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue