Small.cs 958 B

12345678910111213141516171819202122232425262728293031323334353637
  1. namespace OpenVIII.IGMData.Dialog.Timed
  2. {
  3. public class Small : IGMData.Dialog.Small
  4. {
  5. #region Fields
  6. private double maxtime = 3000;
  7. private double timeshow = 0;
  8. #endregion Fields
  9. #region Methods
  10. public static Small Create(FF8String data, int x, int y, Icons.ID? title = null, Box_Options options = Box_Options.Default) => Create<Small>(data, x, y, title, options);
  11. public override void Show()
  12. {
  13. timeshow = Memory.gameTime.TotalGameTime.TotalMilliseconds;
  14. base.Show();
  15. }
  16. public override bool Update()
  17. {
  18. if (Enabled)
  19. {
  20. base.Update();
  21. if (Memory.gameTime.TotalGameTime.TotalMilliseconds - timeshow < maxtime)
  22. return true;
  23. else
  24. Hide();
  25. }
  26. return false;
  27. }
  28. #endregion Methods
  29. }
  30. }