Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / tileSetEditor / TileSetEditorTabCell.cs
  1. namespace UI.TileSetEditor;
  2.  
  3. public class TileSetEditorTabCell : UiCell<TileSetEditor.Tab, TileSetEditorTabData>
  4. {
  5. private UiBase _uiInstance;
  6.  
  7. public override void OnInit()
  8. {
  9. CellNode.L_Select.Instance.Visible = false;
  10. }
  11.  
  12. public override void OnSetData(TileSetEditorTabData data)
  13. {
  14. CellNode.Instance.Text = data.Text;
  15. _uiInstance = CellNode.UiPanel.S_RightRoot.OpenNestedUi(data.UiName);
  16. _uiInstance.HideUi();
  17. }
  18.  
  19. public override void OnSelect()
  20. {
  21. CellNode.L_Select.Instance.Visible = true;
  22. _uiInstance.ShowUi();
  23. }
  24.  
  25. public override void OnUnSelect()
  26. {
  27. CellNode.L_Select.Instance.Visible = false;
  28. _uiInstance.HideUi();
  29. }
  30. }