editorSettingsWindow.ed.tscript 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. //-----------------------------------------------------------------------------
  2. // Copyright (c) 2012 GarageGames, LLC
  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. function ESettingsWindow::onAdd(%this)
  23. {
  24. new ArrayObject(EditorSettingsPageList);
  25. new ArrayObject(GameSettingsPageList);
  26. }
  27. function ESettingsWindow::startup( %this )
  28. {
  29. %this.addEditorSettingsPage("Axis", "Axis Gizmo");
  30. %this.addEditorSettingsPage("General", "General Settings");
  31. %this.addEditorSettingsPage("Camera", "Camera Settings");
  32. %this.addEditorSettingsPage("SceneEditor", "Scene Editor");
  33. %this.addEditorSettingsPage("ShapeEditor", "Shape Editor");
  34. %this.addEditorSettingsPage("NavEditor", "Navigation Editor");
  35. %this.addEditorSettingsPage("Theme", "Theme");
  36. %this.addEditorSettingsPage("AssetEditing", "Asset Editing");
  37. %this.addEditorSettingsPage("PostFX", "Post Effects");
  38. %this.addGameSettingsPage("GameGeneral", "General");
  39. %this.addGameSettingsPage("Gameplay", "Gameplay");
  40. %this.addGameSettingsPage("Paths", "Paths");
  41. %this.addGameSettingsPage("UI", "UI");
  42. %this.addGameSettingsPage("LevelDefaults", "Level Defaults");
  43. %this.addGameSettingsPage("GameOptions", "Game Options");
  44. %this.addGameSettingsPage("AssetManagement", "Asset Management");
  45. %this.mode = "Editor";
  46. }
  47. function ESettingsWindow::onWake( %this )
  48. {
  49. }
  50. function ESettingsWindow::hideDialog( %this )
  51. {
  52. Canvas.popDialog(EditorSettingsWindow);
  53. }
  54. function ESettingsWindow::ToggleVisibility()
  55. {
  56. if(ESettingsWindow.isAwake())
  57. {
  58. Canvas.popDialog(EditorSettingsWindow);
  59. }
  60. else
  61. {
  62. Canvas.pushDialog(EditorSettingsWindow);
  63. ESettingsWindow.selectWindow();
  64. ESettingsWindow.setCollapseGroup(false);
  65. ESettingsWindowList.clear();
  66. ESettingsWindowList.setSelectedById( 1 );
  67. }
  68. }
  69. function ESettingsWindow::toggleProjectSettings(%this)
  70. {
  71. %this.ToggleVisibility();
  72. %count = GameSettingsPageList.count();
  73. for(%i=0; %i < %count; %i++)
  74. {
  75. %settingsPageText = GameSettingsPageList.getValue(%i);
  76. ESettingsWindowList.addRow( %i, %settingsPageText );
  77. }
  78. ESettingsWindowList.sort(0);
  79. %this.mode = "Project";
  80. ESettingsWindow.text = "Game Project Settings";
  81. ESettingsWindowList.setSelectedById( 1 );
  82. }
  83. function ESettingsWindow::toggleEditorSettings(%this)
  84. {
  85. %this.ToggleVisibility();
  86. %count = EditorSettingsPageList.count();
  87. for(%i=0; %i < %count; %i++)
  88. {
  89. %settingsPageText = EditorSettingsPageList.getValue(%i);
  90. ESettingsWindowList.addRow( %i, %settingsPageText );
  91. }
  92. ESettingsWindowList.sort(0);
  93. %this.mode = "Editor";
  94. ESettingsWindow.text = ":: Editor Settings";
  95. ESettingsWindowList.setSelectedById( 1 );
  96. }
  97. function ESettingsWindow::addEditorSettingsPage(%this, %settingsPageName, %settingsPageText)
  98. {
  99. EditorSettingsPageList.add(%settingsPageName, %settingsPageText);
  100. }
  101. function ESettingsWindow::addGameSettingsPage(%this, %settingsPageName, %settingsPageText)
  102. {
  103. GameSettingsPageList.add(%settingsPageName, %settingsPageText);
  104. }
  105. function ESettingsWindow::refresh(%this)
  106. {
  107. if(ESettingsWindow.selectedPageId !$= "")
  108. {
  109. ESettingsWindowList.setSelectedById( ESettingsWindow.selectedPageId );
  110. }
  111. else
  112. {
  113. ESettingsWindowList.setSelectedById( 1 );
  114. }
  115. }
  116. //-----------------------------------------------------------------------------
  117. function ESettingsWindowList::onSelect( %this, %id, %text )
  118. {
  119. SettingsInspector.clearFields();
  120. if(ESettingsWindow.mode $= "Editor")
  121. %pageName = EditorSettingsPageList.getKey(EditorSettingsPageList.getIndexFromValue(%text));
  122. else
  123. %pageName = GameSettingsPageList.getKey(GameSettingsPageList.getIndexFromValue(%text));
  124. eval("ESettingsWindow.get" @ %pageName @ "Settings();");
  125. ESettingsWindow.selectedPageId = %id;
  126. ESettingsWindow.selectedPageText = %text;
  127. }
  128. //Read/write field functions
  129. function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
  130. {
  131. %moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
  132. if(ESettingsWindow.mode $= "Editor")
  133. %this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
  134. else
  135. %this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", ProjectSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
  136. }
  137. function SettingsInspector::changeEditorSetting(%this, %varName, %value)
  138. {
  139. %varName = strreplace(%varName, "-", "/");
  140. if(%value !$= "" && (fileExt(%value) !$= "" || IsDirectory(%value)))
  141. {
  142. %value = makeFullPath(%value);
  143. }
  144. //echo("Set " @ %varName @ " to be " @ %value);
  145. if(ESettingsWindow.mode $= "Editor")
  146. %oldValue = EditorSettings.value(%varName);
  147. else
  148. %oldValue = ProjectSettings.value(%varName);
  149. if(ESettingsWindow.mode $= "Editor")
  150. EditorSettings.setValue(%varName, %value);
  151. else
  152. ProjectSettings.setValue(%varName, %value);
  153. if(ESettingsWindow.mode $= "Editor")
  154. {
  155. %success = EditorSettings.write();
  156. //Bit of a hack, but if we were editing the theme, reexec the profiles for GUI
  157. if(ESettingsWindow.selectedPageText $= "Theme")
  158. exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension);
  159. }
  160. else
  161. %success = ProjectSettings.write();
  162. if(%oldValue !$= %value)
  163. ESettingsWindow.schedule(15,"refresh");
  164. }
  165. function GuiInspectorVariableGroup::buildOptionsSettingField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %ownerObj)
  166. {
  167. %extent = 200;
  168. %fieldCtrl = %this.createInspectorField();
  169. %fieldCtrl.setHeightOverride(true, 200);
  170. %extent = %this.stack.getExtent();
  171. %width = mRound(%extent/2);
  172. %height = 20;
  173. %inset = 10;
  174. %editControl = new GuiPopUpMenuCtrl() {
  175. class = "guiInspectorListField";
  176. maxPopupHeight = "200";
  177. sbUsesNAColor = "0";
  178. reverseTextList = "0";
  179. bitmapBounds = "16 16";
  180. maxLength = "1024";
  181. Margin = "0 0 0 0";
  182. Padding = "0 0 0 0";
  183. AnchorTop = "1";
  184. AnchorBottom = "0";
  185. AnchorLeft = "1";
  186. AnchorRight = "0";
  187. isContainer = "0";
  188. Profile = "ToolsGuiPopUpMenuProfile";
  189. HorizSizing = "right";
  190. VertSizing = "bottom";
  191. Position = %fieldCtrl.edit.position;
  192. Extent = %fieldCtrl.edit.extent;
  193. MinExtent = "8 2";
  194. canSave = "1";
  195. Visible = "1";
  196. tooltipprofile = "ToolsGuiToolTipProfile";
  197. tooltip = "";//%tooltip;
  198. text = %fieldDefaultVal;
  199. hovertime = "1000";
  200. ownerObject = %ownerObj;
  201. fieldName = %fieldName;
  202. };
  203. //set the field value
  204. if(getSubStr(%this.fieldName, 0, 1) $= "$")
  205. {
  206. if(%fieldName $= "")
  207. %editControl.setText(%fieldName);
  208. }
  209. else
  210. {
  211. //regular variable
  212. %setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");";
  213. eval(%setCommand);
  214. }
  215. %listCount = getTokenCount(%fieldDataVals, ",");
  216. for(%i=0; %i < %listCount; %i++)
  217. {
  218. %entryText = getToken(%fieldDataVals, ",", %i);
  219. %editControl.add(%entryText);
  220. }
  221. %fieldCtrl.setCaption(%fieldLabel);
  222. %fieldCtrl.setEditControl(%editControl);
  223. %this.addInspectorField(%fieldCtrl);
  224. }
  225. //
  226. // COMMON EDITOR SETTINGS
  227. //
  228. function ESettingsWindow::getAxisSettings(%this)
  229. {
  230. SettingsInspector.startGroup("Gizmo");
  231. SettingsInspector.addSettingsField("AxisGizmo/mouseRotateScalar", "Rotate Scalar", "float", "");
  232. SettingsInspector.addSettingsField("AxisGizmo/mouseScaleScalar", "Scale Scalar", "float", "");
  233. SettingsInspector.addSettingsField("AxisGizmo/renderWhenUsed", "Render When Manipulated", "bool", "");
  234. SettingsInspector.addSettingsField("AxisGizmo/renderInfoText", "Render Tool Text", "bool", "");
  235. SettingsInspector.endGroup();
  236. SettingsInspector.startGroup("Grid");
  237. SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlane", "Render Plane", "bool", "");
  238. SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlaneHashes", "Render Plane Hashes", "bool", "");
  239. SettingsInspector.addSettingsField("AxisGizmo/Grid/planeDim", "Plane Size", "float", "");
  240. SettingsInspector.addSettingsField("AxisGizmo/Grid/gridColor", "Plane Color", "colorI", "");
  241. SettingsInspector.endGroup();
  242. }
  243. function ESettingsWindow::getGeneralSettings(%this)
  244. {
  245. SettingsInspector.startGroup("Level Load");
  246. SettingsInspector.addSettingsField("WorldEditor/LevelLoad/LoadMode", "Editor Startup Scene", "list", "When the editor loads, this setting dictates what scene is loaded first",
  247. "Last Edited Level,Editor Default Scene");
  248. SettingsInspector.endGroup();
  249. SettingsInspector.startGroup("Autosave");
  250. SettingsInspector.addSettingsField("WorldEditor/AutosaveInterval", "Autosave Interval(in minutes)", "int", "");
  251. SettingsInspector.endGroup();
  252. SettingsInspector.startGroup("SubScenes");
  253. SettingsInspector.addSettingsField("WorldEditor/subSceneCreateScalar", "SubScene Creation Scalar", "float", "Amount to scale SubScene's bounds by when creating from scene objects.", "1.5");
  254. SettingsInspector.endGroup();
  255. SettingsInspector.startGroup("Paths");
  256. //SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
  257. SettingsInspector.endGroup();
  258. SettingsInspector.startGroup("Layout");
  259. /*SettingsInspector.addSettingsField("WorldEditor/Layout/LayoutMode", "Editor Layout Mode", "list", "This dictates which layout style the editor should use." @
  260. "WARNING - Modern layout is highlight experimental." @
  261. "Updating this requires a restart of the program", "Classic,Modern");*/
  262. SettingsInspector.endGroup();
  263. }
  264. function ESettingsWindow::getCameraSettings(%this)
  265. {
  266. SettingsInspector.startGroup("Mouse Control");
  267. SettingsInspector.addSettingsField("Camera/invertYAxis", "Invert Y Axis", "bool", "");
  268. SettingsInspector.addSettingsField("Camera/invertXAxis", "Invert X Axis", "bool", "");
  269. SettingsInspector.endGroup();
  270. //Based on currently loaded level(rootScene)
  271. SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
  272. SettingsInspector.addSettingsField("Camera/cameraMinSpeed", "Camera Speed Min", "float", "");
  273. SettingsInspector.addSettingsField("Camera/cameraMaxSpeed", "Camera Speed Max", "float", "");
  274. SettingsInspector.endGroup();
  275. }
  276. function ESettingsWindow::getNavEditorSettings(%this)
  277. {
  278. SettingsInspector.startGroup("Test Spawn");
  279. SettingsInspector.addSettingsField("NavEditor/SpawnClass", "Spawn Class", "list", "", "AIPlayer");
  280. SettingsInspector.addSettingsField("NavEditor/SpawnDatablock", "Datablock", "string", "");
  281. SettingsInspector.endGroup();
  282. SettingsInspector.startGroup("Colors");
  283. SettingsInspector.addSettingsField("NavEditor/HoverSplineColor", "Hover Spline", "colorI", "");
  284. SettingsInspector.addSettingsField("NavEditor/SelectedSplineColor", "Select Spline", "colorI", "");
  285. SettingsInspector.endGroup();
  286. }
  287. function ESettingsWindow::getSceneEditorSettings(%this)
  288. {
  289. SettingsInspector.startGroup("Render");
  290. SettingsInspector.addSettingsField("WorldEditor/Render/renderObjHandle", "Object Icons", "bool", "");
  291. SettingsInspector.addSettingsField("WorldEditor/Render/renderObjText", "Object Text", "bool", "");
  292. SettingsInspector.addSettingsField("WorldEditor/Render/showMousePopupInfo", "Mouse Popup Info", "bool", "");
  293. SettingsInspector.addSettingsField("WorldEditor/Render/renderPopupBackground", "Popup Menu Background", "bool", "");
  294. SettingsInspector.endGroup();
  295. SettingsInspector.startGroup("Colors");
  296. SettingsInspector.addSettingsField("WorldEditor/Grid/gridColor", "Grid Major", "colorI", "");
  297. SettingsInspector.addSettingsField("WorldEditor/Grid/gridMinorColor", "Grid Minor", "colorI", "");
  298. SettingsInspector.addSettingsField("WorldEditor/Grid/gridOriginColor", "Grid Origin", "colorI", "");
  299. SettingsInspector.addSettingsField("WorldEditor/Color/dragRectColor", "Drag Rect", "colorI", "");
  300. SettingsInspector.addSettingsField("WorldEditor/Color/objectTextColor", "Object Text", "colorI", "");
  301. SettingsInspector.addSettingsField("WorldEditor/Color/popupTextColor", "Popup Text", "colorI", "");
  302. SettingsInspector.addSettingsField("WorldEditor/Color/popupBackgroundColor", "Popup Back", "colorI", "");
  303. SettingsInspector.endGroup();
  304. SettingsInspector.startGroup("Misc");
  305. //SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
  306. SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Screen Center Scalar", "string", "");
  307. SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Screen Center Max", "string", "");
  308. SettingsInspector.endGroup();
  309. SettingsInspector.startGroup("Layout");
  310. SettingsInspector.addSettingsField("WorldEditor/forceSidebarToSide", "Force Sidebar Window(s) to side", "bool", "1");
  311. SettingsInspector.endGroup();
  312. SettingsInspector.startGroup("Behavior");
  313. SettingsInspector.addSettingsField("WorldEditor/Tools/snapGround", "Snap Objects to Ground", "bool", "0");
  314. SettingsInspector.addSettingsField("WorldEditor/Tools/TerrainSnapOffsetZ", "Add Offset of Terrain Snapping on Z Axis", "bool", "0");
  315. SettingsInspector.addSettingsField("WorldEditor/Tools/OffsetZValue", "Offset Z Value", "float", "0.01");
  316. SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoft", "Do Soft Snap", "bool", "0");
  317. SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoftSize", "Soft Snap Size", "bool", "2");
  318. SettingsInspector.addSettingsField("WorldEditor/Tools/boundingBoxCollision", "Use Bounding Box for Collision", "bool", "0");
  319. SettingsInspector.addSettingsField("WorldEditor/Tools/objectsUseBoxCenter", "Objects Use Box Center", "bool", "1");
  320. SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Drop at Sceen Center Scalar", "bool", "1");
  321. SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Drop at Screen Center Max Dist.", "float", "100");
  322. SettingsInspector.addSettingsField("WorldEditor/Tools/UseGroupCenter", "Use Group Center when snapping", "bool", "0");
  323. SettingsInspector.endGroup();
  324. SettingsInspector.startGroup("Images");
  325. SettingsInspector.addSettingsField("WorldEditor/Images/defaultHandle", "Default Handle Image", "string", "");
  326. SettingsInspector.addSettingsField("WorldEditor/Images/lockedHandle", "Locked Handle Image", "string", "");
  327. SettingsInspector.addSettingsField("WorldEditor/Images/selectHandle", "Selected Handle Image", "string", "");
  328. SettingsInspector.endGroup();
  329. }
  330. function ESettingsWindow::getShapeEditorSettings(%this)
  331. {
  332. SettingsInspector.startGroup("Colors");
  333. SettingsInspector.addSettingsField("ShapeEditor/SunDiffuseColor", "Sun Diffuse", "colorI", "");
  334. SettingsInspector.addSettingsField("ShapeEditor/SunAmbientColor", "Sun Ambient", "colorI", "");
  335. SettingsInspector.addSettingsField("ShapeEditor/BackgroundColor", "Background", "colorI", "");
  336. SettingsInspector.endGroup();
  337. SettingsInspector.startGroup("Grid");
  338. SettingsInspector.addSettingsField("ShapeEditor/GridSize", "Grid Size", "float", "");
  339. SettingsInspector.addSettingsField("ShapeEditor/GridDimension", "Grid Dimension", "vector2", "");
  340. SettingsInspector.endGroup();
  341. }
  342. function ESettingsWindow::getThemeSettings(%this)
  343. {
  344. SettingsInspector.startGroup("Colors");
  345. SettingsInspector.addSettingsField("Theme/headerColor", "Headerbar Color", "ColorI", "");
  346. SettingsInspector.addSettingsField("Theme/windowBackgroundColor", "Window Background Color", "ColorI", "");
  347. SettingsInspector.addSettingsField("Theme/tabsColor", "Tabs Color", "ColorI", "");
  348. SettingsInspector.addSettingsField("Theme/tabsHLColor", "Tabs Highlight Color", "ColorI", "");
  349. SettingsInspector.addSettingsField("Theme/tabsSELColor", "Tabs Selected Color", "ColorI", "");
  350. SettingsInspector.addSettingsField("Theme/dividerDarkColor", "Divider Dark Color", "ColorI", "");
  351. SettingsInspector.addSettingsField("Theme/dividerMidColor", "Divider Mid Color", "ColorI", "");
  352. SettingsInspector.addSettingsField("Theme/dividerLightColor", "Divider Light Color", "ColorI", "");
  353. SettingsInspector.addSettingsField("Theme/headerTextColor", "Header Text Color", "ColorI", "");
  354. SettingsInspector.addSettingsField("Theme/fieldTextColor", "Field Text Color", "ColorI", "");
  355. SettingsInspector.addSettingsField("Theme/fieldTextHLColor", "Field Text Highlight Color", "ColorI", "");
  356. SettingsInspector.addSettingsField("Theme/fieldTextSELColor", "Field Text Selected Color", "ColorI", "");
  357. SettingsInspector.addSettingsField("Theme/fieldTextNAColor", "Field Text N/A Color", "ColorI", "");
  358. SettingsInspector.addSettingsField("Theme/fieldBGColor", "Field Background Color", "ColorI", "");
  359. SettingsInspector.addSettingsField("Theme/fieldBGHLColor", "Field Background Highlight Color", "ColorI", "");
  360. SettingsInspector.addSettingsField("Theme/fieldBGSELColor", "Field Background Selected Color", "ColorI", "");
  361. SettingsInspector.addSettingsField("Theme/tooltipBGColor", "Tooltip Background Color", "ColorI", "");
  362. SettingsInspector.addSettingsField("Theme/tooltipTextColor", "Tooltip Text Highlight Color", "ColorI", "");
  363. SettingsInspector.addSettingsField("Theme/tooltipDivColor", "Tooltip Divider Color", "ColorI", "");
  364. SettingsInspector.endGroup();
  365. }
  366. function ESettingsWindow::getPostFXSettings(%this)
  367. {
  368. SettingsInspector.startGroup("Post Effects");
  369. SettingsInspector.addField("Edit Default PostFX", "Edit Default PostFX Config", "button", "Edit Default PostFX Config", "", "PostFXEditor.editDefaultPostFXSettings();");
  370. SettingsInspector.endGroup();
  371. }
  372. function ESettingsWindow::getObjectEditorSettings(%this)
  373. {
  374. }
  375. //
  376. // COMMON GAME SETTINGS
  377. //
  378. function ESettingsWindow::getGameGeneralSettings(%this)
  379. {
  380. SettingsInspector.startGroup("General");
  381. SettingsInspector.addSettingsField("General/ProjectName", "Project Name", "string", "");
  382. SettingsInspector.addSettingsField("General/LightingMode", "Lighting Mode", "list", "Dictates the lighting mode the project uses", "Deferred,Forward");
  383. SettingsInspector.endGroup();
  384. }
  385. function ESettingsWindow::getPathsSettings(%this)
  386. {
  387. SettingsInspector.startGroup("Paths");
  388. SettingsInspector.addSettingsField("Paths/splashImagePath", "Splash Image", "filename", "");
  389. SettingsInspector.addSettingsField("Paths/iconImagePath", "Icon Image", "filename", "");
  390. SettingsInspector.addSettingsField("Paths/missingTexturePath", "Missing Texture Image", "filename", "");
  391. SettingsInspector.addSettingsField("Paths/noMaterialPath", "No Material Image", "filename", "");
  392. SettingsInspector.addSettingsField("Paths/errorMaterialMath", "Error Material Image", "filename", "");
  393. SettingsInspector.endGroup();
  394. }
  395. function ESettingsWindow::getUISettings(%this)
  396. {
  397. SettingsInspector.startGroup("UI");
  398. SettingsInspector.addSettingsField("UI/playGUIName", "Play GUI Name", "string", "");
  399. SettingsInspector.addSettingsField("UI/mainMenuName", "Main Menu GUI Name", "string", "");
  400. SettingsInspector.endGroup();
  401. }
  402. function ESettingsWindow::getGameplaySettings(%this)
  403. {
  404. SettingsInspector.startGroup("Game Modes");
  405. SettingsInspector.addSettingsField("Gameplay/GameModes/defaultModeName", "Default Gamemode Name", "string", "");
  406. SettingsInspector.endGroup();
  407. }
  408. function ESettingsWindow::getGameOptionsSettings(%this)
  409. {
  410. SettingsInspector.startGroup("Options Settings");
  411. SettingsInspector.addSettingsField("Options/optionsList", "OptionsList", "OptionsSetting", "");
  412. SettingsInspector.endGroup();
  413. }