Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / mapEditorProject / GroupButtonCell.cs
  1. using Godot;
  2.  
  3. namespace UI.MapEditorProject;
  4.  
  5. public class GroupButtonCell : UiCell<MapEditorProject.GroupButton, DungeonRoomGroup>
  6. {
  7. public override void OnInit()
  8. {
  9. CellNode.L_SelectTexture.Instance.Visible = false;
  10. }
  11.  
  12. public override void OnSetData(DungeonRoomGroup info)
  13. {
  14. CellNode.Instance.Text = info.GroupName;
  15. CellNode.Instance.TooltipText = "路径: " + MapProjectManager.CustomMapPath + info.GroupName;
  16. }
  17.  
  18. public override void OnRefreshIndex()
  19. {
  20. Debug.Log("刷新索引: " + Index);
  21. }
  22.  
  23. //选中工程
  24. public override void OnSelect()
  25. {
  26. CellNode.UiPanel.SelectGroup(Data);
  27. CellNode.L_SelectTexture.Instance.Visible = true;
  28. }
  29.  
  30. public override void OnUnSelect()
  31. {
  32. CellNode.L_SelectTexture.Instance.Visible = false;
  33. }
  34. }