diff --git a/locals/UI.csv b/locals/UI.csv index 8bee363..f955582 100644 --- a/locals/UI.csv +++ b/locals/UI.csv @@ -19,11 +19,12 @@ name,名称,Name,めいしょう describe,描述,Describe,ないよう creation,创建,Creation,創建 default_room_name,房间{0},Room{0},部屋{0}です -room_template_collection_prompt,房间模板集(每一行被认为是一条房间模板地址。),Room template set (Each row is considered to be one room template address.),お部屋テンプレートセット(各行がお部屋テンプレートアドレスとされています。) -error_specifying_room_template_line,位于{0}错误,文件不存在。,"Located at {0} error, file does not exist.",{0}エラーに位置し、ファイルは存在しません。 +room_template_collection_prompt,房间模板集(传入路径为文件夹,将选择文件夹内的所有子文件),"Room template set (incoming path is folder, all subfiles in folder will be selected)",部屋テンプレートセット(着信経路をフォルダにして、フォルダ内のすべてのサブファイルを選択します。) +error_specifying_room_template_line,位于{0}错误,文件或文件夹不存在。,"Located at {0} error, file or folder does not exist.",{0}エラーに位置し、ファイルやフォルダが存在しません。 line_errors_must_start_with_res,位于{0}错误,必须以res://开头。,"Located at {0} error, must start with res://.",{0}エラーに位置し、res://で始めなければなりません。 open_the_export_directory,打开导出目录,Open the export directory,エクスポートディレクトリを開きます save,保存,Save,保留 filename,文件名,File name,ファイル名 cancel,取消,Cancel,キャンセル -load,加载,Load,ろーど \ No newline at end of file +load,加载,Load,ろーど +delete_selected_node,删除选中的节点,Delete selected node,選択されたノードを削除します \ No newline at end of file diff --git a/locals/UI.en.translation b/locals/UI.en.translation index aed4396..70adeb1 100644 Binary files a/locals/UI.en.translation and b/locals/UI.en.translation differ diff --git a/locals/UI.jp.translation b/locals/UI.jp.translation index 9b74fe8..44b20fa 100644 Binary files a/locals/UI.jp.translation and b/locals/UI.jp.translation differ diff --git a/locals/UI.zh.translation b/locals/UI.zh.translation index 9774ac0..049cfd9 100644 Binary files a/locals/UI.zh.translation and b/locals/UI.zh.translation differ diff --git a/project.godot b/project.godot index 93617b2..eecff5d 100644 --- a/project.godot +++ b/project.godot @@ -147,7 +147,6 @@ hotbar_previous={ [internationalization] locale/translations=PackedStringArray("res://locals/UI.en.translation", "res://locals/UI.zh.translation", "res://locals/Error.zh.translation", "res://locals/Error.en.translation", "res://locals/slogan.en.translation", "res://locals/slogan.zh.translation", "res://locals/Log.en.translation", "res://locals/Log.zh.translation", "res://locals/Weapon.en.translation", "res://locals/Weapon.zh.translation", "res://locals/InputMapping.en.translation", "res://locals/InputMapping.zh.translation", "res://locals/Error.jp.translation", "res://locals/InputMapping.jp.translation", "res://locals/Log.jp.translation", "res://locals/slogan.jp.translation", "res://locals/UI.jp.translation", "res://locals/Weapon.jp.translation") -locale/test="jp" [layer_names] diff --git a/scenes/LevelGraphEditor.tscn b/scenes/LevelGraphEditor.tscn index 764c724..ec13035 100644 --- a/scenes/LevelGraphEditor.tscn +++ b/scenes/LevelGraphEditor.tscn @@ -35,7 +35,6 @@ offset_bottom = 32.0 text = "level_graph_editor" [node name="CreateOrEditorPanel" type="Panel" parent="."] -visible = false layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -152,6 +151,10 @@ offset_right = -15.0 offset_bottom = 47.0 grow_horizontal = 0 +[node name="DeleteSelectedNodeButton" type="Button" parent="HBoxContainer"] +layout_mode = 2 +text = "delete_selected_node" + [node name="OpenExportFolderButton" type="Button" parent="HBoxContainer"] layout_mode = 2 text = "open_the_export_directory" diff --git a/scripts/Config.cs b/scripts/Config.cs index 81fac7f..70d77dc 100644 --- a/scripts/Config.cs +++ b/scripts/Config.cs @@ -80,6 +80,12 @@ public static class Config /// public const int MaxStackQuantity = 99; + /// + /// Text change buffering Time How long does it take to execute the actual event after an event with a text change listener is triggered? (Anti-shake processing time), unit: milliseconds + /// 当添加了文本改变监听器的事件被触发后,多长时间后执行实际事件?(防抖处理时长),单位:毫秒 + /// + public const long TextChangesBuffetingDuration = 300; + /// /// Operation prompts, function key text color /// 操作提示内,功能键文本颜色 diff --git a/scripts/levelGraphEditor/RoomNodeData.cs b/scripts/levelGraphEditor/RoomNodeData.cs index 0b92f0f..bc647f4 100644 --- a/scripts/levelGraphEditor/RoomNodeData.cs +++ b/scripts/levelGraphEditor/RoomNodeData.cs @@ -5,4 +5,6 @@ public class RoomNodeData public string? Id { get; set; } public string? Title { get; set; } public string? Description { get; set; } + + public string[]? RoomTemplateSet { get; set; } } \ No newline at end of file diff --git a/scripts/loader/uiLoader/LevelGraphEditorLoader.cs b/scripts/loader/uiLoader/LevelGraphEditorLoader.cs index 4dc8992..a333382 100644 --- a/scripts/loader/uiLoader/LevelGraphEditorLoader.cs +++ b/scripts/loader/uiLoader/LevelGraphEditorLoader.cs @@ -1,5 +1,7 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; using System.IO; +using ColdMint.scripts.debug; using ColdMint.scripts.levelGraphEditor; using ColdMint.scripts.serialization; using ColdMint.scripts.utils; @@ -49,6 +51,14 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate private Label? _saveOrLoadPanelTitleLabel; private LineEdit? _fileNameLineEdit; private Button? _showLoadPanelButton; + private Button? _deleteSelectedNodeButton; + private readonly List _selectedNodes = new List(); + + /// + /// Displays the time to enter the suggestion + /// 显示输入建议的时刻 + /// + private DateTime? _displaysTheSuggestedInputTime; /// /// Offset to append when a new node is created. @@ -103,6 +113,7 @@ public partial class LevelGraphEditorLoader : UiLoaderTemplate _showSavePanelButton = GetNode