Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / mapEditorProject / MapEditorProjectPanel.cs
@lijincheng lijincheng on 18 Jul 2023 1 KB 地牢房间管理器, 开发中
using Godot;

namespace UI.MapEditorProject;

public partial class MapEditorProjectPanel : MapEditorProject
{

    private UiGrid<GroupButton, string> _groupGrid;
    private UiGrid<RoomButton, string> _roomGrid;

    public override void OnCreateUi()
    {
        _groupGrid = new UiGrid<GroupButton, string>(S_GroupButton, typeof(GroupButtonCell), 1, 0, 2);
        _groupGrid.SetHorizontalExpand(true);
        _groupGrid.SetDataList(new []{ "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5" });

        _roomGrid = new UiGrid<RoomButton, string>(S_RoomButton, typeof(RoomButtonCell), 5, 5, 5);
        _roomGrid.SetHorizontalExpand(true);
        _roomGrid.SetDataList(new []{ "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5", "1", "2", "3", "4", "5" });
    }

    public override void OnShowUi()
    {
        
    }

    public override void OnHideUi()
    {
        
    }

    public override void OnDisposeUi()
    {
        _groupGrid.Destroy();
        _groupGrid = null;
        
        _roomGrid.Destroy();
        _roomGrid = null;
    }
}