EditorLoadingGui.gui 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //--- OBJECT WRITE BEGIN ---
  2. $guiContent = new GuiControl(EditorLoadingGui,EditorGuiGroup) {
  3. position = "0 0";
  4. extent = "1024 768";
  5. minExtent = "8 2";
  6. horizSizing = "right";
  7. vertSizing = "bottom";
  8. profile = "GuiOverlayProfile";
  9. visible = "1";
  10. active = "1";
  11. tooltipProfile = "ToolsGuiToolTipProfile";
  12. hovertime = "1000";
  13. isContainer = "1";
  14. canSave = "1";
  15. canSaveDynamicFields = "1";
  16. new GuiControl() {
  17. position = "389 355";
  18. extent = "245 57";
  19. minExtent = "8 2";
  20. horizSizing = "center";
  21. vertSizing = "center";
  22. profile = "ToolsGuiSolidDefaultProfile";
  23. visible = "1";
  24. active = "1";
  25. tooltipProfile = "ToolsGuiToolTipProfile";
  26. hovertime = "1000";
  27. isContainer = "1";
  28. internalName = "Dialog";
  29. canSave = "1";
  30. canSaveDynamicFields = "0";
  31. new GuiTextCtrl() {
  32. text = "Loading the Editor...";
  33. maxLength = "1024";
  34. margin = "0 0 0 0";
  35. padding = "0 0 0 0";
  36. anchorTop = "1";
  37. anchorBottom = "0";
  38. anchorLeft = "1";
  39. anchorRight = "0";
  40. position = "5 19";
  41. extent = "236 18";
  42. minExtent = "8 2";
  43. horizSizing = "width";
  44. vertSizing = "center";
  45. profile = "ToolsGuiTextBoldCenterProfile";
  46. visible = "1";
  47. active = "1";
  48. tooltipProfile = "ToolsGuiToolTipProfile";
  49. hovertime = "1000";
  50. isContainer = "0";
  51. canSave = "1";
  52. canSaveDynamicFields = "0";
  53. internalName = "loadingText";
  54. };
  55. };
  56. };
  57. //--- OBJECT WRITE END ---
  58. function EditorLoadingGui::onWake(%this)
  59. {
  60. %res = %this.getExtent();
  61. %resX = getWord(%res, 0);
  62. %resY = getWord(%res, 1);
  63. %dialog = %this-->Dialog;
  64. %dialogExtent = %dialog.getExtent();
  65. %dialogWidth = getWord(%dialogExtent, 0);
  66. %dialogHeight = getWord(%dialogExtent, 1);
  67. %dialogPostion = %dialog.getPosition();
  68. %posX = (%resX / 2) - (%dialogWidth / 2);
  69. %posY = (%resY / 2) - (%dialogHeight / 2);
  70. %dialog.setPosition(%posX, %posY);
  71. }
  72. function displayEditorLoadingGui(%displayText)
  73. {
  74. if(%displayText $= "")
  75. %displayText = "Loading the Editor...";
  76. EditorLoadingGui-->loadingText.setText(%displayText);
  77. Canvas.pushDialog( EditorLoadingGui );
  78. Canvas.repaint();
  79. }
  80. function hideEditorLoadingGui()
  81. {
  82. Canvas.popDialog( EditorLoadingGui );
  83. }