Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / mapEditorProject / GroupButtonCell.cs
@小李xl 小李xl on 2 Sep 2023 899 bytes 删除房间功能
using Godot;

namespace UI.MapEditorProject;

public class GroupButtonCell : UiCell<MapEditorProject.GroupButton, DungeonRoomGroup>
{
    public override void OnInit()
    {
        CellNode.L_SelectTexture.Instance.Visible = false;
    }

    public override void OnSetData(DungeonRoomGroup info)
    {
        CellNode.Instance.Text = info.GroupName;
        CellNode.Instance.TooltipText = "路径: " + MapProjectManager.CustomMapPath + "/" + info.GroupName;
    }

    public override void OnRefreshIndex()
    {
        GD.Print("刷新索引: " + Index);
    }

    //选中工程
    public override void OnClick()
    {
        CellNode.UiPanel.SelectGroup(Data);
    }

    public override void OnSelect()
    {
        CellNode.L_SelectTexture.Instance.Visible = true;
    }

    public override void OnUnSelect()
    {
        CellNode.L_SelectTexture.Instance.Visible = false;
    }
}