Skip to content

Commit 1d3c405

Browse files
committed
improving renaming UX
1 parent d04c725 commit 1d3c405

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@ Yes, you can use Dialogic to make any kind of game (even commercial ones). The p
3434
- Disabled unfinished events
3535
- The Change Timeline event tells you your current timeline (this is for going back to the start)
3636
- New `Close Dialog` event. This event closes the dialog whenever it is called.
37+
- When renaming a dialog the popup's text field is already selected and focused.
3738
- In game dialog:
39+
- You can now select the current timeline from the inspector without manually copying the timeline id.
3840
- Change timeline event is now working
3941
- Audio event can play sounds
4042
- Character join (left, center and right) working

addons/dialogic/Editor/EditorView.tscn

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[gd_scene load_steps=32 format=2]
1+
[gd_scene load_steps=33 format=2]
22

33
[ext_resource path="res://addons/dialogic/Editor/editor_view.gd" type="Script" id=1]
44
[ext_resource path="res://addons/dialogic/Images/dialog.svg" type="Texture" id=2]
@@ -28,6 +28,7 @@
2828
[ext_resource path="res://addons/dialogic/Images/Filesystem.svg" type="Texture" id=26]
2929
[ext_resource path="res://addons/dialogic/Images/question.svg" type="Texture" id=27]
3030
[ext_resource path="res://addons/dialogic/Editor/EditorTheme.gd" type="Script" id=28]
31+
[ext_resource path="res://addons/dialogic/Images/character.svg" type="Texture" id=29]
3132

3233
[sub_resource type="StyleBoxFlat" id=1]
3334
content_margin_left = 5.0
@@ -228,11 +229,10 @@ margin_right = 180.0
228229
margin_bottom = 541.0
229230
size_flags_horizontal = 3
230231
size_flags_vertical = 3
231-
items = [ "timeline-1610448960", ExtResource( 15 ), false ]
232+
items = [ "234234", ExtResource( 15 ), false, "I want to select this one", ExtResource( 15 ), false, "Intro", ExtResource( 15 ), false, "Nice :)", ExtResource( 15 ), false, "alternative timeline", ExtResource( 15 ), false ]
232233
allow_rmb_select = true
233234

234235
[node name="CenterContainer" type="CenterContainer" parent="EditorTimeline"]
235-
visible = false
236236
margin_left = 192.0
237237
margin_right = 997.0
238238
margin_bottom = 541.0
@@ -263,6 +263,7 @@ __meta__ = {
263263
}
264264

265265
[node name="TimelineEditor" type="HSplitContainer" parent="EditorTimeline"]
266+
visible = false
266267
margin_left = 192.0
267268
margin_right = 997.0
268269
margin_bottom = 541.0
@@ -481,9 +482,11 @@ margin_right = 180.0
481482
margin_bottom = 541.0
482483
size_flags_horizontal = 3
483484
size_flags_vertical = 3
485+
items = [ "Narrator", ExtResource( 29 ), false, "Shia", ExtResource( 29 ), false, "Lyra", ExtResource( 29 ), false ]
484486
allow_rmb_select = true
485487

486488
[node name="NoCharacters" type="CenterContainer" parent="EditorCharacter"]
489+
visible = false
487490
margin_left = 192.0
488491
margin_right = 997.0
489492
margin_bottom = 541.0
@@ -512,7 +515,6 @@ margin_bottom = 20.0
512515
text = "Create a character +"
513516

514517
[node name="CharacterEditor" type="ScrollContainer" parent="EditorCharacter"]
515-
visible = false
516518
margin_left = 192.0
517519
margin_right = 997.0
518520
margin_bottom = 541.0
@@ -1311,7 +1313,6 @@ margin_bottom = 52.7127
13111313
__meta__ = {
13121314
"_edit_use_anchors_": false
13131315
}
1314-
13151316
[connection signal="pressed" from="HBoxContainer/EventButton" to="." method="_on_EventButton_pressed"]
13161317
[connection signal="pressed" from="HBoxContainer/CharactersButton" to="." method="_on_CharactersButton_pressed"]
13171318
[connection signal="pressed" from="HBoxContainer/GlossaryButton" to="." method="_on_CharactersButton_pressed"]

addons/dialogic/Editor/editor_view.gd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,8 @@ func popup_rename():
297297
$RenameDialog/LineEdit.text = timeline_name
298298
$RenameDialog.set_as_minsize()
299299
$RenameDialog.popup_centered()
300+
$RenameDialog/LineEdit.grab_focus()
301+
$RenameDialog/LineEdit.select_all()
300302

301303

302304
func _on_RenameDialog_confirmed():

0 commit comments

Comments
 (0)