menuButtons.tscript 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //-----------------------------------------------------------------------------
  2. // Add buttons to the MainMenu after all other scripts have been exec'ed.
  3. //-----------------------------------------------------------------------------
  4. function inputTest::addMenuButton( %this )
  5. {
  6. if (isObject(MainMenuGui))
  7. {
  8. %testBtn = new GuiButtonCtrl() {
  9. text = "Input Event Monitor";
  10. groupNum = "-1";
  11. buttonType = "PushButton";
  12. useMouseEvents = "0";
  13. position = "0 0";
  14. extent = "200 40";
  15. minExtent = "8 8";
  16. horizSizing = "right";
  17. vertSizing = "bottom";
  18. profile = "GuiBlankMenuButtonProfile";
  19. visible = "1";
  20. active = "1";
  21. command = "Canvas.pushDialog(InputMonitorDlg);";
  22. tooltipProfile = "GuiToolTipProfile";
  23. isContainer = "0";
  24. canSave = "0";
  25. canSaveDynamicFields = "0";
  26. };
  27. if (!isObject(MMTestContainer))
  28. {
  29. new GuiDynamicCtrlArrayControl(MMTestContainer) {
  30. colCount = "0";
  31. colSize = "200";
  32. rowCount = "0";
  33. rowSize = "40";
  34. rowSpacing = "2";
  35. colSpacing = "0";
  36. frozen = "0";
  37. autoCellSize = "0";
  38. fillRowFirst = "1";
  39. dynamicSize = "1";
  40. padding = "0 0 0 0";
  41. position = "0 0";
  42. extent = "200 40";
  43. minExtent = "8 2";
  44. horizSizing = "right";
  45. vertSizing = "bottom";
  46. profile = "GuiDefaultProfile";
  47. visible = "1";
  48. active = "1";
  49. tooltipProfile = "GuiToolTipProfile";
  50. hovertime = "1000";
  51. isContainer = "1";
  52. canSave = "0";
  53. canSaveDynamicFields = "0";
  54. };
  55. MainMenuGui.add(MMTestContainer);
  56. }
  57. MMTestContainer.add(%testBtn);
  58. }
  59. }
  60. if (inputTest.addToMainMenu)
  61. inputTest.addMenuButton();