Newer
Older
DungeonShooting / DungeonShooting_Godot / src / game / ui / editorInput / EditorInputPanel.cs
@小李xl 小李xl on 5 Jan 2024 519 bytes TileSet编辑器编辑资源
  1. using Godot;
  2.  
  3. namespace UI.EditorInput;
  4.  
  5. public partial class EditorInputPanel : EditorInput
  6. {
  7.  
  8. public override void OnCreateUi()
  9. {
  10. }
  11.  
  12. public override void OnDestroyUi()
  13. {
  14. }
  15. public void Init(string labelText, string value = null)
  16. {
  17. S_Label.Instance.Text = labelText;
  18. if (value != null)
  19. {
  20. S_LineEdit.Instance.Text = value;
  21. }
  22. }
  23.  
  24. public string GetValue()
  25. {
  26. return S_LineEdit.Instance.Text;
  27. }
  28. }