Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / mapEditorProject / RoomButtonCell.cs
@小李xl 小李xl on 10 Aug 2023 584 bytes 创建房间标记, 开发中
using Godot;

namespace UI.MapEditorProject;

public class RoomButtonCell : UiCell<MapEditorProject.RoomButton, DungeonRoomSplit>
{
    public override void OnSetData(DungeonRoomSplit data)
    {
        CellNode.L_RoomName.Instance.Text = data.RoomInfo.RoomName;
        CellNode.L_RoomType.Instance.Text = DungeonManager.DungeonRoomTypeToDescribeString(data.RoomInfo.RoomType);
        CellNode.Instance.TooltipText = "路径: " + data.RoomPath;
    }

    public override void OnDoubleClick()
    {
        //打开房间编辑器
        CellNode.UiPanel.SelectRoom(Data);
    }
}