Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / tileSetEditorSegment / TileSetEditorSegmentPanel.cs
@小李xl 小李xl on 13 Dec 2023 722 bytes 制作图块Ui, 制作绘制网格
using Godot;
using UI.TileSetEditor;

namespace UI.TileSetEditorSegment;

public partial class TileSetEditorSegmentPanel : TileSetEditorSegment
{
    /// <summary>
    /// 父Ui
    /// </summary>
    public TileSetEditorPanel EditorPanel;
    
    public override void OnCreateUi()
    {
        EditorPanel = (TileSetEditorPanel)ParentUi;
    }

    public override void OnShowUi()
    {
        if (EditorPanel.Texture == null)
        {
            EditorWindowManager.ShowTips("警告", "请先导入纹理!", () =>
            {
                EditorPanel.TabGrid.SelectIndex = 0;
            });
        }

        S_LeftBg.Instance.OnShow();
    }

    public override void OnDestroyUi()
    {
        
    }
}