StoryLookBackView.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using FairyGUI;
  2. using UI.Main;
  3. using System.Collections;
  4. namespace GFGGame
  5. {
  6. public class StoryLookBackView : BaseWindow
  7. {
  8. private UI_StoryLookBackUI _ui;
  9. protected override void OnInit()
  10. {
  11. base.OnInit();
  12. _ui = UI_StoryLookBackUI.Create();
  13. this.viewCom = _ui.target;
  14. this.isfullScreen = true;
  15. this.modal = true;
  16. this.clickBlankToClose = false;
  17. _ui.m_btnBack.onClick.Add(this.Hide);
  18. }
  19. protected override void OnShown()
  20. {
  21. base.OnShown();
  22. _ui.m_content.m_txtContent.text = "";
  23. ArrayList dialogRead = (ArrayList)viewData;
  24. if(dialogRead != null)
  25. {
  26. string content = "";
  27. foreach(string words in dialogRead)
  28. {
  29. content += words + "\n";
  30. }
  31. _ui.m_content.m_txtContent.text = content;
  32. _ui.m_content.m_txtContent.height = _ui.m_content.m_txtContent.textHeight;
  33. }
  34. }
  35. protected override void OnHide()
  36. {
  37. base.OnHide();
  38. }
  39. }
  40. }