TextWidget.cs 699 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Numerics;
  2. using Fort23.Core;
  3. using UnityEngine;
  4. namespace Fort23.Mono
  5. {
  6. [UIBinding(prefab = "TextWidget")]
  7. public partial class TextWidget : UIComponent
  8. {
  9. private void Init()
  10. {
  11. }
  12. public override void AddEvent()
  13. {
  14. }
  15. public override void DelEvent()
  16. {
  17. }
  18. public override void AddButtonEvent()
  19. {
  20. }
  21. public void ShowWidget(string text, Color Color)
  22. {
  23. this.text.text = text;
  24. this.text.color = Color;
  25. TimerComponent.Instance.AddTimer(1000, delegate { UIManager.Instance.DormancyGComponent(this); });
  26. }
  27. }
  28. }