Torque3D/Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript
JeffR d044ae0702 Removed unneeded default irradiance and prefilter cubemaps, and their convars
Added getGUIPath console function to guiAsset
Corrected console function documentation for getScriptPath in MaterialAsset
Added getter console functions to PostEffectAsset
Added getAnimationPath console function to PostEffectAsset
Fixes handling of mapto with the reskin usage when generating preview renders for ShapeAssets
Standardizes getShapeFile to getShapePath on ShapeAsset to better match formatting of other getters on assets
Adds sanity checking for getStringWidth to prevent crash if there's an issue with the font being ready at time of request(from Az)
Earlies out on rendering of impostors if it's the deferred bin to prevent unneeded duplicate rendering messing up results(from Az)
Fixed duplicate naming of quality levels on LightingQualityList
Added check so if _makePrettyResString is handed a 'human formatted' resolution string(as in, has <width> x <height> it can handle that properly
Shifted yes/no and on/off option lists to globals for ease and consistency of handling on options menu
Improves check for unapplied graphics options on options menu and applies them all at once
Add sanitizing of variable names so getVariable doesn't have issues when looking up array variables in optionsMenu logic
Adds better tracking of what options menu category is shown so refreshes don't reset it
Add better handling for changing resolution in options menu and getting it to apply properly
Adds better utility functions for setting bools vs optionsLists vs quality lists and updates options fields to use the most appropriate
Removes redundant setting of $pref::SFX::channelVolume vars in defaults.tscript
Removed unneeded extra logging from asset browser drag-n-drop actions
Adds item to RMB context menu in AB to regenerate preview images
Fixes move command for asset types(needed to properly reference the full path of the associated files) and added it for shapes, animations and terrains
Added logic so when the dropdown for selecting a target module on the Create New Asset window is changed, it forcefully updates the target path to point to the module to avoid erroneous paths being provided
Adds proper clamping of values to Forest Editor's brush size in the editor bar. Could be set to below 1 even though it would visually clamp to 1.
Temporarily disables fields and handling of 'open in Torsion'.
Fixes bad pixel in gui/images/tab_border.png which was causing it to fail to generate bitmap array properly
Makes the New GUI option from menubar in GUI Editor use same Create New Asset method as everything else
Disables access to the CubemapDesc reflector field in the material editor as it's not nominally used now in favor of probes
Adds proper loading of roughness and metalness fields in material editor
Fixes the default ReflectProbePreviewMat to use a better base DiffuseMap (No Material) rather than the occluder
Fixes disable display for some options in the advanced panel in the shape editor so they look more fitting to everything else
Adds check to avoid spam of markItem errors in the event requested tree item is invalid
Fixed remove material button and command in TerrainMaterial Editor
2022-04-03 20:00:30 -05:00

567 lines
26 KiB
Plaintext

//-----------------------------------------------------------------------------
// Copyright (c) 2012 GarageGames, LLC
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
function ESettingsWindow::startup( %this )
{
new ArrayObject(EditorSettingsPageList);
new ArrayObject(GameSettingsPageList);
%this.addEditorSettingsPage("Axis", "Axis Gizmo");
%this.addEditorSettingsPage("General", "General Settings");
%this.addEditorSettingsPage("Camera", "Camera Settings");
%this.addEditorSettingsPage("SceneEditor", "Scene Editor");
%this.addEditorSettingsPage("ShapeEditor", "Shape Editor");
%this.addEditorSettingsPage("NavEditor", "Navigation Editor");
%this.addEditorSettingsPage("Theme", "Theme");
%this.addEditorSettingsPage("AssetEditing", "Asset Editing");
%this.addEditorSettingsPage("PostFX", "Post Effects");
%this.addGameSettingsPage("GameGeneral", "General");
%this.addGameSettingsPage("Gameplay", "Gameplay");
%this.addGameSettingsPage("Paths", "Paths");
%this.addGameSettingsPage("UI", "UI");
%this.addGameSettingsPage("LevelDefaults", "Level Defaults");
%this.addGameSettingsPage("GameOptions", "Game Options");
%this.addGameSettingsPage("AssetManagement", "Asset Management");
%this.mode = "Editor";
}
function ESettingsWindow::onWake( %this )
{
}
function ESettingsWindow::hideDialog( %this )
{
Canvas.popDialog(EditorSettingsWindow);
}
function ESettingsWindow::ToggleVisibility()
{
if(ESettingsWindow.isAwake())
{
Canvas.popDialog(EditorSettingsWindow);
}
else
{
Canvas.pushDialog(EditorSettingsWindow);
ESettingsWindow.selectWindow();
ESettingsWindow.setCollapseGroup(false);
ESettingsWindowList.clear();
ESettingsWindowList.setSelectedById( 1 );
}
}
function ESettingsWindow::toggleProjectSettings(%this)
{
%this.ToggleVisibility();
%count = GameSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = GameSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
ESettingsWindowList.sort(0);
%this.mode = "Project";
ESettingsWindow.text = "Game Project Settings";
ESettingsWindowList.setSelectedById( 1 );
}
function ESettingsWindow::toggleEditorSettings(%this)
{
%this.ToggleVisibility();
%count = EditorSettingsPageList.count();
for(%i=0; %i < %count; %i++)
{
%settingsPageText = EditorSettingsPageList.getValue(%i);
ESettingsWindowList.addRow( %i, %settingsPageText );
}
ESettingsWindowList.sort(0);
%this.mode = "Editor";
ESettingsWindow.text = "Editor Settings";
ESettingsWindowList.setSelectedById( 1 );
}
function ESettingsWindow::addEditorSettingsPage(%this, %settingsPageName, %settingsPageText)
{
EditorSettingsPageList.add(%settingsPageName, %settingsPageText);
}
function ESettingsWindow::addGameSettingsPage(%this, %settingsPageName, %settingsPageText)
{
GameSettingsPageList.add(%settingsPageName, %settingsPageText);
}
function ESettingsWindow::refresh(%this)
{
if(ESettingsWindow.selectedPageId !$= "")
{
ESettingsWindowList.setSelectedById( ESettingsWindow.selectedPageId );
}
else
{
ESettingsWindowList.setSelectedById( 1 );
}
}
//-----------------------------------------------------------------------------
function ESettingsWindowList::onSelect( %this, %id, %text )
{
SettingsInspector.clearFields();
if(ESettingsWindow.mode $= "Editor")
%pageName = EditorSettingsPageList.getKey(EditorSettingsPageList.getIndexFromValue(%text));
else
%pageName = GameSettingsPageList.getKey(GameSettingsPageList.getIndexFromValue(%text));
eval("ESettingsWindow.get" @ %pageName @ "Settings();");
ESettingsWindow.selectedPageId = %id;
ESettingsWindow.selectedPageText = %text;
}
//Read/write field functions
function SettingsInspector::addSettingsField(%this, %settingsFieldName, %labelText, %fieldType, %tooltip, %fieldData)
{
%moddedSettingsFieldName = strreplace(%settingsFieldName, "/", "-");
if(ESettingsWindow.mode $= "Editor")
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", EditorSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
else
%this.addCallbackField(%moddedSettingsFieldName, %labelText, %fieldType, "", ProjectSettings.value(%settingsFieldName), %fieldData, "changeEditorSetting");
}
function SettingsInspector::changeEditorSetting(%this, %varName, %value)
{
%varName = strreplace(%varName, "-", "/");
if(%value !$= "" && (fileExt(%value) !$= "" || IsDirectory(%value)))
{
%value = makeFullPath(%value);
}
//echo("Set " @ %varName @ " to be " @ %value);
if(ESettingsWindow.mode $= "Editor")
%oldValue = EditorSettings.value(%varName);
else
%oldValue = ProjectSettings.value(%varName);
if(ESettingsWindow.mode $= "Editor")
EditorSettings.setValue(%varName, %value);
else
ProjectSettings.setValue(%varName, %value);
if(ESettingsWindow.mode $= "Editor")
{
%success = EditorSettings.write();
//Bit of a hack, but if we were editing the theme, reexec the profiles for GUI
if(ESettingsWindow.selectedPageText $= "Theme")
exec("tools/gui/profiles.ed." @ $TorqueScriptFileExtension);
}
else
%success = ProjectSettings.write();
if(%oldValue !$= %value)
ESettingsWindow.schedule(15,"refresh");
}
function GuiInspectorVariableGroup::buildOptionsSettingField(%this, %fieldName, %fieldLabel, %fieldDesc, %fieldDefaultVal, %fieldDataVals, %ownerObj)
{
%extent = 200;
%fieldCtrl = %this.createInspectorField();
%fieldCtrl.setHeightOverride(true, 200);
%extent = %this.stack.getExtent();
%width = mRound(%extent/2);
%height = 20;
%inset = 10;
%editControl = new GuiPopUpMenuCtrl() {
class = "guiInspectorListField";
maxPopupHeight = "200";
sbUsesNAColor = "0";
reverseTextList = "0";
bitmapBounds = "16 16";
maxLength = "1024";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
isContainer = "0";
Profile = "ToolsGuiPopUpMenuProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = %fieldCtrl.edit.position;
Extent = %fieldCtrl.edit.extent;
MinExtent = "8 2";
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
tooltip = "";//%tooltip;
text = %fieldDefaultVal;
hovertime = "1000";
ownerObject = %ownerObj;
fieldName = %fieldName;
};
//set the field value
if(getSubStr(%this.fieldName, 0, 1) $= "$")
{
if(%fieldName $= "")
%editControl.setText(%fieldName);
}
else
{
//regular variable
%setCommand = %editControl @ ".setText(" @ %ownerObj @ "." @ %fieldName @ ");";
eval(%setCommand);
}
%listCount = getTokenCount(%fieldDataVals, ",");
for(%i=0; %i < %listCount; %i++)
{
%entryText = getToken(%fieldDataVals, ",", %i);
%editControl.add(%entryText);
}
%fieldCtrl.setCaption(%fieldLabel);
%fieldCtrl.setEditControl(%editControl);
%this.addInspectorField(%fieldCtrl);
}
//
// COMMON EDITOR SETTINGS
//
function ESettingsWindow::getAxisSettings(%this)
{
SettingsInspector.startGroup("Gizmo");
SettingsInspector.addSettingsField("AxisGizmo/mouseRotateScalar", "Rotate Scalar", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/mouseScaleScalar", "Scale Scalar", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/renderWhenUsed", "Render When Manipulated", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/renderInfoText", "Render Tool Text", "bool", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Grid");
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlane", "Render Plane", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/renderPlaneHashes", "Render Plane Hashes", "bool", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/planeDim", "Plane Size", "float", "");
SettingsInspector.addSettingsField("AxisGizmo/Grid/gridColor", "Plane Color", "colorI", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGeneralSettings(%this)
{
SettingsInspector.startGroup("Level Load");
SettingsInspector.addSettingsField("WorldEditor/LevelLoad/LoadMode", "Editor Startup Scene", "list", "When the editor loads, this setting dictates what scene is loaded first",
"Last Edited Level,Editor Default Scene");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Autosave");
SettingsInspector.addSettingsField("WorldEditor/AutosaveInterval", "Autosave Interval(in minutes)", "int", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Paths");
//SettingsInspector.addSettingsField("WorldEditor/torsionPath", "Torsion Path", "filename", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Theme");
SettingsInspector.addSettingsField("WorldEditor/Theme/backgroundColor", "Background Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleBGColor", "Window Title Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/windowTitleFontColor", "Window Title Text Color", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Theme/mainTextColor", "Main Text Color", "colorI", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Layout");
/*SettingsInspector.addSettingsField("WorldEditor/Layout/LayoutMode", "Editor Layout Mode", "list", "This dictates which layout style the editor should use." @
"WARNING - Modern layout is highlight experimental." @
"Updating this requires a restart of the program", "Classic,Modern");*/
SettingsInspector.endGroup();
}
function ESettingsWindow::getCameraSettings(%this)
{
SettingsInspector.startGroup("Mouse Control");
SettingsInspector.addSettingsField("Camera/invertYAxis", "Invert Y Axis", "bool", "");
SettingsInspector.addSettingsField("Camera/invertXAxis", "Invert X Axis", "bool", "");
SettingsInspector.endGroup();
//Based on currently loaded level(rootScene)
SettingsInspector.startGroup(EditorSettings.value("WorldEditor/newLevelFile") @ " Camera");
SettingsInspector.addSettingsField("Camera/cameraMinSpeed", "Camera Speed Min", "float", "");
SettingsInspector.addSettingsField("Camera/cameraMaxSpeed", "Camera Speed Max", "200", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getNavEditorSettings(%this)
{
SettingsInspector.startGroup("Test Spawn");
SettingsInspector.addSettingsField("NavEditor/SpawnClass", "Spawn Class", "list", "", "AIPlayer");
SettingsInspector.addSettingsField("NavEditor/SpawnDatablock", "Datablock", "string", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("NavEditor/HoverSplineColor", "Hover Spline", "colorI", "");
SettingsInspector.addSettingsField("NavEditor/SelectedSplineColor", "Select Spline", "colorI", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getSceneEditorSettings(%this)
{
SettingsInspector.startGroup("Render");
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjHandle", "Object Icons", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/renderObjText", "Object Text", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/showMousePopupInfo", "Mouse Popup Info", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/Render/renderPopupBackground", "Popup Menu Background", "bool", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridColor", "Grid Major", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridMinorColor", "Grid Minor", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Grid/gridOriginColor", "Grid Origin", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/dragRectColor", "Drag Rect", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/objectTextColor", "Object Text", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/popupTextColor", "Popup Text", "colorI", "");
SettingsInspector.addSettingsField("WorldEditor/Color/popupBackgroundColor", "Popup Back", "colorI", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Misc");
//SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
SettingsInspector.addSettingsField("WorldEditor/forceLoadDAE", "Force Load DAE", "bool", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Layout");
SettingsInspector.addSettingsField("WorldEditor/forceSidebarToSide", "Force Sidebar Window(s) to side", "bool", "1");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Behavior");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapGround", "Snap Objects to Ground", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/TerrainSnapOffsetZ", "Add Offset of Terrain Snapping on Z Axis", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/OffsetZValue", "Offset Z Value", "float", "0.01");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoft", "Do Soft Snap", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/snapSoftSize", "Soft Snap Size", "bool", "2");
SettingsInspector.addSettingsField("WorldEditor/Tools/boundingBoxCollision", "Use Bounding Box for Collision", "bool", "0");
SettingsInspector.addSettingsField("WorldEditor/Tools/objectsUseBoxCenter", "Objects Use Box Center", "bool", "1");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterScalar", "Drop at Sceen Center Scalar", "bool", "1");
SettingsInspector.addSettingsField("WorldEditor/Tools/dropAtScreenCenterMax", "Drop at Screen Center Max Dist.", "float", "100");
SettingsInspector.addSettingsField("WorldEditor/Tools/UseGroupCenter", "Use Group Center when snapping", "bool", "0");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Images");
SettingsInspector.addSettingsField("WorldEditor/Images/defaultHandle", "Default Handle Image", "string", "");
SettingsInspector.addSettingsField("WorldEditor/Images/lockedHandle", "Locked Handle Image", "string", "");
SettingsInspector.addSettingsField("WorldEditor/Images/selectHandle", "Selected Handle Image", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getShapeEditorSettings(%this)
{
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("ShapeEditor/SunDiffuseColor", "Sun Diffuse", "colorI", "");
SettingsInspector.addSettingsField("ShapeEditor/SunAmbientColor", "Sun Ambient", "colorI", "");
SettingsInspector.addSettingsField("ShapeEditor/BackgroundColor", "Background", "colorI", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Grid");
SettingsInspector.addSettingsField("ShapeEditor/GridSize", "Grid Size", "float", "");
SettingsInspector.addSettingsField("ShapeEditor/GridDimension", "Grid Dimension", "vector2", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getThemeSettings(%this)
{
SettingsInspector.startGroup("Colors");
SettingsInspector.addSettingsField("Theme/headerColor", "Headerbar Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/windowBackgroundColor", "Window Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsColor", "Tabs Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsHLColor", "Tabs Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tabsSELColor", "Tabs Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerDarkColor", "Divider Dark Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerMidColor", "Divider Mid Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/dividerLightColor", "Divider Light Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/headerTextColor", "Header Text Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextColor", "Field Text Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextHLColor", "Field Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextSELColor", "Field Text Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldTextNAColor", "Field Text N/A Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGColor", "Field Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGHLColor", "Field Background Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/fieldBGSELColor", "Field Background Selected Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipBGColor", "Tooltip Background Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipTextColor", "Tooltip Text Highlight Color", "ColorI", "");
SettingsInspector.addSettingsField("Theme/tooltipDivColor", "Tooltip Divider Color", "ColorI", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getPostFXSettings(%this)
{
SettingsInspector.startGroup("Post Effects");
SettingsInspector.addField("Edit Default PostFX", "Edit Default PostFX Config", "button", "Edit Default PostFX Config", "", "PostFXEditor.editDefaultPostFXSettings();");
SettingsInspector.endGroup();
}
//
// COMMON GAME SETTINGS
//
function ESettingsWindow::getGameGeneralSettings(%this)
{
SettingsInspector.startGroup("General");
SettingsInspector.addSettingsField("General/ProjectName", "Project Name", "string", "");
SettingsInspector.addSettingsField("General/LightingMode", "Lighting Mode", "list", "Dictates the lighting mode the project uses", "Deferred,Forward");
SettingsInspector.endGroup();
}
function ESettingsWindow::getPathsSettings(%this)
{
SettingsInspector.startGroup("Paths");
SettingsInspector.addSettingsField("Paths/splashImagePath", "Splash Image", "filename", "");
SettingsInspector.addSettingsField("Paths/iconImagePath", "Icon Image", "filename", "");
SettingsInspector.addSettingsField("Paths/missingTexturePath", "Missing Texture Image", "filename", "");
SettingsInspector.addSettingsField("Paths/noMaterialPath", "No Material Image", "filename", "");
SettingsInspector.addSettingsField("Paths/errorMaterialMath", "Error Material Image", "filename", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getUISettings(%this)
{
SettingsInspector.startGroup("UI");
SettingsInspector.addSettingsField("UI/playGUIName", "Play GUI Name", "string", "");
SettingsInspector.addSettingsField("UI/mainMenuName", "Main Menu GUI Name", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getAssetManagementSettings(%this)
{
SettingsInspector.startGroup("Modules");
SettingsInspector.addSettingsField("AssetManagement/Modules/coreModulePath", "Core Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/gameDataModulePath", "Game Data Module Path", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Modules/moduleExtension", "Module Extension", "string", "");
%moduleList = ModuleDatabase.findModules(true);
%moduleList = strreplace(%moduleList, " ", ",");
SettingsInspector.addSettingsField("AssetManagement/Modules/DefaultModule", "Default Module", "list", %moduleList);
SettingsInspector.endGroup();
SettingsInspector.startGroup("Assets");
SettingsInspector.addSettingsField("AssetManagement/Assets/assetExtension", "Asset Extension", "string", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/datablockCaching", "Cache Datablocks", "bool", "");
//SettingsInspector.addSettingsField("AssetManagement/Assets/moduleExtension", "Module Extension", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getAssetEditingSettings(%this)
{
ImportAssetWindow::reloadImportOptionConfigs();
//First, get our list of modules
%moduleList = ModuleDatabase.findModules();
%formattedModuleList = "";
%count = getWordCount(%moduleList);
for(%i=0; %i < %count; %i++)
{
%module = getWord(%moduleList, %i);
if(%module.group !$= "Tools" && %module.group !$= "Core")
{
if(%formattedModuleList $= "")
%formattedModuleList = %module.moduleId;
else
%formattedModuleList = %formattedModuleList @ "," @ %module.moduleId;
}
}
SettingsInspector.startGroup("Asset Creation");
SettingsInspector.addSettingsField("Assets/New/defaultModule", "Default Module", "list", "Default Module for new assets to be created into", %formattedModuleList);
SettingsInspector.addSettingsField("Assets/New/alwaysPromptModuleTarget", "Always Prompt Target Module", "bool", "If off, use the default module");
SettingsInspector.endGroup();
%formattedConfigList = "";
for(%i=0; %i < ImportAssetWindow.importConfigsList.Count(); %i++)
{
%configName = ImportAssetWindow.importConfigsList.getKey(%i);
%formattedConfigList = %i == 0 ? %configName : %formattedConfigList @ "," @ %configName;
}
SettingsInspector.startGroup("Assets Importing");
SettingsInspector.addField("Edit Import Configs", "Edit Asset Import Configs", "button", "Open Asset Import Config Editor", "", "Canvas.pushDialog(AssetImportConfigEditor);");
SettingsInspector.addSettingsField("Assets/AssetImporDefaultConfig", "Default Asset Import Config", "list", "", %formattedConfigList);
SettingsInspector.addSettingsField("Assets/AutoImport", "Automatically Import using default config", "bool", "If on, the asset importing process" @
"will attempt to automatically import any inbound assets"@
"using the default config, without prompting the import window."@
"The window will still display if any issues are detected", "");
SettingsInspector.addSettingsField("Assets/AutoImportLooseFiles", "Automatically Import Loose Files", "bool", "If on, will automatically import unassociated loose files in assets when navigating the Asset Browser.", "");
SettingsInspector.endGroup();
SettingsInspector.startGroup("Asset Browser");
SettingsInspector.addSettingsField("Assets/Browser/showCoreModule", "Show Core Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showToolsModule", "Show Tools Module in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showOnlyPopulatedModule", "Show Only Modules with Assets in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showFolders", "Show Folders in Tiles view in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showEmptyFolders", "Show Empty Folders in Tiles view in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/showLooseFiles", "Show Loose Files when viewing in Asset Browser", "bool", "");
SettingsInspector.addSettingsField("AssetManagement/Assets/promptOnRename", "Prompt on Rename", "bool", "");
SettingsInspector.addSettingsField("Assets/Browser/doubleClickAction", "Double Click Action", "list", "Dictates what sort of action double clicking on an asset in the Browser will invoke", "Edit Asset,Spawn Asset");
SettingsInspector.addSettingsField("AssetManagement/Assets/closeBrowserOnDragAction", "Close Browser on Drag Action", "bool", "If on, the Asset Browser will automatically close after dragging an asset from it to the editor interface.");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGameplaySettings(%this)
{
SettingsInspector.startGroup("Game Modes");
SettingsInspector.addSettingsField("Gameplay/GameModes/defaultModeName", "Default Gamemode Name", "string", "");
SettingsInspector.endGroup();
}
function ESettingsWindow::getGameOptionsSettings(%this)
{
SettingsInspector.startGroup("Options Settings");
SettingsInspector.addSettingsField("Options/optionsList", "OptionsList", "OptionsSetting", "");
SettingsInspector.endGroup();
}