Merge pull request #808 from Areloch/MiscFixes20220605

Misc Fixes 2022/06/05
This commit is contained in:
Brian Roberts 2022-06-05 16:28:05 -05:00 committed by GitHub
commit 82119ea2df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 3 deletions

View file

@ -75,7 +75,8 @@ function UINavigation::pushPage(%this, %newPage, %callback)
}
//don't re-add pages
if(%this.pageStack.getIndexFromKey(%newPage) != -1)
if(%this.pageStack.getPageCount() != 0 &&
%this.pageStack.getIndexFromKey(%newPage) != -1)
return;
%canChange = true;

View file

@ -5,9 +5,9 @@ function AssetBrowser::setupCreateNewTerrainAsset(%this)
NewAssetPropertiesInspector.addField("genWithNoise", "Generate Terrain With Noise", "bool", "Is this script used on the server?", "0", "2", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
NewAssetPropertiesInspector.startGroup("Terrain - Import");
/*NewAssetPropertiesInspector.startGroup("Terrain - Import");
NewAssetPropertiesInspector.addField("importDetails", "Import Heightmap", "button", "Import an existing heightmap", "", "Canvas.pushDialog( TerrainImportGui );", %this.newAssetSettings);
NewAssetPropertiesInspector.endGroup();
NewAssetPropertiesInspector.endGroup();*/
}
function AssetBrowser::createTerrainAsset(%this)

View file

@ -153,6 +153,14 @@ function TerrainMaterialDlg::dialogApply( %this )
{
// Move all new materials we have created to the root group.
if(%this-->diffuseMapAssetId.text $= "None" ||
%this-->detailMapAssetId.text $= "None")
{
toolsMessageBoxOK("Invalid Terrain Material",
"Terrain Materials require Diffuse and Detail textures to display and blend correctly.");
return;
}
%newCount = TerrainMaterialDlgNewGroup.getCount();
for( %i = 0; %i < %newCount; %i ++ )
RootGroup.add( TerrainMaterialDlgNewGroup.getObject( %i ) );