Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / tileSetEditorSegment / TileSetEditorSegmentPanel.cs
  1. using Godot;
  2. using UI.TileSetEditor;
  3.  
  4. namespace UI.TileSetEditorSegment;
  5.  
  6. public partial class TileSetEditorSegmentPanel : TileSetEditorSegment
  7. {
  8.  
  9. private TileSetEditorPanel _editorPanel;
  10. public override void OnCreateUi()
  11. {
  12. _editorPanel = (TileSetEditorPanel)ParentUi;
  13. }
  14.  
  15. public override void OnShowUi()
  16. {
  17. if (_editorPanel.Texture == null)
  18. {
  19. EditorWindowManager.ShowTips("警告", "请先导入纹理!", () =>
  20. {
  21. _editorPanel.TabGrid.SelectIndex = 0;
  22. });
  23. }
  24.  
  25. S_LeftBg.Instance.Color = _editorPanel.BgColor;
  26. }
  27.  
  28. public override void OnDestroyUi()
  29. {
  30. }
  31.  
  32. }