mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Merge remote-tracking branch 'devhead/Preview4_0' into tsneo
# Conflicts: # Engine/source/platform/types.visualc.h # Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript # Templates/BaseGame/game/tools/assetBrowser/scripts/assetTypes/terrain.tscript # Templates/BaseGame/game/tools/gui/editorSettingsWindow.ed.tscript # Templates/BaseGame/game/tools/gui/scriptEditorDlg.ed.gui
This commit is contained in:
commit
17231ca9fb
51 changed files with 736 additions and 488 deletions
|
|
@ -33,6 +33,29 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
|
||||
new GuiStackControl(EditorGuiToolbarStack) {
|
||||
stackingType = "Horizontal";
|
||||
horizStacking = "Left to Right";
|
||||
vertStacking = "Top to Bottom";
|
||||
padding = "0";
|
||||
dynamicSize = "1";
|
||||
dynamicNonStackExtent = "0";
|
||||
dynamicPos = "0";
|
||||
changeChildSizeToFit = "0";
|
||||
changeChildPosition = "1";
|
||||
position = "0 0";
|
||||
extent = "885 32";
|
||||
minExtent = "16 16";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl(EHWorldEditor) {
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -107,6 +130,76 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
BitmapAsset = "ToolsModule:settings_n_image";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
masked = "0";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "572 0";
|
||||
extent = "29 27";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "ToolsGuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "ESettingsWindow.toggleEditorSettings();";
|
||||
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||
tooltip = "Open Editor Settings";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "editorSettingsBtn";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
Enabled = "1";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
position = "98 3";
|
||||
Extent = "2 26";
|
||||
MinExtent = "1 1";
|
||||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = AssetBrowserBtn;
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "180 0";
|
||||
Extent = "29 27";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "AssetBrowser.toggleDialog();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Asset Browser";
|
||||
hovertime = "750";
|
||||
bitmapAsset = "ToolsModule:menuGrid_n_image";
|
||||
bitmapMode = "Stretched";
|
||||
buttonType = "PushButton";
|
||||
groupNum = "0";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
Enabled = "1";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
position = "98 3";
|
||||
Extent = "2 26";
|
||||
MinExtent = "1 1";
|
||||
bitmapAsset = "ToolsModule:separator_h_image";
|
||||
};
|
||||
|
||||
new GuiBitmapButtonCtrl(EWorldEditorToggleCamera) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
|
|
@ -306,6 +399,7 @@ $guiContent = new GuiContainer(EditorGui,EditorGuiGroup) {
|
|||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -520,31 +520,6 @@ $guiContent = new GuiControl(EWorldEditorToolbar, EditorGuiGroup) {
|
|||
useMouseEvents = "0";
|
||||
};
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "0";
|
||||
internalName = "editorSettingsBtn";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
Position = "484 3";
|
||||
Extent = "29 27";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Variable = "";
|
||||
Command = "ESettingsWindow.toggleEditorSettings();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Open Editor Settings";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "ToolsModule:settings_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
|
||||
new GuiContainer(objectCenterDropdown){
|
||||
Profile = "IconDropdownProfile";
|
||||
Position = getWord(EWorldEditorToolbar.position, 0)+getWord(ToggleButtonBar.Position, 0)+getWord(EWorldEditorToolbar-->centerObject.position, 0)-5 SPC getWord(EditorGuiToolbar.extent, 1)-1;
|
||||
|
|
|
|||
|
|
@ -91,10 +91,10 @@ function EditorGui::init(%this)
|
|||
{
|
||||
// Load Creator/Inspector GUI
|
||||
exec("~/worldEditor/gui/WorldEditorToolbar.ed.gui");
|
||||
if( isObject( EWorldEditorToolbar ) )
|
||||
if( isObject( EditorGuiToolbarStack ) )
|
||||
{
|
||||
%this.add( EWorldEditorToolbar );
|
||||
EWorldEditorToolbar.setVisible( false );
|
||||
EditorGuiToolbarStack.add( EWorldEditorToolbar );
|
||||
//EWorldEditorToolbar.setVisible( false );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -102,11 +102,11 @@ function EditorGui::init(%this)
|
|||
{
|
||||
// Load Terrain Edit GUI
|
||||
exec("~/worldEditor/gui/TerrainEditToolbar.ed.gui");
|
||||
if( isObject( EWTerrainEditToolbar ) )
|
||||
/*if( isObject( EWTerrainEditToolbar ) )
|
||||
{
|
||||
%this.add( EWTerrainEditToolbar );
|
||||
EWTerrainEditToolbar.setVisible( false );
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if( !isObject( %this-->TerrainPainter ) )
|
||||
|
|
@ -126,11 +126,11 @@ function EditorGui::init(%this)
|
|||
{
|
||||
// Load Terrain Edit GUI
|
||||
exec("~/worldEditor/gui/TerrainPainterToolbar.ed.gui");
|
||||
if( isObject( EWTerrainPainterToolbar ) )
|
||||
/*if( isObject( EWTerrainPainterToolbar ) )
|
||||
{
|
||||
%this.add( EWTerrainPainterToolbar );
|
||||
EWTerrainPainterToolbar.setVisible( false );
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
if( !isObject( %this-->ToolsToolbar ) )
|
||||
|
|
@ -1082,7 +1082,9 @@ function TerrainEditorPlugin::onActivated( %this )
|
|||
ETerrainEditor.attachTerrain();
|
||||
ETerrainEditor.makeFirstResponder( true );
|
||||
|
||||
EWTerrainEditToolbar.setVisible( true );
|
||||
EditorGuiToolbarStack.add(EWTerrainEditToolbar);
|
||||
EditorGuiToolbarStack.remove( EWorldEditorToolbar );
|
||||
//EWTerrainEditToolbar.setVisible( true );
|
||||
ETerrainEditor.onBrushChanged();
|
||||
ETerrainEditor.setup();
|
||||
TerrainEditorPlugin.syncBrushInfo();
|
||||
|
|
@ -1098,7 +1100,9 @@ function TerrainEditorPlugin::onDeactivated( %this )
|
|||
endToolTime("TerrainEditor");
|
||||
EditorGui.writeTerrainEditorSettings();
|
||||
|
||||
EWTerrainEditToolbar.setVisible( false );
|
||||
EditorGuiToolbarStack.remove(EWTerrainEditToolbar);
|
||||
EditorGuiToolbarStack.add( EWorldEditorToolbar );
|
||||
//EWTerrainEditToolbar.setVisible( false );
|
||||
ETerrainEditor.setVisible( false );
|
||||
|
||||
EditorGui.menuBar.remove( %this.terrainMenu );
|
||||
|
|
@ -1216,7 +1220,10 @@ function TerrainPainterPlugin::onActivated( %this )
|
|||
|
||||
EditorGui-->TerrainPainter.setVisible(true);
|
||||
EditorGui-->TerrainPainterPreview.setVisible(true);
|
||||
EWTerrainPainterToolbar.setVisible(true);
|
||||
|
||||
EditorGuiToolbarStack.add(EWTerrainPainterToolbar);
|
||||
EditorGuiToolbarStack.remove( EWorldEditorToolbar );
|
||||
//EWTerrainPainterToolbar.setVisible(true);
|
||||
ETerrainEditor.onBrushChanged();
|
||||
EPainter.setup();
|
||||
TerrainPainterPlugin.syncBrushInfo();
|
||||
|
|
@ -1233,7 +1240,9 @@ function TerrainPainterPlugin::onDeactivated( %this )
|
|||
%this.map.pop();
|
||||
EditorGui-->TerrainPainter.setVisible(false);
|
||||
EditorGui-->TerrainPainterPreview.setVisible(false);
|
||||
EWTerrainPainterToolbar.setVisible(false);
|
||||
EditorGuiToolbarStack.remove(EWTerrainPainterToolbar);
|
||||
EditorGuiToolbarStack.add( EWorldEditorToolbar );
|
||||
//EWTerrainPainterToolbar.setVisible(false);
|
||||
ETerrainEditor.setVisible( false );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,3 +78,5 @@ GlobalActionMap.bind(keyboard, "ctrl F3", doProfile);
|
|||
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
|
||||
|
||||
EditorMap.bind( mouse, "alt zaxis", editorWheelFadeScroll );
|
||||
|
||||
EditorMap.bindCmd( keyboard, space, "", "AssetBrowser.toggleDialog();" );
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ function EPainter::updateLayers( %this, %matIndex )
|
|||
%ctrl = new GuiIconButtonCtrl()
|
||||
{
|
||||
profile = "GuiCreatorIconButtonProfile";
|
||||
iconBitmap = "~/worldEditor/images/terrainpainter/new_layer_icon";
|
||||
iconBitmapAsset = "ToolsModule:new_layer_icon_image";
|
||||
iconLocation = "Left";
|
||||
textLocation = "Right";
|
||||
extent = %listWidth SPC "46";
|
||||
|
|
|
|||
|
|
@ -246,14 +246,22 @@ function TerrainMaterialDlg::clearTextureMap(%this, %mapName)
|
|||
%targetMap.setBitmap($TerrainMaterialEditor::emptyMaterialImage);
|
||||
%targetMap.asset = "";
|
||||
|
||||
%targetMapName = %this.findObjectByInternalName(%mapName @ "AssetId", true);
|
||||
%targetMapName.setText("None");
|
||||
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
|
||||
if(%mapName $= "DetailMap")
|
||||
{
|
||||
//hide the supplemental maps
|
||||
NormalMapContainer.callOnChildren("setActive", false);
|
||||
%this.clearTextureMap("NormalMap");
|
||||
|
||||
ORMMapContainer.callOnChildren("setActive", false);
|
||||
%this.clearTextureMap("ORMMap");
|
||||
|
||||
MacroMapContainer.callOnChildren("setActive", false);
|
||||
%this.clearTextureMap("MacroMap");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -290,6 +298,9 @@ function TerrainMaterialDlg::changeTerrainMatMapAsset(%this)
|
|||
|
||||
%targetMap.setBitmap( %image );
|
||||
|
||||
%targetMapName = %mapName @ "AssetId";
|
||||
%targetMapName.setText(%imgAsset);
|
||||
|
||||
TerrainMaterialDlg.matDirty = true;
|
||||
}
|
||||
|
||||
|
|
@ -546,29 +557,32 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
|
|||
|
||||
%newName = %this-->matNameCtrl.getText();
|
||||
|
||||
%blankBitmap = AssetDatabase.acquireAsset($TerrainMaterialEditor::emptyMaterialImage).getImagePath();
|
||||
|
||||
|
||||
//---
|
||||
%newDiffuse = %this-->texBaseMap.getBitmap();
|
||||
if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
if(%newDiffuse $= $TerrainMaterialEditor::emptyMaterialImage || %newDiffuse $= %blankBitmap)
|
||||
%newDiffuse = "";
|
||||
|
||||
//---
|
||||
%newNormal = %this-->texNormalMap.getBitmap();
|
||||
if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
if(%newNormal $= $TerrainMaterialEditor::emptyMaterialImage || %newNormal $= %blankBitmap)
|
||||
%newNormal = "";
|
||||
|
||||
//---
|
||||
%newormConfig = %this-->texORMConfigMap.getBitmap();
|
||||
if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
if(%newormConfig $= $TerrainMaterialEditor::emptyMaterialImage || %newormConfig $= %blankBitmap)
|
||||
%newormConfig = "";
|
||||
|
||||
//---
|
||||
%newDetail = %this-->texDetailMap.getBitmap();
|
||||
if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
if(%newDetail $= $TerrainMaterialEditor::emptyMaterialImage || %newDetail $= %blankBitmap)
|
||||
%newDetail = "";
|
||||
|
||||
//---
|
||||
%newMacro = %this-->texMacroMap.getBitmap();
|
||||
if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage)
|
||||
if(%newMacro $= $TerrainMaterialEditor::emptyMaterialImage || %newMacro $= %blankBitmap)
|
||||
%newMacro = "";
|
||||
|
||||
%detailSize = %this-->detSizeCtrl.getText();
|
||||
|
|
|
|||
|
|
@ -1060,7 +1060,12 @@ function EditorDropTypeMenu::onSelectItem(%this, %id, %text)
|
|||
// a drop type is selected in the menu.
|
||||
EWorldEditor.dropType = getField(%this.item[%id], 2);
|
||||
|
||||
%this.checkRadioItem(0, (%this.getItemCount() - 1), %id);
|
||||
for(%i=0; %i < %this.getItemCount(); %i++)
|
||||
{
|
||||
%this.checkItem(%i, false);
|
||||
}
|
||||
|
||||
%this.checkItem(%id, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue