navEditor.tscript 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2014 Daniel Buckmaster
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to
  6. // deal in the Software without restriction, including without limitation the
  7. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  8. // sell copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  19. // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
  20. // IN THE SOFTWARE.
  21. //-----------------------------------------------------------------------------
  22. $Nav::EditorOpen = false;
  23. function NavEditorGui::onEditorActivated(%this)
  24. {
  25. if(%this.selectedObject)
  26. %this.selectObject(%this.selectedObject);
  27. %this.prepSelectionMode();
  28. }
  29. function NavEditorGui::onEditorDeactivated(%this)
  30. {
  31. if(%this.getMesh())
  32. %this.deselect();
  33. }
  34. //------------------------------------------------------------------------------
  35. function NavEditorGui::onWake(%this)
  36. {
  37. %fixedWindow = NavEditorTreeWindow;
  38. %fluidWindow = NavEditorOptionsWindow;
  39. if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
  40. {
  41. // Let's dock the side panel to the right side
  42. %this.docked = false;
  43. %this.resizing = true;
  44. %this.dockSidePanel();
  45. }
  46. else
  47. {
  48. // Let's release the side panel so it can be moved
  49. %this.docked = true;
  50. %this.resizing = false;
  51. %this.releaseSidePanel();
  52. }
  53. }
  54. function NavEditorGui::maxSize(%this, %window)
  55. {
  56. // Resize the windows to the max height
  57. // and force these to the right side if set
  58. if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1 && %this.resizing == true)
  59. {
  60. // prevent onResize after a resize
  61. %this.resizing = false;
  62. %fixedWindow = NavEditorTreeWindow;
  63. %fluidWindow = NavEditorOptionsWindow;
  64. %offset = -1; // tweak the vertical offset so that it aligns neatly
  65. %top = EditorGuiToolbar.extent.y + %offset;
  66. %bottom = %top + 59;
  67. %maxHeight = Canvas.extent.y - %top - %bottom;
  68. // --- Fixed window (top) ------------------------------------------------
  69. // put it back if it moved
  70. %fixedWindow.position.x = Canvas.extent.x - %fixedWindow.extent.x;
  71. %fixedWindow.position.y = %top;
  72. // don't go beyond the canvas
  73. if(%fixedWindow.extent.y > %maxHeight)
  74. %fixedWindow.extent.y = %maxHeight - %fluidWindow.extent.y;
  75. %position = %fixedWindow.position.x SPC %fixedWindow.position.y;
  76. %extent = %window.extent.x SPC %fixedWindow.extent.y;
  77. %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  78. // --- Fluid window (bottom) ---------------------------------------------
  79. // position is relative to the top window
  80. %position = %fixedWindow.position.x SPC %fixedWindow.extent.y + %top;
  81. %extent = %window.extent.x SPC Canvas.extent.y - %fixedWindow.extent.y - %bottom;
  82. %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  83. // --- AssetBrowser window ----------------------------------------------
  84. if(isObject(AssetBrowserWindow))
  85. {
  86. // Only resize the AssetBrowser if it's docked
  87. if(AssetBrowserWindow.docked == true)
  88. {
  89. // The width is relative to the sidepanel
  90. %browserWidth = Canvas.extent.x - %extent.x;
  91. %browserHeight = AssetBrowserWindow.extent.y;
  92. %browserPosY = Canvas.extent.y - AssetBrowserWindow.extent.y - 33;
  93. AssetBrowserWindow.resize(0, %browserPosY, %browserWidth, %browserHeight);
  94. }
  95. }
  96. // --- Windowed Console --------------------------------------------------
  97. if(isObject(windowConsoleControl))
  98. {
  99. // Only resize the AssetBrowser if it's docked
  100. if(windowConsoleControl.docked == true)
  101. {
  102. // The width is relative to the sidepanel
  103. %consoleWidth = Canvas.extent.x - %extent.x;
  104. %consoleHeight = windowConsoleControl.extent.y;
  105. %consolePosY = Canvas.extent.y - windowConsoleControl.extent.y - 33;
  106. windowConsoleControl.resize(0, %consolePosY, %consoleWidth, %consoleHeight);
  107. }
  108. }
  109. }
  110. }
  111. function NavEditorTreeWindow::onMouseDragged(%this)
  112. {
  113. %parent = NavEditorGui;
  114. if(%parent.panelHidden == true)
  115. {
  116. %parent.showSidePanel();
  117. }
  118. if(%parent.resizing == false && %parent.docked == true)
  119. {
  120. %parent.resizing = true;
  121. %parent.maxSize(%this);
  122. }
  123. }
  124. function NavEditorOptionsWindow::onMouseDragged(%this)
  125. {
  126. %parent = NavEditorGui;
  127. if(%parent.panelHidden == true)
  128. {
  129. %parent.showSidePanel();
  130. }
  131. if(%parent.resizing == false && %parent.docked == true)
  132. {
  133. %parent.resizing = true;
  134. %parent.maxSize(%this);
  135. }
  136. }
  137. function NavEditorGui::onResize(%this, %newPosition, %newExtent)
  138. {
  139. // Window to focus on (mostly the fluid window)
  140. %window = NavEditorOptionsWindow;
  141. if(%window.panelHidden == true)
  142. {
  143. %window.showSidePanel();
  144. }
  145. if(%this.resizing == false && %this.docked == true)
  146. {
  147. // Only resize once
  148. %this.resizing = true;
  149. %this.maxSize(%window);
  150. }
  151. }
  152. function NavEditorGui::dockSidePanel()
  153. {
  154. %parent = NavEditorGui;
  155. %fixedWindow = NavEditorTreeWindow;
  156. %fluidWindow = NavEditorOptionsWindow;
  157. if(%parent.docked == true)
  158. return;
  159. // Move and resize the window(s)
  160. %parent.resizing = true;
  161. %parent.maxSize(%fluidWindow);
  162. %parent.docked = true;
  163. %fluidWindow.onMouseDragged();
  164. // Lock the windows in place
  165. %fixedWindow.canCollapse = "0";
  166. %fixedWindow.canMove = "0";
  167. %fluidWindow.canCollapse = "0";
  168. %fluidWindow.canMove = "0";
  169. NavEditorGui_UnDockBtn.Visible = "1";
  170. NavEditorGui_DockBtn.Visible = "0";
  171. NavEditorGui_showBtn.Visible = "0";
  172. NavEditorGui_hideBtn.Visible = "1";
  173. }
  174. function NavEditorGui::releaseSidePanel()
  175. {
  176. %parent = NavEditorGui;
  177. %fixedWindow = NavEditorTreeWindow;
  178. %fluidWindow = NavEditorOptionsWindow;
  179. if(%parent.docked == false)
  180. return;
  181. // Unlock the windows so that be moved
  182. %fixedWindow.canCollapse = "1";
  183. %fixedWindow.canMove = "1";
  184. %fluidWindow.canCollapse = "1";
  185. %fluidWindow.canMove = "1";
  186. NavEditorGui_UnDockBtn.Visible = "0";
  187. NavEditorGui_DockBtn.Visible = "1";
  188. NavEditorGui_showBtn.Visible = "0";
  189. NavEditorGui_hideBtn.Visible = "0";
  190. // Let's do a small resize so it's visually clear we're undocking
  191. %position = %fixedWindow.position.x - 6 SPC %fixedWindow.position.y + 6;
  192. %extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y;
  193. %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  194. %position = %fluidWindow.position.x - 6 SPC %fluidWindow.position.y + 6;
  195. %extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y - 12;
  196. %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  197. %parent.docked = false;
  198. %parent.resizing = false;
  199. }
  200. function NavEditorGui::hideSidePanel()
  201. {
  202. %parent = NavEditorGui;
  203. %fixedWindow = NavEditorTreeWindow;
  204. %fluidWindow = NavEditorOptionsWindow;
  205. NavEditorGui_showBtn.Visible = "1";
  206. NavEditorGui_hideBtn.Visible = "0";
  207. // hide the content of the panels
  208. %fixedWindow.titleText = %fixedWindow.text;
  209. %fluidWindow.titleText = %fluidWindow.text;
  210. %fixedWindow.text = "";
  211. NavEditorTreePanel.Visible = "0";
  212. %fluidWindow.text = "";
  213. NavEditorOptionsPanel.Visible = "0";
  214. NavEditorInspector.Visible = "0";
  215. NavEditorOptScroll.Visible = "0";
  216. NavFieldInfoControl.Visible = "0";
  217. // Let's do a resize so that the panel is collapsed to the side
  218. %position = Canvas.extent.x - 24 SPC %fixedWindow.position.y;
  219. %extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y;
  220. %fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  221. %position = Canvas.extent.x - 24 SPC %fluidWindow.position.y;
  222. %extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y;
  223. %fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
  224. %parent.panelHidden = true;
  225. }
  226. function NavEditorGui::showSidePanel()
  227. {
  228. %parent = NavEditorGui;
  229. %fixedWindow = NavEditorTreeWindow;
  230. %fluidWindow = NavEditorOptionsWindow;
  231. NavEditorGui_showBtn.Visible = "0";
  232. NavEditorGui_hideBtn.Visible = "1";
  233. // showthe content of the panels
  234. %fixedWindow.text = %fixedWindow.titleText;
  235. NavEditorTreePanel.Visible = "1";
  236. %fluidWindow.text = %fluidWindow.titleText;
  237. NavEditorOptionsPanel.Visible = "1";
  238. NavEditorInspector.Visible = "1";
  239. NavEditorOptScroll.Visible = "1";
  240. NavFieldInfoControl.Visible = "1";
  241. %parent.resizing = true;
  242. %parent.maxSize(%fluidWindow);
  243. %parent.panelHidden = false;
  244. }
  245. //------------------------------------------------------------------------------
  246. function NavEditorGui::onModeSet(%this, %mode)
  247. {
  248. // Callback when the nav editor changes mode. Set the appropriate dynamic
  249. // GUI contents in the properties/actions boxes.
  250. NavInspector.setVisible(false);
  251. %actions = NavEditorOptionsWindow->ActionsBox;
  252. %actions->SelectActions.setVisible(false);
  253. %actions->LinkActions.setVisible(false);
  254. %actions->CoverActions.setVisible(false);
  255. %actions->TileActions.setVisible(false);
  256. %actions->TestActions.setVisible(false);
  257. %properties = NavEditorOptionsWindow->PropertiesBox;
  258. %properties->LinkProperties.setVisible(false);
  259. %properties->TileProperties.setVisible(false);
  260. %properties->TestProperties.setVisible(false);
  261. switch$(%mode)
  262. {
  263. case "SelectMode":
  264. NavInspector.setVisible(true);
  265. %actions->SelectActions.setVisible(true);
  266. case "LinkMode":
  267. %actions->LinkActions.setVisible(true);
  268. %properties->LinkProperties.setVisible(true);
  269. case "CoverMode":
  270. //
  271. %actions->CoverActions.setVisible(true);
  272. case "TileMode":
  273. %actions->TileActions.setVisible(true);
  274. %properties->TileProperties.setVisible(true);
  275. case "TestMode":
  276. %actions->TestActions.setVisible(true);
  277. %properties->TestProperties.setVisible(true);
  278. }
  279. }
  280. function NavEditorGui::paletteSync(%this, %mode)
  281. {
  282. // Synchronise the palette (small buttons on the left) with the actual mode
  283. // the nav editor is in.
  284. %evalShortcut = "ToolsPaletteArray-->" @ %mode @ ".setStateOn(1);";
  285. eval(%evalShortcut);
  286. }
  287. function NavEditorGui::onEscapePressed(%this)
  288. {
  289. return false;
  290. }
  291. function NavEditorGui::selectObject(%this, %obj)
  292. {
  293. NavTreeView.clearSelection();
  294. if(isObject(%obj))
  295. NavTreeView.selectItem(%obj);
  296. %this.onObjectSelected(%obj);
  297. }
  298. function NavEditorGui::onObjectSelected(%this, %obj)
  299. {
  300. if(isObject(%this.selectedObject))
  301. %this.deselect();
  302. %this.selectedObject = %obj;
  303. if(isObject(%obj))
  304. {
  305. %this.selectMesh(%obj);
  306. NavInspector.inspect(%obj);
  307. }
  308. }
  309. function NavEditorGui::deleteMesh(%this)
  310. {
  311. if(isObject(%this.selectedObject))
  312. {
  313. %this.selectedObject.delete();
  314. %this.selectObject(-1);
  315. }
  316. }
  317. function NavEditorGui::deleteSelected(%this)
  318. {
  319. switch$(%this.getMode())
  320. {
  321. case "SelectMode":
  322. // Try to delete the selected NavMesh.
  323. if(isObject(NavEditorGui.selectedObject))
  324. toolsMessageBoxYesNo("Warning",
  325. "Are you sure you want to delete" SPC NavEditorGui.selectedObject.getName(),
  326. "NavEditorGui.deleteMesh();");
  327. case "TestMode":
  328. %this.getPlayer().delete();
  329. %this.onPlayerDeselected();
  330. case "LinkMode":
  331. %this.deleteLink();
  332. %this.isDirty = true;
  333. }
  334. }
  335. function NavEditorGui::buildSelectedMeshes(%this)
  336. {
  337. if(isObject(%this.getMesh()))
  338. {
  339. %this.getMesh().build(NavEditorGui.backgroundBuild, NavEditorGui.saveIntermediates);
  340. %this.isDirty = true;
  341. }
  342. }
  343. function NavEditorGui::buildLinks(%this)
  344. {
  345. if(isObject(%this.getMesh()))
  346. {
  347. %this.getMesh().buildLinks();
  348. %this.isDirty = true;
  349. }
  350. }
  351. function updateLinkData(%control, %flags)
  352. {
  353. %control->LinkWalkFlag.setActive(true);
  354. %control->LinkJumpFlag.setActive(true);
  355. %control->LinkDropFlag.setActive(true);
  356. %control->LinkLedgeFlag.setActive(true);
  357. %control->LinkClimbFlag.setActive(true);
  358. %control->LinkTeleportFlag.setActive(true);
  359. %control->LinkWalkFlag.setStateOn(%flags & $Nav::WalkFlag);
  360. %control->LinkJumpFlag.setStateOn(%flags & $Nav::JumpFlag);
  361. %control->LinkDropFlag.setStateOn(%flags & $Nav::DropFlag);
  362. %control->LinkLedgeFlag.setStateOn(%flags & $Nav::LedgeFlag);
  363. %control->LinkClimbFlag.setStateOn(%flags & $Nav::ClimbFlag);
  364. %control->LinkTeleportFlag.setStateOn(%flags & $Nav::TeleportFlag);
  365. }
  366. function getLinkFlags(%control)
  367. {
  368. return (%control->LinkWalkFlag.isStateOn() ? $Nav::WalkFlag : 0) |
  369. (%control->LinkJumpFlag.isStateOn() ? $Nav::JumpFlag : 0) |
  370. (%control->LinkDropFlag.isStateOn() ? $Nav::DropFlag : 0) |
  371. (%control->LinkLedgeFlag.isStateOn() ? $Nav::LedgeFlag : 0) |
  372. (%control->LinkClimbFlag.isStateOn() ? $Nav::ClimbFlag : 0) |
  373. (%control->LinkTeleportFlag.isStateOn() ? $Nav::TeleportFlag : 0);
  374. }
  375. function disableLinkData(%control)
  376. {
  377. %control->LinkWalkFlag.setActive(false);
  378. %control->LinkJumpFlag.setActive(false);
  379. %control->LinkDropFlag.setActive(false);
  380. %control->LinkLedgeFlag.setActive(false);
  381. %control->LinkClimbFlag.setActive(false);
  382. %control->LinkTeleportFlag.setActive(false);
  383. }
  384. function NavEditorGui::onLinkSelected(%this, %flags)
  385. {
  386. updateLinkData(NavEditorOptionsWindow-->LinkProperties, %flags);
  387. }
  388. function NavEditorGui::onPlayerSelected(%this, %flags)
  389. {
  390. updateLinkData(NavEditorOptionsWindow-->TestProperties, %flags);
  391. }
  392. function NavEditorGui::updateLinkFlags(%this)
  393. {
  394. if(isObject(%this.getMesh()))
  395. {
  396. %properties = NavEditorOptionsWindow-->LinkProperties;
  397. %this.setLinkFlags(getLinkFlags(%properties));
  398. %this.isDirty = true;
  399. }
  400. }
  401. function NavEditorGui::updateTestFlags(%this)
  402. {
  403. if(isObject(%this.getPlayer()))
  404. {
  405. %properties = NavEditorOptionsWindow-->TestProperties;
  406. %player = %this.getPlayer();
  407. %player.allowWwalk = %properties->LinkWalkFlag.isStateOn();
  408. %player.allowJump = %properties->LinkJumpFlag.isStateOn();
  409. %player.allowDrop = %properties->LinkDropFlag.isStateOn();
  410. %player.allowLedge = %properties->LinkLedgeFlag.isStateOn();
  411. %player.allowClimb = %properties->LinkClimbFlag.isStateOn();
  412. %player.allowTeleport = %properties->LinkTeleportFlag.isStateOn();
  413. %this.isDirty = true;
  414. }
  415. }
  416. function NavEditorGui::onLinkDeselected(%this)
  417. {
  418. disableLinkData(NavEditorOptionsWindow-->LinkProperties);
  419. }
  420. function NavEditorGui::onPlayerDeselected(%this)
  421. {
  422. disableLinkData(NavEditorOptionsWindow-->TestProperties);
  423. }
  424. function NavEditorGui::createCoverPoints(%this)
  425. {
  426. if(isObject(%this.getMesh()))
  427. {
  428. %this.getMesh().createCoverPoints();
  429. %this.isDirty = true;
  430. }
  431. }
  432. function NavEditorGui::deleteCoverPoints(%this)
  433. {
  434. if(isObject(%this.getMesh()))
  435. {
  436. %this.getMesh().deleteCoverPoints();
  437. %this.isDirty = true;
  438. }
  439. }
  440. function NavEditorGui::findCover(%this)
  441. {
  442. if(%this.getMode() $= "TestMode" && isObject(%this.getPlayer()))
  443. {
  444. %pos = LocalClientConnection.getControlObject().getPosition();
  445. %text = NavEditorOptionsWindow-->TestProperties->CoverPosition.getText();
  446. if(%text !$= "")
  447. %pos = eval("return " @ %text);
  448. %this.getPlayer().findCover(%pos, NavEditorOptionsWindow-->TestProperties->CoverRadius.getText());
  449. }
  450. }
  451. function NavEditorGui::followObject(%this)
  452. {
  453. if(%this.getMode() $= "TestMode" && isObject(%this.getPlayer()))
  454. {
  455. %obj = LocalClientConnection.player;
  456. %text = NavEditorOptionsWindow-->TestProperties->FollowObject.getText();
  457. if(%text !$= "")
  458. {
  459. %command = "return " @ %text;
  460. if(!endsWith(%command, ";"))
  461. %command = %command @ ";";
  462. %obj = eval(%command);
  463. if(!isObject(%obj))
  464. toolsMessageBoxOk("Error", "Cannot find object" SPC %text);
  465. }
  466. if(isObject(%obj))
  467. %this.getPlayer().followObject(%obj, NavEditorOptionsWindow-->TestProperties->FollowRadius.getText());
  468. }
  469. }
  470. function NavInspector::inspect(%this, %obj)
  471. {
  472. %name = "";
  473. if(isObject(%obj))
  474. %name = %obj.getName();
  475. else
  476. NavFieldInfoControl.setText("");
  477. Parent::inspect(%this, %obj);
  478. }
  479. function NavInspector::onInspectorFieldModified(%this, %object, %fieldName, %arrayIndex, %oldValue, %newValue)
  480. {
  481. // Same work to do as for the regular WorldEditor Inspector.
  482. Inspector::onInspectorFieldModified(%this, %object, %fieldName, %arrayIndex, %oldValue, %newValue);
  483. }
  484. function NavInspector::onFieldSelected(%this, %fieldName, %fieldTypeStr, %fieldDoc)
  485. {
  486. NavFieldInfoControl.setText( "<font:" @ $Gui::fontTypeBold @ ":16>" @ %fieldName @ "<font:" @ $Gui::fontTypeItalic @ ":16> (" @ %fieldTypeStr @ ") " NL "<font:" @ $Gui::fontTypeRegular @ ":16>" @ %fieldDoc );
  487. }
  488. function NavTreeView::onInspect(%this, %obj)
  489. {
  490. NavInspector.inspect(%obj);
  491. }
  492. function NavTreeView::onSelect(%this, %obj)
  493. {
  494. NavInspector.inspect(%obj);
  495. NavEditorGui.onObjectSelected(%obj);
  496. }
  497. function NavEditorGui::prepSelectionMode(%this)
  498. {
  499. %this.setMode("SelectMode");
  500. ToolsPaletteArray-->NavEditorSelectMode.setStateOn(1);
  501. }
  502. //-----------------------------------------------------------------------------
  503. function ENavEditorPaletteButton::onClick(%this)
  504. {
  505. // When clicking on a pelette button, add its description to the bottom of
  506. // the editor window.
  507. EditorGuiStatusBar.setInfo(%this.DetailedDesc);
  508. }
  509. //-----------------------------------------------------------------------------
  510. function NavMeshLinkFlagButton::onClick(%this)
  511. {
  512. NavEditorGui.updateLinkFlags();
  513. }
  514. function NavMeshTestFlagButton::onClick(%this)
  515. {
  516. NavEditorGui.updateTestFlags();
  517. }
  518. singleton GuiControlProfile(NavEditorProfile)
  519. {
  520. canKeyFocus = true;
  521. opaque = true;
  522. fillColor = "192 192 192 192";
  523. category = "Editor";
  524. };