using System.Collections.Generic;
using System.Text.Json;
using ColdMint.scripts.debug;
using ColdMint.scripts.levelGraphEditor;
using ColdMint.scripts.serialization;
using ColdMint.scripts.utils;
using Godot;
using Godot.Collections;
namespace ColdMint.scripts.loader.uiLoader;
///
/// Level graph editor
/// 关卡图编辑器
///
public partial class LevelGraphEditorLoader : UiLoaderTemplate
{
private GraphEdit? _graphEdit;
///
/// Button to display the room creation panel.
/// 用于展示房间创建面板的按钮。
///
private Button? _showCreateRoomPanelButton;
private PackedScene? _roomNodeScene;
private Panel? _createOrEditorPanel;
private Button? _hideCreateRoomPanelButton;
private LineEdit? _roomNameLineEdit;
private LineEdit? _roomDescriptionLineEdit;
private Button? _createRoomButton;
private Button? _returnButton;
private string? _defaultRoomName;
private int _roomIndex = 1;
private TextEdit? _roomTemplateCollectionTextEdit;
private Label? _roomTemplateTipsLabel;
private Button? _displayCurrentPageData;
public override void InitializeData()
{
base.InitializeData();
_roomNodeScene = (PackedScene)GD.Load("res://prefab/ui/RoomNode.tscn");
_defaultRoomName = TranslationServer.Translate("default_room_name");
}
public override void InitializeUi()
{
base.InitializeUi();
_roomTemplateTipsLabel = GetNode