guiNavEditorCtrl.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669
  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. #include "torqueConfig.h"
  23. #ifdef TORQUE_TOOLS
  24. #include "platform/platform.h"
  25. #include "guiNavEditorCtrl.h"
  26. #include "duDebugDrawTorque.h"
  27. #include "console/engineAPI.h"
  28. #include "console/consoleTypes.h"
  29. #include "math/util/frustum.h"
  30. #include "math/mathUtils.h"
  31. #include "gfx/primBuilder.h"
  32. #include "gfx/gfxDrawUtil.h"
  33. #include "scene/sceneRenderState.h"
  34. #include "scene/sceneManager.h"
  35. #include "gui/core/guiCanvas.h"
  36. #include "gui/buttons/guiButtonCtrl.h"
  37. #include "gui/worldEditor/undoActions.h"
  38. #include "T3D/gameBase/gameConnection.h"
  39. IMPLEMENT_CONOBJECT(GuiNavEditorCtrl);
  40. ConsoleDocClass(GuiNavEditorCtrl,
  41. "@brief GUI tool that makes up the Navigation Editor\n\n"
  42. "Editor use only.\n\n"
  43. "@internal"
  44. );
  45. // Each of the mode names directly correlates with the Nav Editor's tool palette.
  46. const String GuiNavEditorCtrl::mSelectMode = "SelectMode";
  47. const String GuiNavEditorCtrl::mLinkMode = "LinkMode";
  48. const String GuiNavEditorCtrl::mCoverMode = "CoverMode";
  49. const String GuiNavEditorCtrl::mTileMode = "TileMode";
  50. const String GuiNavEditorCtrl::mTestMode = "TestMode";
  51. GuiNavEditorCtrl::GuiNavEditorCtrl()
  52. {
  53. mMode = mSelectMode;
  54. mIsDirty = false;
  55. mStartDragMousePoint = InvalidMousePoint;
  56. mMesh = NULL;
  57. mCurTile = mTile = -1;
  58. mPlayer = mCurPlayer = NULL;
  59. mSpawnClass = mSpawnDatablock = "";
  60. mLinkStart = Point3F::Max;
  61. mLink = mCurLink = -1;
  62. }
  63. GuiNavEditorCtrl::~GuiNavEditorCtrl()
  64. {
  65. }
  66. void GuiNavEditorUndoAction::undo()
  67. {
  68. }
  69. bool GuiNavEditorCtrl::onAdd()
  70. {
  71. if(!Parent::onAdd())
  72. return false;
  73. GFXStateBlockDesc desc;
  74. desc.fillMode = GFXFillSolid;
  75. desc.setBlend(false);
  76. desc.setZReadWrite(false, false);
  77. desc.setCullMode(GFXCullNone);
  78. mZDisableSB = GFX->createStateBlock(desc);
  79. desc.setZReadWrite(true, true);
  80. mZEnableSB = GFX->createStateBlock(desc);
  81. SceneManager::getPreRenderSignal().notify(this, &GuiNavEditorCtrl::_prepRenderImage);
  82. return true;
  83. }
  84. void GuiNavEditorCtrl::initPersistFields()
  85. {
  86. docsURL;
  87. addField("isDirty", TypeBool, Offset(mIsDirty, GuiNavEditorCtrl));
  88. addField("spawnClass", TypeRealString, Offset(mSpawnClass, GuiNavEditorCtrl),
  89. "Class of object to spawn in test mode.");
  90. addField("spawnDatablock", TypeRealString, Offset(mSpawnDatablock, GuiNavEditorCtrl),
  91. "Datablock to give new objects in test mode.");
  92. Parent::initPersistFields();
  93. }
  94. void GuiNavEditorCtrl::onSleep()
  95. {
  96. Parent::onSleep();
  97. //mMode = mSelectMode;
  98. }
  99. void GuiNavEditorCtrl::selectMesh(NavMesh *mesh)
  100. {
  101. mesh->setSelected(true);
  102. mMesh = mesh;
  103. }
  104. DefineEngineMethod(GuiNavEditorCtrl, selectMesh, void, (S32 id),,
  105. "@brief Select a NavMesh object.")
  106. {
  107. NavMesh *obj;
  108. if(Sim::findObject(id, obj))
  109. object->selectMesh(obj);
  110. }
  111. S32 GuiNavEditorCtrl::getMeshId()
  112. {
  113. return mMesh.isNull() ? 0 : mMesh->getId();
  114. }
  115. DefineEngineMethod(GuiNavEditorCtrl, getMesh, S32, (),,
  116. "@brief Select a NavMesh object.")
  117. {
  118. return object->getMeshId();
  119. }
  120. S32 GuiNavEditorCtrl::getPlayerId()
  121. {
  122. return mPlayer.isNull() ? 0 : mPlayer->getId();
  123. }
  124. DefineEngineMethod(GuiNavEditorCtrl, getPlayer, S32, (),,
  125. "@brief Select a NavMesh object.")
  126. {
  127. return object->getPlayerId();
  128. }
  129. void GuiNavEditorCtrl::deselect()
  130. {
  131. if(!mMesh.isNull())
  132. mMesh->setSelected(false);
  133. mMesh = NULL;
  134. mPlayer = mCurPlayer = NULL;
  135. mCurTile = mTile = -1;
  136. mLinkStart = Point3F::Max;
  137. mLink = mCurLink = -1;
  138. }
  139. DefineEngineMethod(GuiNavEditorCtrl, deselect, void, (),,
  140. "@brief Deselect whatever is currently selected in the editor.")
  141. {
  142. object->deselect();
  143. }
  144. void GuiNavEditorCtrl::deleteLink()
  145. {
  146. if(!mMesh.isNull() && mLink != -1)
  147. {
  148. mMesh->selectLink(mLink, false);
  149. mMesh->deleteLink(mLink);
  150. mLink = -1;
  151. Con::executef(this, "onLinkDeselected");
  152. }
  153. }
  154. DefineEngineMethod(GuiNavEditorCtrl, deleteLink, void, (),,
  155. "@brief Delete the currently selected link.")
  156. {
  157. object->deleteLink();
  158. }
  159. void GuiNavEditorCtrl::setLinkFlags(const LinkData &d)
  160. {
  161. if(mMode == mLinkMode && !mMesh.isNull() && mLink != -1)
  162. {
  163. mMesh->setLinkFlags(mLink, d);
  164. }
  165. }
  166. DefineEngineMethod(GuiNavEditorCtrl, setLinkFlags, void, (U32 flags),,
  167. "@Brief Set jump and drop properties of the selected link.")
  168. {
  169. object->setLinkFlags(LinkData(flags));
  170. }
  171. void GuiNavEditorCtrl::buildTile()
  172. {
  173. if(!mMesh.isNull() && mTile != -1)
  174. mMesh->buildTile(mTile);
  175. }
  176. DefineEngineMethod(GuiNavEditorCtrl, buildTile, void, (),,
  177. "@brief Build the currently selected tile.")
  178. {
  179. object->buildTile();
  180. }
  181. void GuiNavEditorCtrl::spawnPlayer(const Point3F &pos)
  182. {
  183. SceneObject *obj = (SceneObject*)Sim::spawnObject(mSpawnClass, mSpawnDatablock);
  184. if(obj)
  185. {
  186. MatrixF mat(true);
  187. mat.setPosition(pos);
  188. obj->setTransform(mat);
  189. SimObject* cleanup = Sim::findObject("MissionCleanup");
  190. if(cleanup)
  191. {
  192. SimGroup* missionCleanup = dynamic_cast<SimGroup*>(cleanup);
  193. missionCleanup->addObject(obj);
  194. }
  195. mPlayer = obj;
  196. Player* po = dynamic_cast<Player*>(obj);
  197. if (!po) return; //todo, more types
  198. if (po->getAIController())
  199. {
  200. if (po->getAIController()->mControllerData)
  201. Con::executef(this, "onPlayerSelected", Con::getIntArg(po->getAIController()->mControllerData->mLinkTypes.getFlags()));
  202. }
  203. else
  204. {
  205. Con::executef(this, "onPlayerSelected");
  206. }
  207. }
  208. }
  209. DefineEngineMethod(GuiNavEditorCtrl, spawnPlayer, void, (),,
  210. "@brief Spawn an AIPlayer at the centre of the screen.")
  211. {
  212. Point3F c;
  213. if(object->get3DCentre(c))
  214. object->spawnPlayer(c);
  215. }
  216. void GuiNavEditorCtrl::get3DCursor(GuiCursor *&cursor,
  217. bool &visible,
  218. const Gui3DMouseEvent &event_)
  219. {
  220. //cursor = mAddNodeCursor;
  221. //visible = false;
  222. cursor = NULL;
  223. visible = false;
  224. GuiCanvas *root = getRoot();
  225. if(!root)
  226. return;
  227. S32 currCursor = PlatformCursorController::curArrow;
  228. if(root->mCursorChanged == currCursor)
  229. return;
  230. PlatformWindow *window = root->getPlatformWindow();
  231. PlatformCursorController *controller = window->getCursorController();
  232. // We've already changed the cursor,
  233. // so set it back before we change it again.
  234. if(root->mCursorChanged != -1)
  235. controller->popCursor();
  236. // Now change the cursor shape
  237. controller->pushCursor(currCursor);
  238. root->mCursorChanged = currCursor;
  239. }
  240. bool GuiNavEditorCtrl::get3DCentre(Point3F &pos)
  241. {
  242. Point3F screen, start, end;
  243. screen.set(getExtent().x / 2, getExtent().y / 2, 0);
  244. unproject(screen, &start);
  245. screen.z = 1.0f;
  246. unproject(screen, &end);
  247. RayInfo ri;
  248. if(gServerContainer.castRay(start, end, StaticObjectType, &ri))
  249. {
  250. pos = ri.point;
  251. return true;
  252. }
  253. return false;
  254. }
  255. void GuiNavEditorCtrl::on3DMouseDown(const Gui3DMouseEvent & event)
  256. {
  257. mGizmo->on3DMouseDown(event);
  258. if(!isFirstResponder())
  259. setFirstResponder();
  260. mouseLock();
  261. // Construct a LineSegment from the camera position to 1000 meters away in
  262. // the direction clicked.
  263. // If that segment hits the terrain, truncate the ray to only be that length.
  264. Point3F startPnt = event.pos;
  265. Point3F endPnt = event.pos + event.vec * 1000.0f;
  266. RayInfo ri;
  267. U8 keys = Input::getModifierKeys();
  268. bool shift = keys & SI_LSHIFT;
  269. bool ctrl = keys & SI_LCTRL;
  270. if(mMode == mLinkMode && !mMesh.isNull())
  271. {
  272. if(gServerContainer.castRay(startPnt, endPnt, StaticObjectType, &ri))
  273. {
  274. U32 link = mMesh->getLink(ri.point);
  275. if(link != -1)
  276. {
  277. if(mLink != -1)
  278. mMesh->selectLink(mLink, false);
  279. mMesh->selectLink(link, true, false);
  280. mLink = link;
  281. LinkData d = mMesh->getLinkFlags(mLink);
  282. Con::executef(this, "onLinkSelected", Con::getIntArg(d.getFlags()));
  283. }
  284. else
  285. {
  286. if(mLink != -1)
  287. {
  288. mMesh->selectLink(mLink, false);
  289. mLink = -1;
  290. Con::executef(this, "onLinkDeselected");
  291. }
  292. else
  293. {
  294. if(mLinkStart != Point3F::Max)
  295. {
  296. mMesh->addLink(mLinkStart, ri.point);
  297. if(!shift)
  298. mLinkStart = Point3F::Max;
  299. }
  300. else
  301. {
  302. mLinkStart = ri.point;
  303. }
  304. }
  305. }
  306. }
  307. else
  308. {
  309. mMesh->selectLink(mLink, false);
  310. mLink = -1;
  311. Con::executef(this, "onLinkDeselected");
  312. }
  313. }
  314. if(mMode == mTileMode && !mMesh.isNull())
  315. {
  316. if(gServerContainer.castRay(startPnt, endPnt, StaticShapeObjectType, &ri))
  317. {
  318. mTile = mMesh->getTile(ri.point);
  319. dd.clear();
  320. mMesh->renderTileData(dd, mTile);
  321. }
  322. }
  323. if(mMode == mTestMode)
  324. {
  325. // Spawn new character
  326. if(ctrl)
  327. {
  328. if(gServerContainer.castRay(startPnt, endPnt, StaticObjectType, &ri))
  329. spawnPlayer(ri.point);
  330. }
  331. // Deselect character
  332. else if(shift)
  333. {
  334. mPlayer = NULL;
  335. Con::executef(this, "onPlayerDeselected");
  336. }
  337. // Select/move character
  338. else
  339. {
  340. if(gServerContainer.castRay(startPnt, endPnt, PlayerObjectType | VehicleObjectType, &ri))
  341. {
  342. if(ri.object)
  343. {
  344. mPlayer = ri.object;
  345. Player* po = dynamic_cast<Player*>(ri.object);
  346. if (!po) return; //todo, more types
  347. if (po->getAIController())
  348. {
  349. if (po->getAIController()->mControllerData)
  350. Con::executef(this, "onPlayerSelected", Con::getIntArg(po->getAIController()->mControllerData->mLinkTypes.getFlags()));
  351. }
  352. else
  353. {
  354. Con::executef(this, "onPlayerSelected");
  355. }
  356. }
  357. }
  358. else if (!mPlayer.isNull() && gServerContainer.castRay(startPnt, endPnt, StaticObjectType, &ri))
  359. {
  360. Player* po = dynamic_cast<Player*>(mPlayer.getPointer());
  361. if (!po) return; //todo, more types
  362. if (po->getAIController())
  363. {
  364. if (po->getAIController()->mControllerData)
  365. po->getAIController()->getNav()->setPathDestination(ri.point);
  366. }
  367. }
  368. }
  369. }
  370. }
  371. void GuiNavEditorCtrl::on3DMouseUp(const Gui3DMouseEvent & event)
  372. {
  373. // Keep the Gizmo up to date.
  374. mGizmo->on3DMouseUp(event);
  375. mouseUnlock();
  376. }
  377. void GuiNavEditorCtrl::on3DMouseMove(const Gui3DMouseEvent & event)
  378. {
  379. //if(mSelRiver != NULL && mSelNode != -1)
  380. //mGizmo->on3DMouseMove(event);
  381. Point3F startPnt = event.pos;
  382. Point3F endPnt = event.pos + event.vec * 1000.0f;
  383. RayInfo ri;
  384. if(mMode == mLinkMode && !mMesh.isNull())
  385. {
  386. if(gServerContainer.castRay(startPnt, endPnt, StaticObjectType, &ri))
  387. {
  388. U32 link = mMesh->getLink(ri.point);
  389. if(link != -1)
  390. {
  391. if(link != mLink)
  392. {
  393. if(mCurLink != -1)
  394. mMesh->selectLink(mCurLink, false);
  395. mMesh->selectLink(link, true, true);
  396. }
  397. mCurLink = link;
  398. }
  399. else
  400. {
  401. if(mCurLink != mLink)
  402. mMesh->selectLink(mCurLink, false);
  403. mCurLink = -1;
  404. }
  405. }
  406. else
  407. {
  408. mMesh->selectLink(mCurLink, false);
  409. mCurLink = -1;
  410. }
  411. }
  412. // Select a tile from our current NavMesh.
  413. if(mMode == mTileMode && !mMesh.isNull())
  414. {
  415. if(gServerContainer.castRay(startPnt, endPnt, StaticObjectType, &ri))
  416. mCurTile = mMesh->getTile(ri.point);
  417. else
  418. mCurTile = -1;
  419. }
  420. if(mMode == mTestMode)
  421. {
  422. if(gServerContainer.castRay(startPnt, endPnt, PlayerObjectType | VehicleObjectType, &ri))
  423. mCurPlayer = ri.object;
  424. else
  425. mCurPlayer = NULL;
  426. }
  427. }
  428. void GuiNavEditorCtrl::on3DMouseDragged(const Gui3DMouseEvent & event)
  429. {
  430. mGizmo->on3DMouseDragged(event);
  431. if(mGizmo->isDirty())
  432. {
  433. Point3F scale = mGizmo->getScale();
  434. const MatrixF &mat = mGizmo->getTransform();
  435. VectorF normal;
  436. mat.getColumn(2, &normal);
  437. //mSelRiver->setNode(pos, scale.x, scale.z, normal, mSelNode);
  438. mIsDirty = true;
  439. }
  440. }
  441. void GuiNavEditorCtrl::on3DMouseEnter(const Gui3DMouseEvent & event)
  442. {
  443. }
  444. void GuiNavEditorCtrl::on3DMouseLeave(const Gui3DMouseEvent & event)
  445. {
  446. }
  447. void GuiNavEditorCtrl::updateGuiInfo()
  448. {
  449. }
  450. void GuiNavEditorCtrl::onRender(Point2I offset, const RectI &updateRect)
  451. {
  452. PROFILE_SCOPE(GuiNavEditorCtrl_OnRender);
  453. Parent::onRender(offset, updateRect);
  454. return;
  455. }
  456. static void renderBoxOutline(const Box3F &box, const ColorI &col)
  457. {
  458. if(box != Box3F::Invalid)
  459. {
  460. GFXStateBlockDesc desc;
  461. desc.setCullMode(GFXCullNone);
  462. desc.setFillModeSolid();
  463. desc.setZReadWrite(true, false);
  464. desc.setBlend(true);
  465. GFX->getDrawUtil()->drawCube(desc, box, ColorI(col, 20));
  466. desc.setFillModeWireframe();
  467. desc.setBlend(false);
  468. GFX->getDrawUtil()->drawCube(desc, box, ColorI(col, 255));
  469. }
  470. }
  471. void GuiNavEditorCtrl::renderScene(const RectI & updateRect)
  472. {
  473. GFX->setStateBlock(mZDisableSB);
  474. // get the projected size...
  475. GameConnection* connection = GameConnection::getConnectionToServer();
  476. if(!connection)
  477. return;
  478. // Grab the camera's transform
  479. MatrixF mat;
  480. connection->getControlCameraTransform(0, &mat);
  481. // Get the camera position
  482. Point3F camPos;
  483. mat.getColumn(3,&camPos);
  484. if(mMode == mLinkMode)
  485. {
  486. if(mLinkStart != Point3F::Max)
  487. {
  488. GFXStateBlockDesc desc;
  489. desc.setBlend(false);
  490. desc.setZReadWrite(true ,true);
  491. MatrixF linkMat(true);
  492. linkMat.setPosition(mLinkStart);
  493. Point3F scale(0.8f, 0.8f, 0.8f);
  494. GFX->getDrawUtil()->drawTransform(desc, linkMat, &scale);
  495. }
  496. }
  497. if(mMode == mTileMode && !mMesh.isNull())
  498. {
  499. renderBoxOutline(mMesh->getTileBox(mCurTile), ColorI::BLUE);
  500. renderBoxOutline(mMesh->getTileBox(mTile), ColorI::GREEN);
  501. if(Con::getBoolVariable("$Nav::Editor::renderVoxels", false)) dd.renderGroup(0);
  502. if(Con::getBoolVariable("$Nav::Editor::renderInput", false))
  503. {
  504. dd.depthMask(false);
  505. dd.renderGroup(1);
  506. dd.depthMask(true);
  507. }
  508. }
  509. if(mMode == mTestMode)
  510. {
  511. if(!mCurPlayer.isNull())
  512. renderBoxOutline(mCurPlayer->getWorldBox(), ColorI::BLUE);
  513. if(!mPlayer.isNull())
  514. renderBoxOutline(mPlayer->getWorldBox(), ColorI::GREEN);
  515. }
  516. duDebugDrawTorque d;
  517. if(!mMesh.isNull())
  518. mMesh->renderLinks(d);
  519. d.render();
  520. // Now draw all the 2d stuff!
  521. GFX->setClipRect(updateRect);
  522. }
  523. bool GuiNavEditorCtrl::getStaticPos(const Gui3DMouseEvent & event, Point3F &tpos)
  524. {
  525. // Find clicked point on the terrain
  526. Point3F startPnt = event.pos;
  527. Point3F endPnt = event.pos + event.vec * 1000.0f;
  528. RayInfo ri;
  529. bool hit;
  530. hit = gServerContainer.castRay(startPnt, endPnt, StaticShapeObjectType, &ri);
  531. tpos = ri.point;
  532. return hit;
  533. }
  534. void GuiNavEditorCtrl::setMode(String mode, bool sourceShortcut = false)
  535. {
  536. mMode = mode;
  537. Con::executef(this, "onModeSet", mode);
  538. if(sourceShortcut)
  539. Con::executef(this, "paletteSync", mode);
  540. }
  541. void GuiNavEditorCtrl::submitUndo(const UTF8 *name)
  542. {
  543. // Grab the mission editor undo manager.
  544. UndoManager *undoMan = NULL;
  545. if(!Sim::findObject("EUndoManager", undoMan))
  546. {
  547. Con::errorf("GuiNavEditorCtrl::submitUndo() - EUndoManager not found!");
  548. return;
  549. }
  550. // Setup the action.
  551. GuiNavEditorUndoAction *action = new GuiNavEditorUndoAction(name);
  552. action->mNavEditor = this;
  553. undoMan->addAction(action);
  554. }
  555. void GuiNavEditorCtrl::_prepRenderImage(SceneManager* sceneGraph, const SceneRenderState* state)
  556. {
  557. /*if(isAwake() && River::smEditorOpen && mSelRiver)
  558. {
  559. ObjectRenderInst *ri = state->getRenderPass()->allocInst<ObjectRenderInst>();
  560. ri->type = RenderPassManager::RIT_Editor;
  561. ri->renderDelegate.bind(this, &GuiNavEditorCtrl::_renderSelectedRiver);
  562. ri->defaultKey = 100;
  563. state->getRenderPass()->addInst(ri);
  564. }*/
  565. }
  566. DefineEngineMethod(GuiNavEditorCtrl, getMode, const char*, (), , "")
  567. {
  568. return object->getMode();
  569. }
  570. DefineEngineMethod(GuiNavEditorCtrl, setMode, void, (String mode),, "setMode(String mode)")
  571. {
  572. object->setMode(mode);
  573. }
  574. #endif