Skip to content

Commit 8fa0ac6

Browse files
committed
Removing old default_speaker option
1 parent e970edf commit 8fa0ac6

File tree

3 files changed

+8
-42
lines changed

3 files changed

+8
-42
lines changed

addons/dialogic/Editor/CharacterEditor/CharacterEditor.gd

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ onready var nodes = {
1212
'file': $HBoxContainer/Container/FileName/LineEdit,
1313
'color': $HBoxContainer/Container/Color/ColorPickerButton,
1414
'mirror_portraits_checkbox' : $HBoxContainer/VBoxContainer/HBoxContainer/MirrorOption/MirrorPortraitsCheckBox,
15-
'default_speaker': $HBoxContainer/Container/Actions/DefaultSpeaker,
1615
'display_name_checkbox': $HBoxContainer/Container/Name/CheckBox,
1716
'display_name': $HBoxContainer/Container/DisplayName/LineEdit,
1817
'nickname_checkbox': $HBoxContainer/Container/Name/CheckBox2,
@@ -72,7 +71,6 @@ func clear_character_editor():
7271
nodes['description'].text = ''
7372
nodes['color'].color = Color('#ffffff')
7473
nodes['mirror_portraits_checkbox'].pressed = false
75-
nodes['default_speaker'].pressed = false
7674
nodes['display_name_checkbox'].pressed = false
7775
nodes['nickname_checkbox'].pressed = false
7876
nodes['display_name'].text = ''
@@ -94,7 +92,6 @@ func create_character():
9492
var character = {
9593
'color': '#ffffff',
9694
'id': character_file,
97-
'default_speaker': false,
9895
'portraits': [],
9996
'mirror_portraits' :false
10097
}
@@ -105,7 +102,6 @@ func create_character():
105102

106103
# Saving and Loading
107104
func generate_character_data_to_save():
108-
var default_speaker: bool = nodes['default_speaker'].pressed
109105
var portraits = []
110106
for p in $HBoxContainer/Container/ScrollContainer/VBoxContainer/PortraitList.get_children():
111107
var entry = {}
@@ -117,7 +113,6 @@ func generate_character_data_to_save():
117113
'description': nodes['description'].text,
118114
'color': '#' + nodes['color'].color.to_html(),
119115
'mirror_portraits': nodes["mirror_portraits_checkbox"].pressed,
120-
'default_speaker': default_speaker,
121116
'portraits': portraits,
122117
'display_name_bool': nodes['display_name_checkbox'].pressed,
123118
'display_name': nodes['display_name'].text,
@@ -147,16 +142,12 @@ func load_character(filename: String):
147142
var data = DialogicResources.get_character_json(filename)
148143
opened_character_data = data
149144
nodes['file'].text = data['id']
150-
nodes['default_speaker'].pressed = false
151145
if data.has('name'):
152146
nodes['name'].text = data['name']
153147
if data.has('description'):
154148
nodes['description'].text = data['description']
155149
if data.has('color'):
156150
nodes['color'].color = Color(data['color'])
157-
if data.has('default_speaker'):
158-
if data['default_speaker']:
159-
nodes['default_speaker'].pressed = true
160151

161152
if data.has('display_name_bool'):
162153
nodes['display_name_checkbox'].pressed = data['display_name_bool']

addons/dialogic/Editor/CharacterEditor/CharacterEditor.tscn

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ content_margin_left = 5.0
88
content_margin_right = 5.0
99
content_margin_top = 5.0
1010
content_margin_bottom = 5.0
11-
bg_color = Color( 0.2, 0.23, 0.31, 1 )
11+
bg_color = Color( 0, 0, 0, 1 )
1212

13-
[sub_resource type="Image" id=3]
13+
[sub_resource type="Image" id=4]
1414
data = {
1515
"data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ),
1616
"format": "LumAlpha8",
@@ -19,10 +19,10 @@ data = {
1919
"width": 16
2020
}
2121

22-
[sub_resource type="ImageTexture" id=2]
22+
[sub_resource type="ImageTexture" id=3]
2323
flags = 4
2424
flags = 4
25-
image = SubResource( 3 )
25+
image = SubResource( 4 )
2626
size = Vector2( 16, 16 )
2727

2828
[node name="CharacterEditor" type="ScrollContainer"]
@@ -208,13 +208,13 @@ text = "Path"
208208
[node name="ScrollContainer" type="ScrollContainer" parent="HBoxContainer/Container"]
209209
margin_top = 206.0
210210
margin_right = 600.0
211-
margin_bottom = 611.0
211+
margin_bottom = 639.0
212212
size_flags_horizontal = 3
213213
size_flags_vertical = 3
214214

215215
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer/Container/ScrollContainer"]
216216
margin_right = 600.0
217-
margin_bottom = 405.0
217+
margin_bottom = 433.0
218218
size_flags_horizontal = 3
219219
size_flags_vertical = 3
220220

@@ -235,14 +235,14 @@ margin_bottom = 50.0
235235
margin_right = 144.0
236236
margin_bottom = 22.0
237237
text = " Add new portrait"
238-
icon = SubResource( 2 )
238+
icon = SubResource( 3 )
239239

240240
[node name="ImportFromFolder" type="Button" parent="HBoxContainer/Container/ScrollContainer/VBoxContainer/HBoxContainer"]
241241
margin_left = 148.0
242242
margin_right = 355.0
243243
margin_bottom = 22.0
244244
text = " Import images from folder"
245-
icon = SubResource( 2 )
245+
icon = SubResource( 3 )
246246

247247
[node name="FileName" type="HBoxContainer" parent="HBoxContainer/Container"]
248248
visible = false
@@ -266,27 +266,6 @@ focus_mode = 0
266266
size_flags_horizontal = 3
267267
editable = false
268268

269-
[node name="Actions" type="HBoxContainer" parent="HBoxContainer/Container"]
270-
margin_top = 615.0
271-
margin_right = 600.0
272-
margin_bottom = 639.0
273-
274-
[node name="DefaultSpeaker" type="CheckBox" parent="HBoxContainer/Container/Actions"]
275-
margin_right = 128.0
276-
margin_bottom = 24.0
277-
hint_tooltip = "By selecting \"Default Speaker\" all the new
278-
Text Events created will automatically
279-
select this character by default.
280-
You can only have 1 Default Speaker
281-
per project."
282-
text = "Default Speaker"
283-
284-
[node name="Control" type="Control" parent="HBoxContainer/Container/Actions"]
285-
margin_left = 132.0
286-
margin_right = 600.0
287-
margin_bottom = 24.0
288-
size_flags_horizontal = 3
289-
290269
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
291270
margin_left = 604.0
292271
margin_right = 1127.0

addons/dialogic/Other/DialogicUtil.gd

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ static func get_character_list() -> Array:
2121
var data: Dictionary = DialogicResources.get_character_json(file)
2222
var color: Color = Color("#ffffff")
2323
var c_name: String = data['id']
24-
var default_speaker = false
2524
var portraits: Array = []
2625
var display_name: String = ''
2726
var nickname: String = ''
@@ -30,8 +29,6 @@ static func get_character_list() -> Array:
3029
color = Color(data['color'])
3130
if data.has('name'):
3231
c_name = data['name']
33-
if data.has('default_speaker'):
34-
default_speaker = data['default_speaker']
3532
if data.has('portraits'):
3633
portraits = data['portraits']
3734
if data.has('display_name'):
@@ -47,7 +44,6 @@ static func get_character_list() -> Array:
4744
'name': c_name,
4845
'color': color,
4946
'file': file,
50-
'default_speaker' : default_speaker,
5147
'portraits': portraits,
5248
'display_name': display_name,
5349
'nickname': nickname,

0 commit comments

Comments
 (0)