浏览代码

WIP updated UI
WIP dark editor theme
fixed multiwindow

Areloch 6 年之前
父节点
当前提交
60a29777fa
共有 46 个文件被更改,包括 2356 次插入2247 次删除
  1. 63 193
      Engine/source/gfx/D3D11/gfxD3D11Device.cpp
  2. 4 2
      Engine/source/gfx/D3D11/gfxD3D11Device.h
  3. 200 18
      Engine/source/gfx/D3D11/gfxD3D11Target.cpp
  4. 18 2
      Engine/source/gfx/D3D11/gfxD3D11Target.h
  5. 9 2
      Engine/source/gfx/gl/gfxGLWindowTarget.cpp
  6. 5 0
      Engine/source/gfx/gl/gfxGLWindowTarget.h
  7. 15 13
      Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp
  8. 6 6
      Templates/BaseGame/game/data/ui/scripts/guis/mainMenu.gui
  9. 578 11
      Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui
  10. 3 3
      Templates/BaseGame/game/data/ui/scripts/profiles.cs
  11. 1 1
      Templates/BaseGame/game/tools/VerveEditor/main.cs
  12. 二进制
      Templates/BaseGame/game/tools/editorClasses/gui/images/rollout.png
  13. 二进制
      Templates/BaseGame/game/tools/editorClasses/gui/panels/editor-menubar.png
  14. 二进制
      Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar.png
  15. 5 0
      Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs
  16. 二进制
      Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_n.png
  17. 二进制
      Templates/BaseGame/game/tools/gui/images/clear-icon_n.png
  18. 二进制
      Templates/BaseGame/game/tools/gui/images/delete_n.png
  19. 二进制
      Templates/BaseGame/game/tools/gui/images/dropDown.png
  20. 二进制
      Templates/BaseGame/game/tools/gui/images/dropslider_n.png
  21. 二进制
      Templates/BaseGame/game/tools/gui/images/group-border.png
  22. 二进制
      Templates/BaseGame/game/tools/gui/images/lock_n.png
  23. 二进制
      Templates/BaseGame/game/tools/gui/images/scrollBar.png
  24. 二进制
      Templates/BaseGame/game/tools/gui/images/separator-h.png
  25. 二进制
      Templates/BaseGame/game/tools/gui/images/tab-border.png
  26. 二进制
      Templates/BaseGame/game/tools/gui/images/tab.png
  27. 二进制
      Templates/BaseGame/game/tools/gui/images/textEdit.png
  28. 二进制
      Templates/BaseGame/game/tools/gui/images/textEditFrame.png
  29. 二进制
      Templates/BaseGame/game/tools/gui/images/textEditSliderBox.png
  30. 二进制
      Templates/BaseGame/game/tools/gui/images/toolbar-window.png
  31. 二进制
      Templates/BaseGame/game/tools/gui/images/treeView.png
  32. 二进制
      Templates/BaseGame/game/tools/gui/images/window.png
  33. 133 179
      Templates/BaseGame/game/tools/gui/profiles.ed.cs
  34. 39 39
      Templates/BaseGame/game/tools/settings.xml
  35. 7 9
      Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui
  36. 13 13
      Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui
  37. 28 28
      Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui
  38. 1206 1559
      Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui
  39. 0 18
      Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui
  40. 5 5
      Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.cs
  41. 3 13
      Templates/BaseGame/game/tools/worldEditor/main.cs
  42. 0 5
      Templates/BaseGame/game/tools/worldEditor/scripts/editors/creator.ed.cs
  43. 2 38
      Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs
  44. 13 83
      Templates/BaseGame/game/tools/worldEditor/scripts/lightViz.cs
  45. 0 5
      Templates/BaseGame/game/tools/worldEditor/scripts/lighting.ed.cs
  46. 0 2
      Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs

+ 63 - 193
Engine/source/gfx/D3D11/gfxD3D11Device.cpp

@@ -433,8 +433,8 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
 {
    AssertFatal(window, "GFXD3D11Device::init - must specify a window!");
 
-   HWND winHwnd = (HWND)window->getSystemWindow( PlatformWindow::WindowSystem_Windows );
-   SetFocus(winHwnd);
+   //HWND winHwnd = (HWND)window->getSystemWindow( PlatformWindow::WindowSystem_Windows );
+   //SetFocus(winHwnd);
 
    UINT createDeviceFlags = D3D11_CREATE_DEVICE_SINGLETHREADED | D3D11_CREATE_DEVICE_BGRA_SUPPORT;
 #ifdef TORQUE_DEBUG
@@ -442,35 +442,34 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
    mDebugLayers = true;
 #endif
 
-   DXGI_SWAP_CHAIN_DESC d3dpp = setupPresentParams(mode, winHwnd);
-
    // TODO support at least feature level 10 to match GL
    D3D_FEATURE_LEVEL pFeatureLevels[] = { D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_1 };
    U32 nFeatureCount = ARRAYSIZE(pFeatureLevels);
    D3D_DRIVER_TYPE driverType = D3D_DRIVER_TYPE_HARDWARE;// use D3D_DRIVER_TYPE_REFERENCE for reference device
    // create a device, device context and swap chain using the information in the d3dpp struct
-   HRESULT hres = D3D11CreateDeviceAndSwapChain(NULL,
-                                 driverType,
-                                 NULL,
-                                 createDeviceFlags,
-											pFeatureLevels,
-                                 nFeatureCount,
-                                 D3D11_SDK_VERSION,
-                                 &d3dpp,
-                                 &mSwapChain,
-                                 &mD3DDevice,
-                                 &mFeatureLevel,
-                                 &mD3DDeviceContext);
+   HRESULT hres = D3D11CreateDevice(NULL,
+      driverType,
+      NULL,
+      createDeviceFlags,
+      pFeatureLevels,
+      nFeatureCount,
+      D3D11_SDK_VERSION,
+      &mD3DDevice,
+      &mFeatureLevel,
+      &mD3DDeviceContext);
 
    if(FAILED(hres))
    {
       #ifdef TORQUE_DEBUG
       //try again without debug device layer enabled
       createDeviceFlags &= ~D3D11_CREATE_DEVICE_DEBUG;
-      hres = D3D11CreateDeviceAndSwapChain(NULL, driverType,NULL,createDeviceFlags,NULL, 0,
+      hres = D3D11CreateDevice(NULL,
+         driverType,
+         NULL,
+         createDeviceFlags,
+         pFeatureLevels,
+         nFeatureCount,
          D3D11_SDK_VERSION,
-         &d3dpp,
-         &mSwapChain,
          &mD3DDevice,
          &mFeatureLevel,
          &mD3DDeviceContext);
@@ -481,7 +480,7 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
       Con::warnf("GFXD3D11Device::init - Debug layers not detected!");
       mDebugLayers = false;
       #else
-      AssertFatal(false, "GFXD3D11Device::init - D3D11CreateDeviceAndSwapChain failed!");
+         AssertFatal(false, "GFXD3D11Device::init - D3D11CreateDeviceAndSwapChain failed!");
       #endif
    }
 
@@ -494,6 +493,9 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
          AssertFatal(false, "GFXD3D11Device::init- Failed to set fullscreen state!");
       }
    }
+#ifdef TORQUE_DEBUG
+   _suppressDebugMessages();
+#endif
 
    mTextureManager = new GFXD3D11TextureManager();
 
@@ -541,68 +543,6 @@ void GFXD3D11Device::init(const GFXVideoMode &mode, PlatformWindow *window)
    mCardProfiler = new GFXD3D11CardProfiler();
    mCardProfiler->init();
 
-   D3D11_TEXTURE2D_DESC desc;
-   desc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
-   desc.CPUAccessFlags = 0;
-   desc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
-   desc.MipLevels = 1;
-   desc.ArraySize = 1;
-   desc.Usage = D3D11_USAGE_DEFAULT;
-   desc.Width = mode.resolution.x;
-   desc.Height = mode.resolution.y;
-   desc.SampleDesc.Count =1;
-   desc.SampleDesc.Quality =0;
-   desc.MiscFlags = 0;
-
-   HRESULT hr = mD3DDevice->CreateTexture2D(&desc, NULL, &mDeviceDepthStencil);
-   if(FAILED(hr)) 
-   {
-      AssertFatal(false, "GFXD3D11Device::init - couldn't create device's depth-stencil surface.");
-   }
-
-   D3D11_DEPTH_STENCIL_VIEW_DESC depthDesc;
-   depthDesc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
-   depthDesc.Flags =0 ;
-   depthDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
-   depthDesc.Texture2D.MipSlice = 0;
-
-   hr = mD3DDevice->CreateDepthStencilView(mDeviceDepthStencil, &depthDesc, &mDeviceDepthStencilView);
-
-   if(FAILED(hr))
-   {
-      AssertFatal(false, "GFXD3D11Device::init - couldn't create depth stencil view");
-   }
-
-   hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&mDeviceBackbuffer);
-   if(FAILED(hr))
-     AssertFatal(false, "GFXD3D11Device::init - coudln't retrieve backbuffer ref");
-
-   //create back buffer view
-   D3D11_RENDER_TARGET_VIEW_DESC RTDesc;
-
-   RTDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB];
-   RTDesc.Texture2D.MipSlice = 0;
-   RTDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
-
-   hr = mD3DDevice->CreateRenderTargetView(mDeviceBackbuffer, &RTDesc, &mDeviceBackBufferView);
-
-   if(FAILED(hr))
-       AssertFatal(false, "GFXD3D11Device::init - couldn't create back buffer target view");
-
-#ifdef TORQUE_DEBUG
-   String backBufferName = "MainBackBuffer";
-   String depthSteniclName = "MainDepthStencil";
-   String backBuffViewName = "MainBackBuffView";
-   String depthStencViewName = "MainDepthView";
-   mDeviceBackbuffer->SetPrivateData(WKPDID_D3DDebugObjectName, backBufferName.size(), backBufferName.c_str());
-   mDeviceDepthStencil->SetPrivateData(WKPDID_D3DDebugObjectName, depthSteniclName.size(), depthSteniclName.c_str());
-   mDeviceDepthStencilView->SetPrivateData(WKPDID_D3DDebugObjectName, depthStencViewName.size(), depthStencViewName.c_str());
-   mDeviceBackBufferView->SetPrivateData(WKPDID_D3DDebugObjectName, backBuffViewName.size(), backBuffViewName.c_str());
-
-   _suppressDebugMessages();
-
-#endif
-
    gScreenShot = new ScreenShotD3D11;
 
    mInitialized = true;
@@ -652,15 +592,35 @@ GFXWindowTarget * GFXD3D11Device::allocWindowTarget(PlatformWindow *window)
 {
    AssertFatal(window,"GFXD3D11Device::allocWindowTarget - no window provided!");
 
-   // Allocate the device.
-   init(window->getVideoMode(), window);
-
    // Set up a new window target...
    GFXD3D11WindowTarget *gdwt = new GFXD3D11WindowTarget();
    gdwt->mWindow = window;
    gdwt->mSize = window->getClientExtent();
    gdwt->initPresentationParams();
-   gdwt->registerResourceWithDevice(this);
+
+   if (!mInitialized)
+   {
+      gdwt->mSecondaryWindow = false;
+      // Allocate the device.
+      init(window->getVideoMode(), window);
+      gdwt->initPresentationParams();
+      gdwt->createSwapChain();
+      gdwt->createBuffersAndViews();
+
+      mSwapChain = gdwt->getSwapChain();
+      mDeviceBackbuffer = gdwt->getBackBuffer();
+      mDeviceDepthStencil = gdwt->getDepthStencil();
+      mDeviceBackBufferView = gdwt->getBackBufferView();
+      mDeviceDepthStencilView = gdwt->getDepthStencilView();
+
+   }
+   else //additional window/s
+   {
+      gdwt->mSecondaryWindow = true;
+      gdwt->initPresentationParams();
+      gdwt->createSwapChain();
+      gdwt->createBuffersAndViews();
+   }
 
    return gdwt;
 }
@@ -673,13 +633,15 @@ GFXTextureTarget* GFXD3D11Device::allocRenderToTextureTarget(bool genMips)
    return targ;
 }
 
-void GFXD3D11Device::reset(DXGI_SWAP_CHAIN_DESC &d3dpp)
+void GFXD3D11Device::beginReset()
 {
    if (!mD3DDevice)
       return;
 
    mInitialized = false;
 
+   releaseDefaultPoolResources();
+
    // Clean up some commonly dangling state. This helps prevents issues with
    // items that are destroyed by the texture manager callbacks and recreated
    // later, but still left bound.
@@ -690,121 +652,29 @@ void GFXD3D11Device::reset(DXGI_SWAP_CHAIN_DESC &d3dpp)
 
    mD3DDeviceContext->ClearState();
 
-   DXGI_MODE_DESC displayModes;
-   displayModes.Format = d3dpp.BufferDesc.Format;
-   displayModes.Height = d3dpp.BufferDesc.Height;
-   displayModes.Width = d3dpp.BufferDesc.Width;
-   displayModes.RefreshRate = d3dpp.BufferDesc.RefreshRate;
-   displayModes.Scaling = d3dpp.BufferDesc.Scaling;
-   displayModes.ScanlineOrdering = d3dpp.BufferDesc.ScanlineOrdering;
-
-   HRESULT hr;
-   if (!d3dpp.Windowed)
-   {
-      hr = mSwapChain->ResizeTarget(&displayModes);
-
-      if (FAILED(hr))
-      {
-         AssertFatal(false, "D3D11Device::reset - failed to resize target!");
-      }
-   }
-
-   // First release all the stuff we allocated from D3DPOOL_DEFAULT
-   releaseDefaultPoolResources();
-
-   //release the backbuffer, depthstencil, and their views
-   SAFE_RELEASE(mDeviceBackBufferView);
-   SAFE_RELEASE(mDeviceBackbuffer);
+   //release old buffers and views
    SAFE_RELEASE(mDeviceDepthStencilView);
+   SAFE_RELEASE(mDeviceBackBufferView);
    SAFE_RELEASE(mDeviceDepthStencil);
+   SAFE_RELEASE(mDeviceBackbuffer);
+}
 
-   hr = mSwapChain->ResizeBuffers(d3dpp.BufferCount, d3dpp.BufferDesc.Width, d3dpp.BufferDesc.Height, d3dpp.BufferDesc.Format, d3dpp.Windowed ? 0 : DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH);
-
-   if (FAILED(hr))
-   {
-      AssertFatal(false, "D3D11Device::reset - failed to resize back buffer!");
-   }
-
-   //recreate backbuffer view. depth stencil view and texture
-   D3D11_TEXTURE2D_DESC desc;
-   desc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
-   desc.CPUAccessFlags = 0;
-   desc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
-   desc.MipLevels = 1;
-   desc.ArraySize = 1;
-   desc.Usage = D3D11_USAGE_DEFAULT;
-   desc.Width = d3dpp.BufferDesc.Width;
-   desc.Height = d3dpp.BufferDesc.Height;
-   desc.SampleDesc.Count = 1;
-   desc.SampleDesc.Quality = 0;
-   desc.MiscFlags = 0;
-
-   hr = mD3DDevice->CreateTexture2D(&desc, NULL, &mDeviceDepthStencil);
-   if (FAILED(hr))
-   {
-      AssertFatal(false, "GFXD3D11Device::reset - couldn't create device's depth-stencil surface.");
-   }
-
-   D3D11_DEPTH_STENCIL_VIEW_DESC depthDesc;
-   depthDesc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
-   depthDesc.Flags = 0;
-   depthDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
-   depthDesc.Texture2D.MipSlice = 0;
-
-   hr = mD3DDevice->CreateDepthStencilView(mDeviceDepthStencil, &depthDesc, &mDeviceDepthStencilView);
-
-   if (FAILED(hr))
-   {
-      AssertFatal(false, "GFXD3D11Device::reset - couldn't create depth stencil view");
-   }
-
-   hr = mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&mDeviceBackbuffer);
-   if (FAILED(hr))
-      AssertFatal(false, "GFXD3D11Device::reset - coudln't retrieve backbuffer ref");
-
-   //create back buffer view
-   D3D11_RENDER_TARGET_VIEW_DESC RTDesc;
-
-   RTDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB];
-   RTDesc.Texture2D.MipSlice = 0;
-   RTDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
-
-   hr = mD3DDevice->CreateRenderTargetView(mDeviceBackbuffer, &RTDesc, &mDeviceBackBufferView);
-
-   if (FAILED(hr))
-      AssertFatal(false, "GFXD3D11Device::reset - couldn't create back buffer target view");
+void GFXD3D11Device::endReset(GFXD3D11WindowTarget* windowTarget)
+{
+   //grab new references
+   mDeviceBackbuffer = windowTarget->getBackBuffer();
+   mDeviceDepthStencil = windowTarget->getDepthStencil();
+   mDeviceBackBufferView = windowTarget->getBackBufferView();
+   mDeviceDepthStencilView = windowTarget->getDepthStencilView();
 
    mD3DDeviceContext->OMSetRenderTargets(1, &mDeviceBackBufferView, mDeviceDepthStencilView);
 
-   hr = mSwapChain->SetFullscreenState(!d3dpp.Windowed, NULL);
-
-   if (FAILED(hr))
-   {
-      AssertFatal(false, "D3D11Device::reset - failed to change screen states!");
-   }
-
-   //Microsoft recommend this, see DXGI documentation
-   if (!d3dpp.Windowed)
-   {
-      displayModes.RefreshRate.Numerator = 0;
-      displayModes.RefreshRate.Denominator = 0;
-      hr = mSwapChain->ResizeTarget(&displayModes);
-
-      if (FAILED(hr))
-      {
-         AssertFatal(false, "D3D11Device::reset - failed to resize target!");
-      }
-   }
+   // Now reacquire all the resources we trashed earlier
+   reacquireDefaultPoolResources();
 
    mInitialized = true;
-
-   // Now re aquire all the resources we trashed earlier
-   reacquireDefaultPoolResources();
-   //set last bound shaders
-   //mD3DDeviceContext->PSSetShader(mLastPixShader, NULL, 0);
-   //mD3DDeviceContext->VSSetShader(mLastVertShader, NULL, 0);
    // Mark everything dirty and flush to card, for sanity.
-   //updateStates(true);
+   updateStates(true);
 }
 
 void GFXD3D11Device::setupGenericShaders(GenericShaderType type)

+ 4 - 2
Engine/source/gfx/D3D11/gfxD3D11Device.h

@@ -296,10 +296,12 @@ public:
 
    ID3D11DeviceContext* getDeviceContext(){ return mD3DDeviceContext; }
    ID3D11Device* getDevice(){ return mD3DDevice; }
-   IDXGISwapChain* getSwapChain() { return mSwapChain; }
+   //IDXGISwapChain* getSwapChain() { return mSwapChain; }
 
    /// Reset
-   void reset( DXGI_SWAP_CHAIN_DESC &d3dpp );
+   //void reset( DXGI_SWAP_CHAIN_DESC &d3dpp );
+   void beginReset();
+   void endReset(GFXD3D11WindowTarget* windowTarget);
 
    virtual void setupGenericShaders( GenericShaderType type  = GSColor );
 

+ 200 - 18
Engine/source/gfx/D3D11/gfxD3D11Target.cpp

@@ -319,21 +319,34 @@ void GFXD3D11TextureTarget::resurrect()
 
 GFXD3D11WindowTarget::GFXD3D11WindowTarget()
 {
-   mWindow       = NULL;
-   mBackbuffer   = NULL;
+   mWindow = NULL;
+   mBackBuffer = NULL;
+   mDepthStencilView = NULL;
+   mDepthStencil = NULL;
+   mBackBufferView = NULL;
+   mSecondaryWindow = false;
 }
 
 GFXD3D11WindowTarget::~GFXD3D11WindowTarget()
 {
-   SAFE_RELEASE(mBackbuffer);
+   SAFE_RELEASE(mDepthStencilView)
+      SAFE_RELEASE(mDepthStencil);
+   SAFE_RELEASE(mBackBufferView);
+   SAFE_RELEASE(mBackBuffer);
+   SAFE_RELEASE(mSwapChain);
 }
 
 void GFXD3D11WindowTarget::initPresentationParams()
 {
    // Get some video mode related info.
-   GFXVideoMode vm = mWindow->getVideoMode();
-   Win32Window* win = static_cast<Win32Window*>(mWindow);
-   HWND hwnd = win->getHWND();
+   const GFXVideoMode& vm = mWindow->getVideoMode();
+   HWND hwnd = (HWND)mWindow->getSystemWindow(PlatformWindow::WindowSystem_Windows);
+
+   // Do some validation...
+   if (vm.fullScreen && mSecondaryWindow)
+   {
+      AssertFatal(false, "GFXD3D11WindowTarget::initPresentationParams - Cannot go fullscreen with secondary window!");
+   }
 
    mPresentationParams = D3D11->setupPresentParams(vm, hwnd);
 }
@@ -352,7 +365,7 @@ GFXFormat GFXD3D11WindowTarget::getFormat()
 
 bool GFXD3D11WindowTarget::present()
 {
-   HRESULT hr = D3D11->getSwapChain()->Present(!D3D11->smDisableVSync, 0);
+   HRESULT hr = mSwapChain->Present(!D3D11->smDisableVSync, 0);
    if (hr == DXGI_ERROR_DEVICE_REMOVED)
    {
       HRESULT result = D3D11->getDevice()->GetDeviceRemovedReason();
@@ -371,36 +384,175 @@ bool GFXD3D11WindowTarget::present()
    return (hr == S_OK);
 }
 
-void GFXD3D11WindowTarget::setImplicitSwapChain()
+void GFXD3D11WindowTarget::createSwapChain()
+{
+   //create dxgi factory & swapchain
+   IDXGIFactory1* DXGIFactory;
+   HRESULT hr = CreateDXGIFactory1(__uuidof(IDXGIFactory1), reinterpret_cast<void**>(&DXGIFactory));
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::createSwapChain - couldn't create dxgi factory.");
+
+   hr = DXGIFactory->CreateSwapChain(D3D11DEVICE, &mPresentationParams, &mSwapChain);
+
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::createSwapChain - couldn't create swap chain.");
+
+   SAFE_RELEASE(DXGIFactory);
+}
+
+void GFXD3D11WindowTarget::createBuffersAndViews()
 {
-   if (!mBackbuffer)      
-      D3D11->mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&mBackbuffer);
+   //release old if they exist
+   SAFE_RELEASE(mDepthStencilView);
+   SAFE_RELEASE(mDepthStencil);
+   SAFE_RELEASE(mBackBufferView);
+   SAFE_RELEASE(mBackBuffer);
+
+   //grab video mode
+   const GFXVideoMode& vm = mWindow->getVideoMode();
+   //create depth/stencil
+   D3D11_TEXTURE2D_DESC desc;
+   desc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
+   desc.CPUAccessFlags = 0;
+   desc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
+   desc.MipLevels = 1;
+   desc.ArraySize = 1;
+   desc.Usage = D3D11_USAGE_DEFAULT;
+   desc.Width = vm.resolution.x;
+   desc.Height = vm.resolution.y;
+   desc.SampleDesc.Count = 1;
+   desc.SampleDesc.Quality = 0;
+   desc.MiscFlags = 0;
+
+   HRESULT hr = D3D11DEVICE->CreateTexture2D(&desc, NULL, &mDepthStencil);
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::createBuffersAndViews - couldn't create device's depth-stencil surface.");
+
+   D3D11_DEPTH_STENCIL_VIEW_DESC depthDesc;
+   depthDesc.Format = GFXD3D11TextureFormat[GFXFormatD24S8];
+   depthDesc.Flags = 0;
+   depthDesc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
+   depthDesc.Texture2D.MipSlice = 0;
+
+   hr = D3D11DEVICE->CreateDepthStencilView(mDepthStencil, &depthDesc, &mDepthStencilView);
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::createBuffersAndViews - couldn't create depth stencil view");
+
+   setBackBuffer();
+
+   //create back buffer view
+   D3D11_RENDER_TARGET_VIEW_DESC RTDesc;
+   RTDesc.Format = GFXD3D11TextureFormat[GFXFormatR8G8B8A8_SRGB];
+   RTDesc.Texture2D.MipSlice = 0;
+   RTDesc.ViewDimension = D3D11_RTV_DIMENSION_TEXTURE2D;
+
+   hr = D3D11DEVICE->CreateRenderTargetView(mBackBuffer, &RTDesc, &mBackBufferView);
+
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::createBuffersAndViews - couldn't create back buffer target view");
+
+   //debug names
+#ifdef TORQUE_DEBUG
+   if (!mSecondaryWindow)
+   {
+      String backBufferName = "MainBackBuffer";
+      String depthSteniclName = "MainDepthStencil";
+      String backBuffViewName = "MainBackBuffView";
+      String depthStencViewName = "MainDepthView";
+      mBackBuffer->SetPrivateData(WKPDID_D3DDebugObjectName, backBufferName.size(), backBufferName.c_str());
+      mDepthStencil->SetPrivateData(WKPDID_D3DDebugObjectName, depthSteniclName.size(), depthSteniclName.c_str());
+      mDepthStencilView->SetPrivateData(WKPDID_D3DDebugObjectName, depthStencViewName.size(), depthStencViewName.c_str());
+      mBackBufferView->SetPrivateData(WKPDID_D3DDebugObjectName, backBuffViewName.size(), backBuffViewName.c_str());
+   }
+#endif
 }
 
 void GFXD3D11WindowTarget::resetMode()
 {
+   HRESULT hr;
+   if (mSwapChain)
+   {
+      // The current video settings.
+      DXGI_SWAP_CHAIN_DESC desc;
+      hr = mSwapChain->GetDesc(&desc);
+      if (FAILED(hr))
+         AssertFatal(false, "GFXD3D11WindowTarget::resetMode - failed to get swap chain description!");
+
+      bool fullscreen = !desc.Windowed;
+      Point2I backbufferSize(desc.BufferDesc.Width, desc.BufferDesc.Height);
+
+      // The settings we are now applying.
+      const GFXVideoMode& vm = mWindow->getVideoMode();
+
+      // Early out if none of the settings which require a device reset
+      // have changed.      
+      if (backbufferSize == vm.resolution &&
+         fullscreen == vm.fullScreen)
+         return;
+   }
+
+   //release old buffers and views
+   SAFE_RELEASE(mDepthStencilView)
+      SAFE_RELEASE(mDepthStencil);
+   SAFE_RELEASE(mBackBufferView);
+   SAFE_RELEASE(mBackBuffer);
+
+   if (!mSecondaryWindow)
+      D3D11->beginReset();
+
    mWindow->setSuppressReset(true);
 
    // Setup our presentation params.
    initPresentationParams();
 
-   // Otherwise, we have to reset the device, if we're the implicit swapchain.
-   D3D11->reset(mPresentationParams);
+   if (!mPresentationParams.Windowed)
+   {
+      mPresentationParams.BufferDesc.RefreshRate.Numerator = 0;
+      mPresentationParams.BufferDesc.RefreshRate.Denominator = 0;
+      hr = mSwapChain->ResizeTarget(&mPresentationParams.BufferDesc);
+
+      if (FAILED(hr))
+         AssertFatal(false, "GFXD3D11WindowTarget::resetMode - failed to resize target!");
+
+   }
+
+   hr = mSwapChain->ResizeBuffers(mPresentationParams.BufferCount, mPresentationParams.BufferDesc.Width, mPresentationParams.BufferDesc.Height,
+      mPresentationParams.BufferDesc.Format, mPresentationParams.Windowed ? 0 : DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH);
+
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::resetMode - failed to resize back buffer!");
+
+   hr = mSwapChain->SetFullscreenState(!mPresentationParams.Windowed, NULL);
+
+   if (FAILED(hr))
+      AssertFatal(false, "GFXD3D11WindowTarget::resetMode - failed to change screen states!");
 
    // Update our size, too.
    mSize = Point2I(mPresentationParams.BufferDesc.Width, mPresentationParams.BufferDesc.Height);
 
    mWindow->setSuppressReset(false);
+
+   //re-create buffers and views
+   createBuffersAndViews();
+
+   if (!mSecondaryWindow)
+      D3D11->endReset(this);
 }
 
 void GFXD3D11WindowTarget::zombify()
 {
-   SAFE_RELEASE(mBackbuffer);
+   SAFE_RELEASE(mBackBuffer);
 }
 
 void GFXD3D11WindowTarget::resurrect()
 {
-   setImplicitSwapChain();
+   setBackBuffer();
+}
+
+void GFXD3D11WindowTarget::setBackBuffer()
+{
+   if (!mBackBuffer)
+      mSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)& mBackBuffer);
 }
 
 void GFXD3D11WindowTarget::activate()
@@ -411,10 +563,10 @@ void GFXD3D11WindowTarget::activate()
    ID3D11RenderTargetView* rtViews[8] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL };
 
    D3D11DEVICECONTEXT->OMSetRenderTargets(8, rtViews, NULL);
-   D3D11DEVICECONTEXT->OMSetRenderTargets(1, &D3D11->mDeviceBackBufferView, D3D11->mDeviceDepthStencilView);
+   D3D11DEVICECONTEXT->OMSetRenderTargets(1, &mBackBufferView, mDepthStencilView);
 
    DXGI_SWAP_CHAIN_DESC pp;
-   D3D11->mSwapChain->GetDesc(&pp);
+   mSwapChain->GetDesc(&pp);
 
    // Update our video mode here, too.
    GFXVideoMode vm;
@@ -432,5 +584,35 @@ void GFXD3D11WindowTarget::resolveTo(GFXTextureObject *tex)
    D3D11_TEXTURE2D_DESC desc;
    ID3D11Texture2D* surf = ((GFXD3D11TextureObject*)(tex))->get2DTex();
    surf->GetDesc(&desc);
-   D3D11DEVICECONTEXT->ResolveSubresource(surf, 0, D3D11->mDeviceBackbuffer, 0, desc.Format);
-}
+   D3D11DEVICECONTEXT->ResolveSubresource(surf, 0, mBackBuffer, 0, desc.Format);
+}
+
+IDXGISwapChain* GFXD3D11WindowTarget::getSwapChain()
+{
+   mSwapChain->AddRef();
+   return mSwapChain;
+}
+
+ID3D11Texture2D* GFXD3D11WindowTarget::getBackBuffer()
+{
+   mBackBuffer->AddRef();
+   return mBackBuffer;
+}
+
+ID3D11Texture2D* GFXD3D11WindowTarget::getDepthStencil()
+{
+   mDepthStencil->AddRef();
+   return mDepthStencil;
+}
+
+ID3D11RenderTargetView* GFXD3D11WindowTarget::getBackBufferView()
+{
+   mBackBufferView->AddRef();
+   return mBackBufferView;
+}
+
+ID3D11DepthStencilView* GFXD3D11WindowTarget::getDepthStencilView()
+{
+   mDepthStencilView->AddRef();
+   return mDepthStencilView;
+}

+ 18 - 2
Engine/source/gfx/D3D11/gfxD3D11Target.h

@@ -76,7 +76,11 @@ class GFXD3D11WindowTarget : public GFXWindowTarget
    friend class GFXD3D11Device;
 
    /// Our backbuffer
-   ID3D11Texture2D *mBackbuffer;
+   ID3D11Texture2D* mBackBuffer;
+   ID3D11Texture2D* mDepthStencil;
+   ID3D11RenderTargetView* mBackBufferView;
+   ID3D11DepthStencilView* mDepthStencilView;
+   IDXGISwapChain* mSwapChain;
 
    /// Maximum size we can render to.
    Point2I mSize;
@@ -85,6 +89,9 @@ class GFXD3D11WindowTarget : public GFXWindowTarget
    /// Internal interface that notifies us we need to reset our video mode.
    void resetMode();
 
+   /// Is this a secondary window
+   bool mSecondaryWindow;
+
 public:
 
    GFXD3D11WindowTarget();
@@ -95,7 +102,9 @@ public:
    virtual bool present();
 
    void initPresentationParams();
-   void setImplicitSwapChain();
+   void createSwapChain();
+   void createBuffersAndViews();
+   void setBackBuffer();
 
    virtual void activate();   
 
@@ -103,6 +112,13 @@ public:
    void resurrect();
 
    virtual void resolveTo( GFXTextureObject *tex );
+
+   // These are all reference counted and must be released by whomever uses the get* function
+   IDXGISwapChain* getSwapChain();
+   ID3D11Texture2D* getBackBuffer();
+   ID3D11Texture2D* getDepthStencil();
+   ID3D11RenderTargetView* getBackBufferView();
+   ID3D11DepthStencilView* getDepthStencilView();
 };
 
 #endif

+ 9 - 2
Engine/source/gfx/gl/gfxGLWindowTarget.cpp

@@ -37,7 +37,7 @@ GFX_ImplementTextureProfile( BackBufferDepthProfile,
 
 GFXGLWindowTarget::GFXGLWindowTarget(PlatformWindow *win, GFXDevice *d)
       : GFXWindowTarget(win), mDevice(d), mContext(NULL), mFullscreenContext(NULL)
-      , mCopyFBO(0), mBackBufferFBO(0)
+      , mCopyFBO(0), mBackBufferFBO(0), mSecondaryWindow(false)
 {      
    win->appEvent.notify(this, &GFXGLWindowTarget::_onAppSignal);
 }
@@ -52,7 +52,14 @@ GFXGLWindowTarget::~GFXGLWindowTarget()
 
 void GFXGLWindowTarget::resetMode()
 {
-   if(mWindow->getVideoMode().fullScreen != mWindow->isFullscreen())
+   // Do some validation...
+   bool fullscreen = mWindow->getVideoMode().fullScreen;
+   if (fullscreen && mSecondaryWindow)
+   {
+      AssertFatal(false, "GFXGLWindowTarget::resetMode - Cannot go fullscreen with secondary window!");
+   }
+
+   if (fullscreen != mWindow->isFullscreen())
    {
       _teardownCurrentMode();
       _setupNewMode();

+ 5 - 0
Engine/source/gfx/gl/gfxGLWindowTarget.h

@@ -50,6 +50,9 @@ public:
    virtual void resolveTo(GFXTextureObject* obj);
    
    void _onAppSignal(WindowId wnd, S32 event);
+
+   // create pixel format for the window
+   void createPixelFormat();
    
 private:
    friend class GFXGLDevice;
@@ -58,6 +61,8 @@ private:
    GFXTexHandle mBackBufferColorTex, mBackBufferDepthTex;
    Point2I size;   
    GFXDevice* mDevice;
+   /// Is this a secondary window
+   bool mSecondaryWindow;
    void* mContext;
    void* mFullscreenContext;
    void _teardownCurrentMode();

+ 15 - 13
Engine/source/gfx/gl/sdl/gfxGLDevice.sdl.cpp

@@ -192,19 +192,21 @@ U32 GFXGLDevice::getTotalVideoMemory()
 
 GFXWindowTarget *GFXGLDevice::allocWindowTarget( PlatformWindow *window )
 {
-    AssertFatal(!mContext, "This GFXGLDevice is already assigned to a window");
-    
-    GFXGLWindowTarget* ggwt = 0;
-    if( !mContext )
-    {
-        // no context, init the device now
-        init(window->getVideoMode(), window);
-        ggwt = new GFXGLWindowTarget(window, this);
-        ggwt->registerResourceWithDevice(this);
-        ggwt->mContext = mContext;
-    }
-
-    return ggwt;
+   GFXGLWindowTarget* ggwt = new GFXGLWindowTarget(window, this);
+
+   //first window
+   if (!mContext)
+   {
+      init(window->getVideoMode(), window);
+      ggwt->mSecondaryWindow = false;
+   }
+   else
+      ggwt->mSecondaryWindow = true;
+
+   ggwt->registerResourceWithDevice(this);
+   ggwt->mContext = mContext;
+
+   return ggwt;
 }
 
 GFXFence* GFXGLDevice::_createPlatformSpecificFence()

+ 6 - 6
Templates/BaseGame/game/data/ui/scripts/guis/mainMenu.gui

@@ -2,11 +2,11 @@ exec( "tools/gui/profiles.ed.cs" );
 
 //--- OBJECT WRITE BEGIN ---
 %guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
-   bitmap = "data/ui/art/background-dark.png";
+   bitmap = "data/ui/art/BackgroundImage.png";
    useVariable = "0";
    tile = "0";
    position = "0 0";
-   extent = "1280 1024";
+   extent = "1024 768";
    minExtent = "8 8";
    horizSizing = "width";
    vertSizing = "height";
@@ -22,7 +22,7 @@ exec( "tools/gui/profiles.ed.cs" );
       isDecoy = "0";
 
    new GuiBitmapButtonCtrl(MainMenuAppLogo) {
-      bitmap = "data/ui/art/Torque-3D-logo-shortcut.png";
+      bitmap = "data/ui/art/Torque-3D-logo-shortcut";
       bitmapMode = "Stretched";
       autoFitExtents = "0";
       useModifiers = "0";
@@ -31,7 +31,7 @@ exec( "tools/gui/profiles.ed.cs" );
       groupNum = "-1";
       buttonType = "PushButton";
       useMouseEvents = "0";
-      position = "624 30";
+      position = "550 30";
       extent = "443 139";
       minExtent = "8 2";
       horizSizing = "left";
@@ -47,10 +47,10 @@ exec( "tools/gui/profiles.ed.cs" );
       canSaveDynamicFields = "1";
    };
    new GuiControl(MainMenuButtonContainer) {
-      position = "67 321";
+      position = "557 193";
       extent = "442 381";
       minExtent = "8 2";
-      horizSizing = "right";
+      horizSizing = "left";
       vertSizing = "center";
       profile = "GuiDefaultProfile";
       visible = "1";

+ 578 - 11
Templates/BaseGame/game/data/ui/scripts/guis/optionsMenu.gui

@@ -1,7 +1,7 @@
 //--- OBJECT WRITE BEGIN ---
 %guiContent = new GuiControl(OptionsMenu) {
    position = "0 0";
-   extent = "1280 720";
+   extent = "1024 768";
    minExtent = "8 2";
    horizSizing = "right";
    vertSizing = "bottom";
@@ -60,11 +60,11 @@
       canSaveDynamicFields = "0";
    };
    new GuiControl() {
-      position = "51 118";
+      position = "139 118";
       extent = "700 518";
       minExtent = "8 2";
-      horizSizing = "right";
-      vertSizing = "bottom";
+      horizSizing = "center";
+      vertSizing = "center";
       profile = "GuiDefaultProfile";
       visible = "1";
       active = "1";
@@ -81,12 +81,11 @@
          horizSizing = "right";
          vertSizing = "center";
          profile = "GuiDefaultProfile";
-         visible = "0";
+         visible = "1";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "1";
-         hidden = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
 
@@ -310,6 +309,7 @@
 
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/hudfill.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "0 0";
                extent = "700 450";
@@ -357,6 +357,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 20";
@@ -439,7 +440,7 @@
                      sbUsesNAColor = "0";
                      reverseTextList = "0";
                      bitmapBounds = "16 16";
-                     text = "NVIDIA GeForce GTX 950 (D3D9)";
+                     text = "NVIDIA GeForce GT 745M (D3D11)";
                      maxLength = "1024";
                      margin = "0 0 0 0";
                      padding = "0 0 0 0";
@@ -495,6 +496,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 20";
@@ -577,7 +579,7 @@
                      sbUsesNAColor = "0";
                      reverseTextList = "0";
                      bitmapBounds = "16 16";
-                     text = "1280 x 720  (16:9)";
+                     text = "1366 x 768  (16:9)";
                      maxLength = "1024";
                      margin = "0 0 0 0";
                      padding = "0 0 0 0";
@@ -824,7 +826,7 @@
                      range = "65 90";
                      ticks = "25";
                      snap = "1";
-                     value = "90";
+                     value = "74.6154";
                      position = "190 0";
                      extent = "209 20";
                      minExtent = "8 2";
@@ -841,7 +843,7 @@
                      canSaveDynamicFields = "0";
                   };
                   new GuiTextCtrl() {
-                     text = "90";
+                     text = "74.6154";
                      maxLength = "1024";
                      margin = "0 0 0 0";
                      padding = "0 0 0 0";
@@ -1009,6 +1011,7 @@
 
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/hudfill.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "0 0";
                extent = "700 450";
@@ -1047,6 +1050,7 @@
 
                new GuiBitmapCtrl() {
                   bitmap = "data/ui/art/hudfill.png";
+                  color = "255 255 255 255";
                   wrap = "0";
                   position = "0 0";
                   extent = "700 20";
@@ -1145,6 +1149,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "350 20";
@@ -1410,6 +1415,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "350 20";
@@ -1817,6 +1823,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "350 20";
@@ -2567,6 +2574,7 @@
 
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/ScreenBrightness_Dark.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "0 100";
                extent = "350 200";
@@ -2584,6 +2592,7 @@
             };
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/ScreenBrightness_Light.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "350 100";
                extent = "350 200";
@@ -2754,11 +2763,12 @@
          horizSizing = "right";
          vertSizing = "center";
          profile = "GuiDefaultProfile";
-         visible = "1";
+         visible = "0";
          active = "1";
          tooltipProfile = "GuiToolTipProfile";
          hovertime = "1000";
          isContainer = "1";
+         hidden = "1";
          canSave = "1";
          canSaveDynamicFields = "0";
 
@@ -2863,6 +2873,7 @@
 
                new GuiBitmapCtrl() {
                   bitmap = "data/ui/art/hudfill.png";
+                  color = "255 255 255 255";
                   wrap = "0";
                   position = "0 0";
                   extent = "700 20";
@@ -3004,6 +3015,547 @@
                      isContainer = "1";
                      canSave = "1";
                      canSaveDynamicFields = "0";
+
+                     new GuiContainer() {
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 0";
+                        extent = "700 35";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        class = "GraphicsMenuSetting";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+
+                        new GuiBitmapCtrl() {
+                           bitmap = "data/ui/art/hudfill.png";
+                           color = "255 255 255 255";
+                           wrap = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "0";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiTextCtrl() {
+                           text = "Forward";
+                           maxLength = "1024";
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiMenuButtonProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           internalName = "nameText";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiContainer() {
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "550 0";
+                           extent = "150 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+
+                           new GuiButtonCtrl() {
+                              text = "w, up";
+                              groupNum = "-1";
+                              buttonType = "PushButton";
+                              useMouseEvents = "1";
+                              position = "0 0";
+                              extent = "150 35";
+                              minExtent = "8 8";
+                              horizSizing = "relative";
+                              vertSizing = "bottom";
+                              profile = "GuiMenuButtonProfile";
+                              visible = "1";
+                              active = "1";
+                              tooltipProfile = "GuiToolTipProfile";
+                              hovertime = "1000";
+                              isContainer = "0";
+                              internalName = "rebindButton";
+                              class = "ControlsMenuRebindButton";
+                              canSave = "1";
+                              canSaveDynamicFields = "0";
+                           };
+                        };
+                     };
+                     new GuiContainer() {
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 35";
+                        extent = "700 35";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        class = "GraphicsMenuSetting";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+
+                        new GuiBitmapCtrl() {
+                           bitmap = "data/ui/art/hudfill.png";
+                           color = "255 255 255 255";
+                           wrap = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "0";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiTextCtrl() {
+                           text = "Backward";
+                           maxLength = "1024";
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiMenuButtonProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           internalName = "nameText";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiContainer() {
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "550 0";
+                           extent = "150 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+
+                           new GuiButtonCtrl() {
+                              text = "s, down";
+                              groupNum = "-1";
+                              buttonType = "PushButton";
+                              useMouseEvents = "1";
+                              position = "0 0";
+                              extent = "150 35";
+                              minExtent = "8 8";
+                              horizSizing = "relative";
+                              vertSizing = "bottom";
+                              profile = "GuiMenuButtonProfile";
+                              visible = "1";
+                              active = "1";
+                              tooltipProfile = "GuiToolTipProfile";
+                              hovertime = "1000";
+                              isContainer = "0";
+                              internalName = "rebindButton";
+                              class = "ControlsMenuRebindButton";
+                              canSave = "1";
+                              canSaveDynamicFields = "0";
+                           };
+                        };
+                     };
+                     new GuiContainer() {
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 70";
+                        extent = "700 35";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        class = "GraphicsMenuSetting";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+
+                        new GuiBitmapCtrl() {
+                           bitmap = "data/ui/art/hudfill.png";
+                           color = "255 255 255 255";
+                           wrap = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "0";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiTextCtrl() {
+                           text = "Strafe Left";
+                           maxLength = "1024";
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiMenuButtonProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           internalName = "nameText";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiContainer() {
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "550 0";
+                           extent = "150 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+
+                           new GuiButtonCtrl() {
+                              text = "a, left";
+                              groupNum = "-1";
+                              buttonType = "PushButton";
+                              useMouseEvents = "1";
+                              position = "0 0";
+                              extent = "150 35";
+                              minExtent = "8 8";
+                              horizSizing = "relative";
+                              vertSizing = "bottom";
+                              profile = "GuiMenuButtonProfile";
+                              visible = "1";
+                              active = "1";
+                              tooltipProfile = "GuiToolTipProfile";
+                              hovertime = "1000";
+                              isContainer = "0";
+                              internalName = "rebindButton";
+                              class = "ControlsMenuRebindButton";
+                              canSave = "1";
+                              canSaveDynamicFields = "0";
+                           };
+                        };
+                     };
+                     new GuiContainer() {
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 105";
+                        extent = "700 35";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        class = "GraphicsMenuSetting";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+
+                        new GuiBitmapCtrl() {
+                           bitmap = "data/ui/art/hudfill.png";
+                           color = "255 255 255 255";
+                           wrap = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "0";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiTextCtrl() {
+                           text = "Strafe Right";
+                           maxLength = "1024";
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiMenuButtonProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           internalName = "nameText";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiContainer() {
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "550 0";
+                           extent = "150 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+
+                           new GuiButtonCtrl() {
+                              text = "d, right";
+                              groupNum = "-1";
+                              buttonType = "PushButton";
+                              useMouseEvents = "1";
+                              position = "0 0";
+                              extent = "150 35";
+                              minExtent = "8 8";
+                              horizSizing = "relative";
+                              vertSizing = "bottom";
+                              profile = "GuiMenuButtonProfile";
+                              visible = "1";
+                              active = "1";
+                              tooltipProfile = "GuiToolTipProfile";
+                              hovertime = "1000";
+                              isContainer = "0";
+                              internalName = "rebindButton";
+                              class = "ControlsMenuRebindButton";
+                              canSave = "1";
+                              canSaveDynamicFields = "0";
+                           };
+                        };
+                     };
+                     new GuiContainer() {
+                        margin = "0 0 0 0";
+                        padding = "0 0 0 0";
+                        anchorTop = "1";
+                        anchorBottom = "0";
+                        anchorLeft = "1";
+                        anchorRight = "0";
+                        position = "0 140";
+                        extent = "700 35";
+                        minExtent = "8 2";
+                        horizSizing = "right";
+                        vertSizing = "bottom";
+                        profile = "GuiDefaultProfile";
+                        visible = "1";
+                        active = "1";
+                        tooltipProfile = "GuiToolTipProfile";
+                        hovertime = "1000";
+                        isContainer = "1";
+                        class = "GraphicsMenuSetting";
+                        canSave = "1";
+                        canSaveDynamicFields = "0";
+
+                        new GuiBitmapCtrl() {
+                           bitmap = "data/ui/art/hudfill.png";
+                           color = "255 255 255 255";
+                           wrap = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "0";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiTextCtrl() {
+                           text = "Jump";
+                           maxLength = "1024";
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "0 0";
+                           extent = "550 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiMenuButtonProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           internalName = "nameText";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+                        };
+                        new GuiContainer() {
+                           margin = "0 0 0 0";
+                           padding = "0 0 0 0";
+                           anchorTop = "1";
+                           anchorBottom = "0";
+                           anchorLeft = "1";
+                           anchorRight = "0";
+                           position = "550 0";
+                           extent = "150 35";
+                           minExtent = "8 2";
+                           horizSizing = "right";
+                           vertSizing = "bottom";
+                           profile = "GuiDefaultProfile";
+                           visible = "1";
+                           active = "1";
+                           tooltipProfile = "GuiToolTipProfile";
+                           hovertime = "1000";
+                           isContainer = "1";
+                           canSave = "1";
+                           canSaveDynamicFields = "0";
+
+                           new GuiButtonCtrl() {
+                              text = "space";
+                              groupNum = "-1";
+                              buttonType = "PushButton";
+                              useMouseEvents = "1";
+                              position = "0 0";
+                              extent = "150 35";
+                              minExtent = "8 8";
+                              horizSizing = "relative";
+                              vertSizing = "bottom";
+                              profile = "GuiMenuButtonProfile";
+                              visible = "1";
+                              active = "1";
+                              tooltipProfile = "GuiToolTipProfile";
+                              hovertime = "1000";
+                              isContainer = "0";
+                              internalName = "rebindButton";
+                              class = "ControlsMenuRebindButton";
+                              canSave = "1";
+                              canSaveDynamicFields = "0";
+                           };
+                        };
+                     };
                   };
                };
             };
@@ -3032,6 +3584,7 @@
 
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/hudfill.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "0 0";
                extent = "700 460";
@@ -3535,6 +4088,7 @@
 
          new GuiBitmapCtrl() {
             bitmap = "data/ui/art/hudfill.png";
+            color = "255 255 255 255";
             wrap = "0";
             position = "0 0";
             extent = "700 450";
@@ -3573,6 +4127,7 @@
 
             new GuiBitmapCtrl() {
                bitmap = "data/ui/art/hudfill.png";
+               color = "255 255 255 255";
                wrap = "0";
                position = "0 0";
                extent = "700 35";
@@ -3684,6 +4239,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -3722,6 +4278,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "35 0";
                         extent = "180 35";
@@ -3851,6 +4408,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -3889,6 +4447,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "35 0";
                         extent = "180 35";
@@ -4017,6 +4576,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -4055,6 +4615,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "0 0";
                         extent = "250 35";
@@ -4165,6 +4726,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -4203,6 +4765,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "0 0";
                         extent = "250 35";
@@ -4313,6 +4876,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -4351,6 +4915,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "0 0";
                         extent = "250 35";
@@ -4461,6 +5026,7 @@
 
                   new GuiBitmapCtrl() {
                      bitmap = "data/ui/art/hudfill.png";
+                     color = "255 255 255 255";
                      wrap = "0";
                      position = "0 0";
                      extent = "450 35";
@@ -4499,6 +5065,7 @@
 
                      new GuiBitmapCtrl() {
                         bitmap = "data/ui/art/hudfill.png";
+                        color = "255 255 255 255";
                         wrap = "0";
                         position = "0 0";
                         extent = "250 35";

+ 3 - 3
Templates/BaseGame/game/data/ui/scripts/profiles.cs

@@ -7,8 +7,8 @@ new GuiControlProfile( GuiMenuButtonProfile )
    fontType = "Arial Bold";
    fontColor = "240 240 240";
    fontColorHL = "0 0 0";
-   fontColorNA = "125 125 125";
-   //fontColorSEL ="0 0 0";
+   fontColorNA = "0 0 0";
+   fontColorSEL ="0 0 0";
    fixedExtent = false;
    justify = "center";
    canKeyFocus = false;
@@ -45,7 +45,7 @@ new GuiControlProfile( GuiBlankMenuButtonProfile )
    border = false;
    fontSize = 18;
    fontType = "Arial Bold";
-   fontColor = "200 200 200";
+   fontColor = "220 220 220";
    fontColorHL = "255 255 255";
    fontColorNA = "200 200 200";
    //fontColorSEL ="0 0 0";

+ 1 - 1
Templates/BaseGame/game/tools/VerveEditor/main.cs

@@ -5,7 +5,7 @@
 
 function InitializeVerveEditor()
 {
-   $Verve::UseSeparateWindow = false;
+   $Verve::UseSeparateWindow = true;
    
     // Preferences.
     exec( "./DefaultPrefs.cs" );

二进制
Templates/BaseGame/game/tools/editorClasses/gui/images/rollout.png


二进制
Templates/BaseGame/game/tools/editorClasses/gui/panels/editor-menubar.png


二进制
Templates/BaseGame/game/tools/editorClasses/gui/panels/menubar.png


+ 5 - 0
Templates/BaseGame/game/tools/editorClasses/gui/panels/navPanelProfiles.ed.cs

@@ -68,6 +68,11 @@ singleton GuiControlProfile (menubarProfile : NavPanelProfile)
 {
    bitmap = "./menubar";
    category = "Editor";
+   
+   fillColor = "48 48 48";
+   fontColor = "215 215 215";
+   fontColorHL = "150 150 150";
+   borderColor = "34 34 34";
 };
 singleton GuiControlProfile (editorMenubarProfile : NavPanelProfile) 
 {

二进制
Templates/BaseGame/game/tools/gui/images/add-simgroup-btn_n.png


二进制
Templates/BaseGame/game/tools/gui/images/clear-icon_n.png


二进制
Templates/BaseGame/game/tools/gui/images/delete_n.png


二进制
Templates/BaseGame/game/tools/gui/images/dropDown.png


二进制
Templates/BaseGame/game/tools/gui/images/dropslider_n.png


二进制
Templates/BaseGame/game/tools/gui/images/group-border.png


二进制
Templates/BaseGame/game/tools/gui/images/lock_n.png


二进制
Templates/BaseGame/game/tools/gui/images/scrollBar.png


二进制
Templates/BaseGame/game/tools/gui/images/separator-h.png


二进制
Templates/BaseGame/game/tools/gui/images/tab-border.png


二进制
Templates/BaseGame/game/tools/gui/images/tab.png


二进制
Templates/BaseGame/game/tools/gui/images/textEdit.png


二进制
Templates/BaseGame/game/tools/gui/images/textEditFrame.png


二进制
Templates/BaseGame/game/tools/gui/images/textEditSliderBox.png


二进制
Templates/BaseGame/game/tools/gui/images/toolbar-window.png


二进制
Templates/BaseGame/game/tools/gui/images/treeView.png


二进制
Templates/BaseGame/game/tools/gui/images/window.png


+ 133 - 179
Templates/BaseGame/game/tools/gui/profiles.ed.cs

@@ -38,25 +38,25 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
 
    // fill color
    opaque = false;
-   fillColor = "242 241 240";
-   fillColorHL ="228 228 235";
-   fillColorSEL = "98 100 137";
-   fillColorNA = "255 255 255 ";
+   fillColor = "48 48 48";
+   fillColorHL = "91 101 116";
+   fillColorSEL = "91 101 116";
+   fillColorNA = "255 0 255 ";
 
    // border color
    border = 0;
-   borderColor   = "100 100 100"; 
-   borderColorHL = "50 50 50 50";
-   borderColorNA = "75 75 75"; 
+   borderColor   = "34 34 34"; 
+   borderColorHL = "91 101 116";
+   borderColorNA = "32 32 32"; 
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
    fontCharset = ANSI;
 
-   fontColor = "0 0 0";
-   fontColorHL = "0 0 0";
-   fontColorNA = "0 0 0";
+   fontColor = "215 215 215";
+   fontColorHL = "215 215 215";
+   fontColorNA = "215 215 215";
    fontColorSEL= "255 255 255";
 
    // bitmap information
@@ -71,7 +71,7 @@ new GuiControlProfile (ToolsGuiDefaultProfile)
    autoSizeHeight = false;
    returnTab = false;
    numbersOnly = false;
-   cursorColor = "0 0 0 255";
+   cursorColor = "215 215 215 255";
 
    // sounds
    //soundButtonDown = "";
@@ -118,15 +118,15 @@ if( !isObject( ToolsGuiToolTipProfile ) )
 new GuiControlProfile (ToolsGuiToolTipProfile)
 {
    // fill color
-   fillColor = "239 237 222";
+   fillColor = "255 255 255";
 
    // border color
-   borderColor   = "138 134 122";
+   borderColor   = "0 0 0";
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
-   fontColor = "0 0 0";
+   fontColor = "24 24 24";
 
    category = "Tools";
 };
@@ -141,7 +141,7 @@ new GuiControlProfile( ToolsGuiModelessDialogProfile )
 if( !isObject( ToolsGuiFrameSetProfile ) )
 new GuiControlProfile (ToolsGuiFrameSetProfile)
 {
-   fillcolor = "255 255 255";
+   fillColor = "48 48 48";
    borderColor = "246 245 244";
    border = 1;
    opaque = true;
@@ -153,17 +153,17 @@ if( !isObject( ToolsGuiWindowProfile ) )
 new GuiControlProfile (ToolsGuiWindowProfile)
 {
    opaque = false;
-   border = 2;
-   fillColor = "242 241 240";
-   fillColorHL = "221 221 221";
-   fillColorNA = "200 200 200";
-   fontColor = "50 50 50";
-   fontColorHL = "0 0 0";
+   border = 1;
+   fillColor = "48 48 48";
+   fillColorHL = "42 42 42";
+   fillColorNA = "42 42 42";
+   fontColor = "215 215 215";
+   fontColorHL = "215 215 215";
    bevelColorHL = "255 255 255";
    bevelColorLL = "0 0 0";
    text = "untitled";
    bitmap = "./images/window";
-   textOffset = "8 4";
+   textOffset = "10 4";
    hasBitmapArray = true;
    justify = "left";
    category = "Tools";
@@ -187,15 +187,15 @@ if( !isObject( ToolsGuiTextProfile ) )
 new GuiControlProfile (ToolsGuiTextProfile)
 {
    justify = "left";
-   fontColor = "20 20 20";
+   fontColor = "185 185 185";
    category = "Tools";
 };
 
 if( !isObject( ToolsGuiTextBoldCenterProfile ) )
 new GuiControlProfile (ToolsGuiTextBoldCenterProfile : ToolsGuiTextProfile)
 {
-   fontColor = "50 50 50";
-   fontType = "Arial Bold";
+   fontColor = "165 165 165";
+   fontType = "Noto Sans Bold";
    fontSize = 16;
    justify = "center";
    category = "Tools";
@@ -225,7 +225,7 @@ new GuiControlProfile (ToolsGuiInspectorTitleTextProfile)
 if( !isObject( ToolsGuiAutoSizeTextProfile ) )
 new GuiControlProfile (ToolsGuiAutoSizeTextProfile)
 {
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    autoSizeWidth = true;
    autoSizeHeight = true;   
    category = "Tools";
@@ -245,10 +245,10 @@ new GuiControlProfile( ToolsGuiMLTextProfile )
 if( !isObject( ToolsGuiTextArrayProfile ) )
 new GuiControlProfile( ToolsGuiTextArrayProfile : ToolsGuiTextProfile )
 {
-   fontColor = "50 50 50";
-   fontColorHL = " 0 0 0";
-   fontColorSEL = "0 0 0";
-   fillColor ="200 200 200";
+   fontColor = "165 165 165";
+   fontColorHL = "215 215 215";
+   fontColorSEL = "215 215 215";
+   fillColor = "200 200 200";
    fillColorHL = "228 228 235";
    fillColorSEL = "200 200 200";
    border = false;
@@ -272,34 +272,10 @@ new GuiControlProfile( ToolsGuiTextEditProfile )
    border = -2; // fix to display textEdit img
    //borderWidth = "1";  // fix to display textEdit img
    //borderColor = "100 100 100";
-   fillColor = "242 241 240 0";
-   fillColorHL = "255 255 255";
-   fontColor = "0 0 0";
-   fontColorHL = "255 255 255";
-   fontColorSEL = "98 100 137";
-   fontColorNA = "200 200 200";
-   textOffset = "4 2";
-   autoSizeWidth = false;
-   autoSizeHeight = true;
-   justify = "left";
-   tab = true;
-   canKeyFocus = true;   
-   category = "Tools";
-};
-
-if( !isObject( ToolsGuiTextEditErrorProfile ) )
-new GuiControlProfile( ToolsGuiTextEditErrorProfile )
-{
-   opaque = true;
-   bitmap = "./images/textEditFrame";
-   hasBitmapArray = true; 
-   border = -2; // fix to display textEdit img
-   //borderWidth = "1";  // fix to display textEdit img
-   //borderColor = "100 100 100";
-   fillColor = "242 241 240 0";
-   fillColorHL = "255 255 255";
-   fontColor = "0 0 0";
-   fontColorHL = "255 0 0";
+   fillColor = "42 42 42 0";
+   fillColorHL = "91 101 116";
+   fontColor = "215 215 215";
+   fontColorHL = "115 115 115";
    fontColorSEL = "98 100 137";
    fontColorNA = "200 200 200";
    textOffset = "4 2";
@@ -311,31 +287,6 @@ new GuiControlProfile( ToolsGuiTextEditErrorProfile )
    category = "Tools";
 };
 
-if( !isObject( ToolsGuiTextEditCenterProfile ) )
-new GuiControlProfile (ToolsGuiTextEditCenterProfile)
-{
-   opaque = true;
-   //bitmap = "./images/textEditFrame";
-   //hasBitmapArray = true; 
-   border = -2; // fix to display textEdit img
-   //borderWidth = "1";  // fix to display textEdit img
-   //borderColor = "100 100 100";
-   fillColor = "255 255 255 0";
-   fillColorHL = "72 72 72";
-   fillColorSEL = "255 255 255";
-   fontColor = "196 196 196 255";
-   fontColorHL = "255 255 255";
-   fontColorSEL = "0 0 0";
-   fontColorNA = "196 196 196 255";
-   textOffset = "4 2";
-   autoSizeWidth = false;
-   autoSizeHeight = true;
-   justify = "center";
-   tab = true;
-   canKeyFocus = true;   
-   category = "Tools";
-};
-
 if( !isObject( ToolsGuiNumericTextEditProfile ) )
 new GuiControlProfile( ToolsGuiNumericTextEditProfile : ToolsGuiTextEditProfile )
 {
@@ -363,8 +314,8 @@ if( !isObject( ToolsGuiProgressTextProfile ) )
 new GuiControlProfile( ToolsGuiProgressTextProfile )
 {
    fontSize = "14";
-	fontType = "Arial";
-   fontColor = "0 0 0";
+	fontType = "Noto Sans";
+   fontColor = "215 215 215";
    justify = "center";
    category = "Tools";   
 };
@@ -374,8 +325,8 @@ new GuiControlProfile( ToolsGuiButtonProfile )
 {
    opaque = true;
    border = true;
-   fontColor = "50 50 50";
-   fontColorHL = "0 0 0";
+   fontColor = "165 165 165";
+   fontColorHL = "215 215 215";
    fontColorNA = "200 200 200";
    fixedExtent = false;
    justify = "center";
@@ -397,8 +348,8 @@ new GuiControlProfile( ToolsGuiIconButtonProfile )
 {
    opaque = true;
    border = true;
-   fontColor = "50 50 50";
-   fontColorHL = "0 0 0";
+   fontColor = "165 165 165";
+   fontColorHL = "215 215 215";
    fontColorNA = "200 200 200";
    fixedExtent = false;
    justify = "center";
@@ -420,10 +371,12 @@ new GuiControlProfile(ToolsGuiEditorTabPage)
 {
    opaque = true;
    border = false;
-   fontColor = "0 0 0";
-   fontColorHL = "0 0 0";
+   fillColor = "48 48 48";
+   fontColor = "215 215 215";
+   fontColorHL = "150 150 150";
+   borderColor = "34 34 34";
    fixedExtent = false;
-   justify = "center";
+   justify = "left";
    canKeyFocus = false;
    bitmap = "./images/tab";
    hasBitmapArray = true;
@@ -438,7 +391,7 @@ new GuiControlProfile( ToolsGuiCheckBoxProfile )
    border = false;
    borderColor = "100 100 100";
    fontSize = 14;
-   fontColor = "20 20 20";
+   fontColor = "185 185 185";
    fontColorHL = "80 80 80";
 	fontColorNA = "200 200 200";
    fixedExtent = true;
@@ -473,7 +426,7 @@ new GuiControlProfile( ToolsGuiRadioProfile )
 {
    fontSize = 14;
    fillColor = "232 232 232";
-   fontColor = "20 20 20";
+   fontColor = "185 185 185";
    fontColorHL = "80 80 80";
    fixedExtent = true;
    bitmap = "./images/radioButton";
@@ -485,9 +438,10 @@ if( !isObject( ToolsGuiScrollProfile ) )
 new GuiControlProfile( ToolsGuiScrollProfile )
 {
    opaque = true;
-   fillcolor = "255 255 255";
-   fontColor = "0 0 0";
+   fillColor = "48 48 48";
+   fontColor = "215 215 215";
    fontColorHL = "150 150 150";
+   borderColor = "34 34 34";
    border = true;
    bitmap = "./images/scrollBar";
    hasBitmapArray = true;
@@ -498,10 +452,10 @@ if( !isObject( ToolsGuiOverlayProfile ) )
 new GuiControlProfile( ToolsGuiOverlayProfile )
 {
    opaque = true;
-   fillcolor = "255 255 255";
-   fontColor = "0 0 0";
+   fillColor = "48 48 48";
+   fontColor = "215 215 215";
    fontColorHL = "255 255 255";
-	fillColor = "0 0 0 100";
+   fillColor = "0 0 0 100";
    category = "Tools";
 };
 
@@ -524,8 +478,8 @@ new GuiControlProfile( ToolsGuiPopupMenuItemBorder : ToolsGuiButtonProfile )
 {
    opaque = true;
    border = true;
-   fontColor = "0 0 0";
-   fontColorHL = "0 0 0";
+   fontColor = "215 215 215";
+   fontColorHL = "215 215 215";
    fontColorNA = "255 255 255";
    fixedExtent = false;
    justify = "center";
@@ -546,12 +500,12 @@ new GuiControlProfile( ToolsGuiPopUpMenuDefault : ToolsGuiDefaultProfile )
    bitmap = "./images/scrollbar";
    hasBitmapArray = true;
    profileForChildren = ToolsGuiPopupMenuItemBorder;
-   fillColor = "242 241 240 ";//"255 255 255";//100
-   fillColorHL = "228 228 235 ";//"204 203 202";
-   fillColorSEL = "98 100 137 ";//"204 203 202";
+   fillColor = "48 48 48";//"255 255 255";//100
+   fillColorHL = "228 228 235 ";//"91 101 116";
+   fillColorSEL = "98 100 137 ";//"91 101 116";
    // font color is black
-   fontColorHL = "0 0 0 ";//"0 0 0";
-   fontColorSEL = "255 255 255";//"0 0 0";
+   fontColorHL = "215 215 215 ";//"215 215 215";
+   fontColorSEL = "255 255 255";//"215 215 215";
    borderColor = "100 100 100";
    category = "Tools";
 };
@@ -604,18 +558,18 @@ new GuiControlProfile( ToolsGuiTabBookProfile )
 {
    fillColorHL = "100 100 100";
    fillColorNA = "150 150 150";
-   fontColor = "30 30 30";
-   fontColorHL = "0 0 0";
+   fontColor = "215 215 215";
+   fontColorHL = "215 215 215";
    fontColorNA = "50 50 50";
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
    justify = "center";
    bitmap = "./images/tab";
-   tabWidth = 64;
-   tabHeight = 24;
+   tabWidth = 65;
+   tabHeight = 25;
    tabPosition = "Top";
    tabRotation = "Horizontal";
-   textOffset = "0 -3";
+   textOffset = "10 0";
    tab = true;
    cankeyfocus = true;
    category = "Tools";
@@ -631,7 +585,7 @@ new GuiControlProfile( ToolsGuiTabBookNoBitmapProfile : ToolsGuiTabBookProfile )
 if( !isObject( ToolsGuiTabPageProfile ) )
 new GuiControlProfile( ToolsGuiTabPageProfile : ToolsGuiDefaultProfile )
 {
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 10;
    justify = "center";
    bitmap = "./images/tab";
@@ -646,16 +600,16 @@ new GuiControlProfile( ToolsGuiTreeViewProfile )
    bitmap = "./images/treeView";
    autoSizeHeight = true;
    canKeyFocus = true;
-   fillColor = "255 255 255"; 
-   fillColorHL = "228 228 235";
-   fillColorSEL = "98 100 137";
-   fillColorNA = "255 255 255";
-   fontColor = "0 0 0";
-   fontColorHL = "0 0 0";   
-   fontColorSEL= "255 255 255";
-   fontColorNA = "200 200 200";
-   borderColor = "128 000 000";
-   borderColorHL = "255 228 235";
+   fillColor = "48 48 48"; 
+   fillColorHL = "116 116 116";
+   fillColorSEL = "91 101 116";
+   fillColorNA = "40 40 40";
+   fontColor = "215 215 215";
+   fontColorHL = "240 240 240";   
+   fontColorSEL= "240 240 240";
+   fontColorNA = "150 150 150";
+   borderColor = "34 34 34";
+   borderColorHL = "34 34 34";
    fontSize = 14;   
    opaque = false;
    border = false;
@@ -672,7 +626,7 @@ new GuiControlProfile( ToolsGuiTextPadProfile )
    
    // Deviate from the Default
    opaque=true;  
-   fillColor = "255 255 255";   
+   fillColor = "48 48 48";   
    border = 0;
    category = "Tools";
 };
@@ -697,9 +651,9 @@ singleton GuiControlProfile( GuiEditorClassProfile )
    opaque = true;
    fillColor = "232 232 232";
    border = 1;
-   borderColor   = "40 40 40 140";
+   borderColor   = "42 42 42 140";
    borderColorHL = "127 127 127";
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    fontColorHL = "50 50 50";
    fixedExtent = true;
    justify = "center";
@@ -714,9 +668,9 @@ singleton GuiControlProfile( GuiBackFillProfile )
    fillColor = "0 94 94";
    border = true;
    borderColor = "255 128 128";
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 12;
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    fontColorHL = "50 50 50";
    fixedExtent = true;
    justify = "center";
@@ -726,12 +680,12 @@ singleton GuiControlProfile( GuiBackFillProfile )
 singleton GuiControlProfile( GuiControlListPopupProfile )
 {
    opaque = true;
-   fillColor = "255 255 255";
-   fillColorHL = "204 203 202";
+   fillColor = "48 48 48";
+   fillColorHL = "91 101 116";
    border = false;
    //borderColor = "0 0 0";
-   fontColor = "0 0 0";
-   fontColorHL = "0 0 0";
+   fontColor = "215 215 215";
+   fontColorHL = "240 240 240";
    fontColorNA = "50 50 50";
    textOffset = "0 2";
    autoSizeWidth = false;
@@ -771,7 +725,7 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
    // Transparent Background
    opaque = true;
    fillColor = "0 0 0 0";
-   fillColorHL = "255 255 255";
+   fillColorHL = "91 101 116";
 
    // No Border (Rendered by field control)
    border = false;
@@ -780,12 +734,12 @@ singleton GuiControlProfile( GuiInspectorTextEditProfile )
    canKeyFocus = true;
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
 
-   fontColor = "0 0 0";
-   fontColorSEL = "43 107 206";
-   fontColorHL = "244 244 244";
+   fontColor = "215 215 215";
+   fontColorSEL = "0 140 220";
+   fontColorHL = "240 240 240";
    fontColorNA = "100 100 100";
    category = "Editor";
 };
@@ -802,11 +756,11 @@ singleton GuiControlProfile( GuiInspectorTextEditRightProfile : GuiInspectorText
 
 singleton GuiControlProfile( GuiInspectorGroupProfile )
 {
-   fontType    = "Arial";
+   fontType    = "Noto Sans";
    fontSize    = "14";
    
-   fontColor = "0 0 0 150";
-   fontColorHL = "25 25 25 220";
+   fontColor = "215 215 215 150";
+   fontColorHL = "215 215 215 220";
    fontColorNA = "128 128 128";
    
    justify = "left";
@@ -824,8 +778,8 @@ singleton GuiControlProfile( GuiInspectorFieldProfile)
 {
    // fill color
    opaque = false;
-   fillColor = "255 255 255";
-   fillColorHL = "204 203 202";
+   fillColor = "48 48 48";
+   fillColorHL = "91 101 116";
    fillColorNA = "244 244 244";
 
    // border color
@@ -838,11 +792,11 @@ singleton GuiControlProfile( GuiInspectorFieldProfile)
    //bevelColorLL = "0 0 0";
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
 
-   fontColor = "32 32 32";
-   fontColorHL = "50 50 50";
+   fontColor = "240 240 240";
+   fontColorHL = "240 240 240";
    fontColorNA = "190 190 190";
    textOffset = "10 0";
 
@@ -870,7 +824,7 @@ singleton GuiControlProfile( GuiInspectorDynamicFieldProfile : GuiInspectorField
    // Transparent Background
    opaque = true;
    fillColor = "0 0 0 0";
-   fillColorHL = "255 255 255";
+   fillColorHL = "91 101 116";
 
    // No Border (Rendered by field control)
    border = false;
@@ -879,21 +833,25 @@ singleton GuiControlProfile( GuiInspectorDynamicFieldProfile : GuiInspectorField
    canKeyFocus = true;
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
 
-   fontColor = "0 0 0";
-   fontColorSEL = "43 107 206";
-   fontColorHL = "244 244 244";
+   fontColor = "215 215 215";
+   fontColorSEL = "0 140 220";
+   fontColorHL = "240 240 240";
    fontColorNA = "100 100 100";
    category = "Editor";
 };
 
 singleton GuiControlProfile( GuiRolloutProfile )
 {
-   border = 1;
+   border = 0;
    borderColor = "200 200 200";
    
+   fontColor = "240 240 240";
+   fontColorHL = "240 240 240";
+   fontColorNA = "190 190 190";
+   
    hasBitmapArray = true;
    bitmap = "tools/editorClasses/gui/images/rollout";
    
@@ -904,12 +862,12 @@ singleton GuiControlProfile( GuiRolloutProfile )
 singleton GuiControlProfile( GuiInspectorRolloutProfile0 )
 {
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
 
    fontColor = "32 32 32";
    fontColorHL = "32 100 100";
-   fontColorNA = "0 0 0";
+   fontColorNA = "215 215 215";
    
    justify = "left";
    opaque = false;
@@ -935,7 +893,7 @@ singleton GuiControlProfile( GuiInspectorStackProfile )
 singleton GuiControlProfile( GuiInspectorProfile  : GuiInspectorFieldProfile )
 {
    opaque = true;
-   fillColor = "255 255 255 255";
+   fillColor = "42 42 42 255";
    border = 0;
    cankeyfocus = true;
    tab = true;
@@ -944,7 +902,7 @@ singleton GuiControlProfile( GuiInspectorProfile  : GuiInspectorFieldProfile )
 singleton GuiControlProfile( GuiInspectorInfoProfile  : GuiInspectorFieldProfile )
 {
    opaque = true;
-   fillColor = "242 241 240";
+   fillColor = "48 48 48";
    border = 0;
    cankeyfocus = true;
    tab = true;
@@ -971,18 +929,18 @@ singleton GuiControlProfile( GuiInspectorTypeFileNameProfile )
    canKeyFocus = true;
 
    // font
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
    
    // Center text
    justify = "center";
 
-   fontColor = "32 32 32";
-   fontColorHL = "50 50 50";
-   fontColorNA = "0 0 0";
+   fontColor = "240 240 240";
+   fontColorHL = "240 240 240";
+   fontColorNA = "215 215 215";
 
-   fillColor = "255 255 255";
-   fillColorHL = "204 203 202";
+   fillColor = "48 48 48";
+   fillColorHL = "91 101 116";
    fillColorNA = "244 244 244";
 
    borderColor   = "190 190 190";
@@ -1023,7 +981,7 @@ singleton GuiControlProfile( InspectorTypeCheckboxProfile : GuiInspectorFieldPro
 singleton GuiControlProfile( GuiToolboxButtonProfile : ToolsGuiButtonProfile )
 {
    justify = "center";
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    border = 0;
    textOffset = "0 0";   
    category = "Editor";
@@ -1031,22 +989,22 @@ singleton GuiControlProfile( GuiToolboxButtonProfile : ToolsGuiButtonProfile )
 
 singleton GuiControlProfile( GuiDirectoryTreeProfile : ToolsGuiTreeViewProfile )
 {
-   fontColor = "40 40 40";
+   fontColor = "240 240 240";
    fontColorSEL= "250 250 250 175"; 
    fillColorHL = "0 60 150";
    fontColorNA = "240 240 240";
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
    category = "Editor";
 };
 
 singleton GuiControlProfile( GuiDirectoryFileListProfile )
 {
-   fontColor = "40 40 40";
+   fontColor = "240 240 240";
    fontColorSEL= "250 250 250 175"; 
    fillColorHL = "0 60 150";
    fontColorNA = "240 240 240";
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
    category = "Editor";
 };
@@ -1095,10 +1053,10 @@ singleton GuiControlProfile( GuiCreatorIconButtonProfile )
    //tab = true;
    //canKeyFocus = true;
 
-   fontType = "Arial";
+   fontType = "Noto Sans";
    fontSize = 14;
 
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    fontColorSEL = "43 107 206";
    fontColorHL = "244 244 244";
    fontColorNA = "100 100 100";
@@ -1115,16 +1073,12 @@ singleton GuiControlProfile( GuiCreatorIconButtonProfile )
 
 singleton GuiControlProfile( GuiMenuBarProfile )
 {
-   fillcolor = "255 255 255";
-   fillcolorHL = "213 231 248";
-   
-   fontColorNA = "180 180 180";
-   
-   border = 1;
+   fillColor = "48 48 48";
+   fillcolorHL = "42 42 42";
+   borderColor = "30 30 30 255";
+   borderColorHL = "30 30 30 255";
+   border = 0;
    borderThickness = 1;
-   borderColor = "128 128 128";
-   borderColorHL = "122 177 232";
-   
    opaque = true;
    mouseOverSelected = true;
    category = "Editor";

+ 39 - 39
Templates/BaseGame/game/tools/settings.xml

@@ -1,82 +1,82 @@
 <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
 <EditorSettings>
-    <Group name="NavEditor">
-        <Setting name="SpawnClass">AIPlayer</Setting>
-    </Group>
     <Group name="WorldEditor">
-        <Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
-        <Setting name="dropType">screenCenter</Setting>
-        <Setting name="undoLimit">40</Setting>
         <Setting name="forceLoadDAE">0</Setting>
+        <Setting name="currentEditor">WorldEditorInspectorPlugin</Setting>
         <Setting name="displayType">6</Setting>
+        <Setting name="dropType">screenCenter</Setting>
         <Setting name="orthoFOV">50</Setting>
+        <Setting name="undoLimit">40</Setting>
         <Setting name="orthoShowGrid">1</Setting>
+        <Group name="ObjectIcons">
+            <Setting name="fadeIconsStartDist">8</Setting>
+            <Setting name="fadeIconsEndDist">20</Setting>
+            <Setting name="fadeIconsStartAlpha">255</Setting>
+            <Setting name="fadeIconsEndAlpha">0</Setting>
+            <Setting name="fadeIcons">1</Setting>
+        </Group>
+        <Group name="Color">
+            <Setting name="dragRectColor">255 255 0 255</Setting>
+            <Setting name="objSelectColor">255 0 0 255</Setting>
+            <Setting name="selectionBoxColor">255 255 0 255</Setting>
+            <Setting name="objMouseOverColor">0 255 0 255</Setting>
+            <Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
+            <Setting name="popupBackgroundColor">100 100 100 255</Setting>
+            <Setting name="objectTextColor">White</Setting>
+        </Group>
         <Group name="Render">
             <Setting name="renderPopupBackground">1</Setting>
             <Setting name="renderSelectionBox">1</Setting>
+            <Setting name="showMousePopupInfo">1</Setting>
             <Setting name="renderObjHandle">1</Setting>
             <Setting name="renderObjText">1</Setting>
-            <Setting name="showMousePopupInfo">1</Setting>
         </Group>
         <Group name="Images">
-            <Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
             <Setting name="selectHandle">tools/worldEditor/images/SelectHandle</Setting>
             <Setting name="defaultHandle">tools/worldEditor/images/DefaultHandle</Setting>
-        </Group>
-        <Group name="Color">
-            <Setting name="dragRectColor">255 255 0 255</Setting>
-            <Setting name="objectTextColor">255 255 255 255</Setting>
-            <Setting name="objMouseOverColor">0 255 0 255</Setting>
-            <Setting name="selectionBoxColor">255 255 0 255</Setting>
-            <Setting name="objMouseOverSelectColor">0 0 255 255</Setting>
-            <Setting name="objSelectColor">255 0 0 255</Setting>
-            <Setting name="popupBackgroundColor">100 100 100 255</Setting>
+            <Setting name="lockedHandle">tools/worldEditor/images/LockedHandle</Setting>
         </Group>
         <Group name="Grid">
-            <Setting name="gridColor">102 102 102 100</Setting>
-            <Setting name="gridSnap">0</Setting>
             <Setting name="gridSize">1</Setting>
-            <Setting name="gridMinorColor">51 51 51 100</Setting>
+            <Setting name="gridSnap">0</Setting>
+            <Setting name="gridColor">102 102 102 100</Setting>
             <Setting name="gridOriginColor">255 255 255 100</Setting>
+            <Setting name="gridMinorColor">51 51 51 100</Setting>
         </Group>
         <Group name="Tools">
-            <Setting name="objectsUseBoxCenter">1</Setting>
             <Setting name="snapSoftSize">2</Setting>
-            <Setting name="dropAtScreenCenterScalar">1</Setting>
             <Setting name="snapGround">0</Setting>
-            <Setting name="dropAtScreenCenterMax">100</Setting>
             <Setting name="boundingBoxCollision">0</Setting>
+            <Setting name="objectsUseBoxCenter">1</Setting>
+            <Setting name="dropAtScreenCenterScalar">1</Setting>
+            <Setting name="dropAtScreenCenterMax">100</Setting>
             <Setting name="snapSoft">0</Setting>
         </Group>
-        <Group name="ObjectIcons">
-            <Setting name="fadeIconsEndDist">20</Setting>
-            <Setting name="fadeIconsStartAlpha">255</Setting>
-            <Setting name="fadeIconsEndAlpha">0</Setting>
-            <Setting name="fadeIcons">1</Setting>
-            <Setting name="fadeIconsStartDist">8</Setting>
-        </Group>
         <Group name="Docs">
+            <Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
             <Setting name="documentationReference">../../../Documentation/Torque 3D - Script Manual.chm</Setting>
-            <Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
             <Setting name="documentationURL">http://www.garagegames.com/products/torque-3d/documentation/user</Setting>
-            <Setting name="forumURL">http://www.garagegames.com/products/torque-3d/forums</Setting>
+            <Setting name="documentationLocal">../../../Documentation/Official Documentation.html</Setting>
         </Group>
     </Group>
+    <Group name="NavEditor">
+        <Setting name="SpawnClass">AIPlayer</Setting>
+    </Group>
     <Group name="AxisGizmo">
-        <Setting name="axisGizmoMaxScreenLen">100</Setting>
         <Setting name="rotationSnap">15</Setting>
+        <Setting name="renderWhenUsed">0</Setting>
         <Setting name="snapRotations">0</Setting>
+        <Setting name="renderInfoText">1</Setting>
         <Setting name="mouseRotateScalar">0.8</Setting>
+        <Setting name="axisGizmoMaxScreenLen">100</Setting>
         <Setting name="mouseScaleScalar">0.8</Setting>
-        <Setting name="renderWhenUsed">0</Setting>
-        <Setting name="renderInfoText">1</Setting>
         <Group name="Grid">
-            <Setting name="gridColor">255 255 255 20</Setting>
-            <Setting name="renderPlaneHashes">0</Setting>
-            <Setting name="planeDim">500</Setting>
             <Setting name="renderPlane">0</Setting>
-            <Setting name="snapToGrid">0</Setting>
             <Setting name="gridSize">10 10 10</Setting>
+            <Setting name="planeDim">500</Setting>
+            <Setting name="renderPlaneHashes">0</Setting>
+            <Setting name="gridColor">255 255 255 20</Setting>
+            <Setting name="snapToGrid">0</Setting>
         </Group>
     </Group>
     <Group name="LevelInformation">

+ 7 - 9
Templates/BaseGame/game/tools/worldEditor/gui/EditorGui.ed.gui

@@ -317,7 +317,7 @@
       HorizSizing = "width";
       VertSizing = "top";
       Position = "0 578";
-      Extent = "800 22";
+      Extent = "800 35";
       MinExtent = "8 8";
       canSave = "1";
       Visible = "1";
@@ -331,14 +331,12 @@
          Profile = "ToolsGuiTextProfile";
          HorizSizing = "width";
          VertSizing = "bottom";
-         Position = "3 2";
+         Position = "10 8";
          Extent = "450 18";
          MinExtent = "8 8";
          canSave = "1";
          Visible = "1";
          hovertime = "1000";
-         Margin = "0 0 0 0";
-         Padding = "0 0 0 0";
          AnchorTop = "1";
          AnchorBottom = "0";
          AnchorLeft = "1";
@@ -352,7 +350,7 @@
          Profile = "ToolsGuiDefaultProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         position = "459 2";
+         position = "465 8";
          Extent = "2 18";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -365,7 +363,7 @@
          Profile = "ToolsGuiTextProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         Position = "469 2";
+         Position = "485 8";
          Extent = "180 18";
          MinExtent = "8 8";
          canSave = "1";
@@ -377,7 +375,7 @@
          AnchorBottom = "0";
          AnchorLeft = "1";
          AnchorRight = "0";
-         text = "";
+         text = "Ready.";
          maxLength = "255";
       };
       
@@ -386,7 +384,7 @@
          Profile = "ToolsGuiDefaultProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         position = "659 2";
+         position = "645 8";
          Extent = "2 18";
          MinExtent = "1 1";
          bitmap = "tools/gui/images/separator-h.png";
@@ -399,7 +397,7 @@
          Profile = "ToolsGuiPopUpMenuProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         Position = "667 2";
+         Position = "665 8";
          Extent = "120 18";
          MinExtent = "8 8";
          canSave = "1";

+ 13 - 13
Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorInspectorWindow.ed.gui

@@ -19,16 +19,16 @@
       Enabled = "1";
       isContainer = "1";
       Profile = "ToolsGuiWindowProfile";
-      Position = getWord($pref::Video::mode, 0) - 209 SPC 
-         getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) - 2;
-      Extent = "210 373";
-      MinExtent = "210 140";
+      Position = getWord($pref::Video::mode, 0) - 330 SPC 
+         getWord(EditorGuiToolbar.extent, 1) + getWord(EWTreeWindow.extent, 1) + 40;
+      Extent = "300 250";
+      MinExtent = "200 150";
       HorizSizing = "windowRelative";
       VertSizing = "windowRelative";
       canSave = "1";
       Visible = "1";
       hovertime = "1000";
-      Margin = "8 8 8 8";
+      Margin = "5 5 5 5";
       Padding = "0 0 0 0";
       AnchorTop = "1";
       AnchorBottom = "0";
@@ -52,7 +52,7 @@
          Profile = "ToolsGuiDefaultProfile";
          HorizSizing = "width";
          VertSizing = "height";
-         Position = "4 24";
+         Position = "5 24";
          Extent = "202 304";
          MinExtent = "64 64";
          canSave = "1";
@@ -60,7 +60,7 @@
          tooltipprofile = "ToolsGuiToolTipProfile";
          hovertime = "1000";
          Docking = "client";
-         Margin = "3 41 3 3";
+         Margin = "0 43 0 5";
          Padding = "0 0 0 0";
          AnchorTop = "1";
          AnchorBottom = "0";
@@ -74,8 +74,8 @@
             Profile = "GuiEditorScrollProfile";
             HorizSizing = "width";
             VertSizing = "height";
-            Position = "0 0";
-            Extent = "202 304";
+            Position = "5 5";
+            Extent = "187 238";
             MinExtent = "8 8";
             canSave = "1";
             Visible = "1";
@@ -90,7 +90,7 @@
             AnchorRight = "0";
             willFirstRespond = "1";
             hScrollBar = "alwaysOff";
-            vScrollBar = "dynamic";
+            vScrollBar = "alwaysOn";
             lockHorizScroll = "true";
             lockVertScroll = "false";
             constantThumbHeight = "0";
@@ -126,14 +126,14 @@
          Profile = "GuiInspectorFieldInfoMLTextProfile";
          HorizSizing = "width";
          VertSizing = "top";
-         Position = "1 328";
-         Extent = "205 14";
+         Position = "6 205";
+         Extent = "197 35";
          MinExtent = "8 2";
          canSave = "1";
          Visible = "1";
          tooltipprofile = "ToolsGuiToolTipProfile";
          hovertime = "1000";
-         lineSpacing = "2";
+         lineSpacing = "3";
          allowColorChars = "0";
          maxChars = "-1";
          useURLMouseCursor = "0";

+ 28 - 28
Templates/BaseGame/game/tools/worldEditor/gui/WorldEditorTreeWindow.ed.gui

@@ -19,16 +19,16 @@
       Enabled = "1";
       isContainer = "1";
       Profile = "ToolsGuiWindowProfile";
-      Position = firstWord($pref::Video::mode) - 209
-         SPC getWord(EditorGuiToolbar.extent, 1) -1;
-      Extent = "210 324";
-      MinExtent = "210 140";
+      Position = firstWord($pref::Video::mode) - 330
+         SPC getWord(EditorGuiToolbar.extent, 1) + 40;
+      Extent = "300 270";
+      MinExtent = "200 250";
       HorizSizing = "windowRelative";
       VertSizing = "windowRelative";
       canSave = "1";
       Visible = "1";
       hovertime = "1000";
-      Margin = "8 8 8 8";
+      Margin = "0 0 0 0";
       Padding = "0 0 0 0";
       AnchorTop = "1";
       AnchorBottom = "0";
@@ -38,7 +38,7 @@
       resizeHeight = "1";
       canMove = "1";
       canClose = "0";
-      canMinimize = "0";
+      canMinimize = "1";
       canMaximize = "0";
       minSize = "50 50";
       closeCommand = "EWTreeWindow.setVisible(false);";
@@ -58,7 +58,7 @@
          canSave = "1";
          Visible = "1";
          hovertime = "1000";
-         Margin = "3 2 3 3";
+         Margin = "0 0 0 0";
          Docking = "client";
          Padding = "0 0 0 0";
          AnchorTop = "1";
@@ -67,7 +67,7 @@
          AnchorRight = "0";
          TabPosition = "Top";
          TabMargin = "0";
-         MinTabWidth = "64";
+         MinTabWidth = "65";
          
          new GuiTabPageCtrl() {
             canSaveDynamicFields = "0";
@@ -92,8 +92,8 @@
             maxLength = "1024";
 
             new GuiTextEditCtrl( EditorTreeFilter ) {
-               position = "2 4";
-               extent = "175 18";
+               position = "5 6";
+               extent = "187 25";
                profile = "ToolsGuiTextEditProfile";
                horizSizing = "width";
                vertSizing = "bottom";
@@ -110,7 +110,7 @@
                Profile = "ToolsGuiDefaultProfile";
                HorizSizing = "left";
                VertSizing = "bottom";
-               position = "180 5";
+               position = "171 6";
                Extent = "17 17";
                MinExtent = "8 2";
                canSave = "1";
@@ -129,15 +129,15 @@
                Profile = "ToolsGuiScrollProfile";
                HorizSizing = "width";
                VertSizing = "height";
-               Position = "0 25";
-               Extent = "197 246";
+               Position = "5 29";
+               Extent = "187 238";
                MinExtent = "8 8";
                canSave = "1";
                Visible = "1";
                hovertime = "1000";
                willFirstRespond = "1";
                hScrollBar = "dynamic";
-               vScrollBar = "dynamic";
+               vScrollBar = "alwaysOn";
                lockHorizScroll = "false";
                lockVertScroll = "false";
                constantThumbHeight = "0";
@@ -148,18 +148,18 @@
                   Enabled = "1";
                   isContainer = "1";
                   Profile = "ToolsGuiTreeViewProfile";
-                  HorizSizing = "right";
+                  HorizSizing = "width";
                   VertSizing = "bottom";
-                  Position = "1 1";
-                  Extent = "193 21";
+                  Position = "0 0";
+                  Extent = "197 25";
                   MinExtent = "8 8";
                   canSave = "1";
                   Visible = "1";
                   hovertime = "1000";
                   tabSize = "16";
-                  textOffset = "2";
-                  fullRowSelect = "0";
-                  itemHeight = "21";
+                  textOffset = "5";
+                  fullRowSelect = "1";
+                  itemHeight = "25";
                   destroyTreeOnSleep = "1";
                   MouseDragging = "1";
                   MultipleSelections = "1";
@@ -219,7 +219,7 @@
             Profile = "ToolsGuiTabBorderProfile";
             HorizSizing = "width";
             VertSizing = "bottom";
-            position = "0 0";
+            position = "5 5";
             Extent = "198 271";
             MinExtent = "8 2";
             canSave = "0";
@@ -255,7 +255,7 @@
                tooltipprofile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
                Margin = "0 0 0 0";
-               Padding = "4 4 4 4";
+               Padding = "0 0 0 0";
                AnchorTop = "1";
                AnchorBottom = "0";
                AnchorLeft = "1";
@@ -387,8 +387,8 @@
                   Profile = "ToolsGuiTabBookProfile";
                   HorizSizing = "width";
                   VertSizing = "bottom";
-                  Position = "6 4";
-                  Extent = "198 21";
+                  Position = "0 4";
+                  Extent = "201 25";
                   MinExtent = "8 2";
                   canSave = "1";
                   Visible = "1";
@@ -402,7 +402,7 @@
                   AnchorLeft = "1";
                   AnchorRight = "0";
                   TabPosition = "Top";
-                  TabMargin = "4";
+                  TabMargin = "0";
                   MinTabWidth = "49";
 
                   new GuiTabPageCtrl() {
@@ -509,7 +509,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         Position = "157 26";
+         Position = "225 23";
          Extent = "16 16";
          MinExtent = "8 2";
          canSave = "1";
@@ -533,7 +533,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         Position = "173 26";
+         Position = "250 23";
          Extent = "16 16";
          MinExtent = "8 2";
          canSave = "1";
@@ -557,7 +557,7 @@
          Profile = "ToolsGuiButtonProfile";
          HorizSizing = "left";
          VertSizing = "bottom";
-         Position = "189 26";
+         Position = "275 23";
          Extent = "16 16";
          MinExtent = "8 2";
          canSave = "1";

+ 1206 - 1559
Templates/BaseGame/game/tools/worldEditor/gui/guiTerrainMaterialDlg.ed.gui

@@ -1,239 +1,637 @@
 //--- OBJECT WRITE BEGIN ---
-%guiContent = new GuiControl(TerrainMaterialDlg,EditorGuiGroup) {
-   position = "0 0";
-   extent = "1024 768";
-   minExtent = "8 2";
-   horizSizing = "right";
-   vertSizing = "bottom";
-   profile = "ToolsGuiDefaultProfile";
-   visible = "1";
-   active = "1";
-   tooltipProfile = "ToolsGuiToolTipProfile";
-   hovertime = "1000";
+%guiContent = new GuiControl(TerrainMaterialDlg, EditorGuiGroup) {
+   canSaveDynamicFields = "0";
    isContainer = "1";
+   Profile = "ToolsGuiDefaultProfile";
+   HorizSizing = "right";
+   VertSizing = "bottom";
+   position = "0 0";
+   Extent = "800 768";
+   MinExtent = "8 2";
    canSave = "1";
-   canSaveDynamicFields = "1";
-      activeMat = "17411";
-      matIndex = "0";
-      onApplyCallback = "EPainter_TerrainMaterialUpdateCallback";
+   Visible = "1";
+   tooltipprofile = "ToolsGuiToolTipProfile";
+   hovertime = "1000";
 
    new GuiWindowCtrl() {
-      text = "Terrain Materials Editor";
+      canSaveDynamicFields = "0";
+      isContainer = "1";
+      Profile = "ToolsGuiWindowProfile";
+      HorizSizing = "center";
+      VertSizing = "center";
+      position = "221 151";
+      Extent = "394 432";
+      MinExtent = "358 432";
+      canSave = "1";
+      Visible = "1";
+      tooltipprofile = "ToolsGuiToolTipProfile";
+      hovertime = "1000";
+      Docking = "None";
+      Margin = "4 4 4 4";
+      Padding = "0 0 0 0";
+      AnchorTop = "0";
+      AnchorBottom = "0";
+      AnchorLeft = "0";
+      AnchorRight = "0";
       resizeWidth = "1";
       resizeHeight = "1";
       canMove = "1";
       canClose = "1";
       canMinimize = "0";
       canMaximize = "0";
-      canCollapse = "0";
+      minSize = "50 50";
       closeCommand = "TerrainMaterialDlg.dialogCancel();";
-      edgeSnap = "0";
-      docking = "None";
-      margin = "4 4 4 4";
-      padding = "0 0 0 0";
-      anchorTop = "0";
-      anchorBottom = "0";
-      anchorLeft = "0";
-      anchorRight = "0";
-      position = "315 168";
-      extent = "394 432";
-      minExtent = "358 432";
-      horizSizing = "center";
-      vertSizing = "center";
-      profile = "ToolsGuiWindowProfile";
-      visible = "1";
-      active = "1";
-      tooltipProfile = "ToolsGuiToolTipProfile";
-      hovertime = "1000";
-      isContainer = "1";
-      canSave = "1";
-      canSaveDynamicFields = "0";
-
-      new GuiContainer() {
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "6 25";
-         extent = "189 64";
-         minExtent = "8 2";
-         horizSizing = "width";
-         vertSizing = "bottom";
-         profile = "inspectorStyleRolloutDarkProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
+      EdgeSnap = "0";
+      text = "Terrain Materials Editor";
+      new GuiContainer(){ //Node Properties
          isContainer = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiTextCtrl() {
+         Profile = "inspectorStyleRolloutDarkProfile";
+         HorizSizing = "width";
+         VertSizing = "bottom";
+         Position = "6 25";
+         Extent = "189 64";
+         
+         new GuiTextCtrl(){
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "right";
+            VertSizing = "bottom";
+            Position = "5 0";
+            Extent = "91 18";
             text = "Terrain Materials";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "5 0";
-            extent = "91 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "ToolsGuiDefaultProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
          };
          new GuiBitmapButtonCtrl() {
-            bitmap = "tools/gui/images/new";
-            bitmapMode = "Stretched";
-            autoFitExtents = "0";
-            useModifiers = "0";
-            useStates = "1";
-            masked = "0";
+            canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiButtonProfile";
+            HorizSizing = "left";
+            VertSizing = "top";
+            position = "160 2";
+            Extent = "15 15";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            Command = "TerrainMaterialDlg.newMat();";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
             groupNum = "-1";
             buttonType = "PushButton";
             useMouseEvents = "0";
-            position = "160 2";
-            extent = "15 15";
-            minExtent = "8 2";
-            horizSizing = "left";
-            vertSizing = "top";
-            profile = "ToolsGuiButtonProfile";
-            visible = "1";
-            active = "1";
-            command = "TerrainMaterialDlg.newMat();";
-            tooltipProfile = "ToolsGuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
+            bitmap = "tools/gui/images/new";
          };
          new GuiBitmapButtonCtrl() {
-            bitmap = "tools/gui/images/delete";
-            bitmapMode = "Stretched";
-            autoFitExtents = "0";
-            useModifiers = "0";
-            useStates = "1";
-            masked = "0";
+            canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiButtonProfile";
+            HorizSizing = "left";
+            VertSizing = "top";
+            position = "173 2";
+            Extent = "15 15";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            Command = "TerrainMaterialDlg.deleteMat();";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
             groupNum = "-1";
             buttonType = "PushButton";
             useMouseEvents = "0";
-            position = "173 2";
-            extent = "15 15";
-            minExtent = "8 2";
-            horizSizing = "left";
-            vertSizing = "top";
-            profile = "ToolsGuiButtonProfile";
-            visible = "1";
-            active = "1";
-            command = "TerrainMaterialDlg.deleteMat();";
-            tooltipProfile = "ToolsGuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "0";
-            canSave = "1";
-            canSaveDynamicFields = "0";
+            bitmap = "tools/gui/images/delete";
          };
       };
       new GuiContainer() {
-         margin = "0 0 0 0";
-         padding = "0 0 0 0";
-         anchorTop = "1";
-         anchorBottom = "0";
-         anchorLeft = "1";
-         anchorRight = "0";
-         position = "202 26";
-         extent = "185 363";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "height";
-         profile = "inspectorStyleRolloutProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
+         canSaveDynamicFields = "0";
          internalName = "matSettingsParent";
+         isContainer = "1";
+         Profile = "inspectorStyleRolloutProfile";
+         HorizSizing = "left";
+         VertSizing = "height";
+         position = "202 26";
+         Extent = "185 363";
+         MinExtent = "8 2";
          canSave = "1";
-         canSaveDynamicFields = "0";
+         Visible = "1";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
+         Margin = "0 0 0 0";
+         Padding = "0 0 0 0";
+         AnchorTop = "1";
+         AnchorBottom = "0";
+         AnchorLeft = "1";
+         AnchorRight = "0";
 
-         new GuiTextCtrl() {
-            text = "Name";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "8 22";
-            extent = "44 17";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "ToolsGuiTextProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "ToolsGuiDefaultProfile";
-            hovertime = "1000";
+         new GuiBitmapCtrl() {
+            canSaveDynamicFields = "0";
             isContainer = "0";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "1 0";
+            Extent = "183 2";
+            MinExtent = "8 2";
             canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            bitmap = "core/art/gui/images/separator-v";
+            wrap = "0";
+         };
+         new GuiTextCtrl() {
             canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiTextProfile";
+            HorizSizing = "right";
+            VertSizing = "bottom";
+            position = "8 22";
+            Extent = "44 17";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiDefaultProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
+            text = "Name";
+            maxLength = "1024";
          };
          new GuiTextEditCtrl() {
+            internalName = "matNameCtrl";
+            canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiTextEditProfile";
+            HorizSizing = "right";
+            VertSizing = "bottom";
+            position = "39 21";
+            Extent = "143 18";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
+            maxLength = "1024";
             historySize = "0";
+            password = "0";
             tabComplete = "0";
             sinkAllKeyEvents = "0";
-            password = "0";
             passwordMask = "*";
-            text = "sand";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "39 21";
-            extent = "143 18";
-            minExtent = "8 2";
-            horizSizing = "right";
-            vertSizing = "bottom";
-            profile = "ToolsGuiTextEditProfile";
-            visible = "1";
-            active = "1";
             altCommand = "TerrainMaterialDlg.setMaterialName( $ThisControl.getText() );";
-            tooltipProfile = "ToolsGuiToolTipProfile";
+         };
+         new GuiTextCtrl() {
+            canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiInspectorTitleTextProfile";
+            HorizSizing = "right";
+            VertSizing = "bottom";
+            position = "8 0";
+            Extent = "117 16";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
+            text = "Material Properties";
+            maxLength = "1024";
+         };
+         new GuiContainer() {
+            canSaveDynamicFields = "0";
+            isContainer = "1";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "6 43";
+            Extent = "185 75";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
             hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
+
+            new GuiCheckBoxCtrl() {
+               internalName = "sideProjectionCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiCheckBoxProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "55 54";
+               Extent = "119 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               text = " Use Side Projection";
+               groupNum = "-1";
+               buttonType = "ToggleButton";
+               useMouseEvents = "0";
+               useInactiveState = "0";
+            };
+            new GuiBitmapCtrl() {
+               internalName = "baseTexCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "47 47";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               bitmap = "tools/materialEditor/gui/unknownImage";
+               wrap = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "48 48";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeBase();";
+               tooltipprofile = "ToolsGuiDefaultProfile";
+               ToolTip = "Change the Active Diffuse Map for this layer";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "EditorTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "56 -3";
+               Extent = "39 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "Diffuse";
+               maxLength = "1024";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "width";
+               VertSizing = "bottom";
+               position = "56 16";
+               Extent = "116 17";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "None";
+               maxLength = "1024";
+            };
+            new GuiButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiButtonProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "116 0";
+               Extent = "40 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeBase();";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               text = "Edit";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "159 0";
+               Extent = "16 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg-->baseTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/gui/images/delete";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "132 35";
+               Extent = "39 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               text = "Size";
+               maxLength = "1024";
+            };
+            new GuiTextEditCtrl() {
+               internalName = "baseSizeCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextEditProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "94 34";
+               Extent = "34 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               maxLength = "1024";
+               historySize = "0";
+               password = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               passwordMask = "*";
+            };
+         };
+         new GuiBitmapCtrl() {
+            canSaveDynamicFields = "0";
             isContainer = "0";
-            internalName = "matNameCtrl";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "6 116";
+            Extent = "175 2";
+            MinExtent = "8 2";
             canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            bitmap = "tools/gui/images/separator-v";
+            wrap = "0";
+         };
+         new GuiContainer() {
             canSaveDynamicFields = "0";
+            isContainer = "1";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "6 295";
+            Extent = "185 50";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
+
+            new GuiBitmapCtrl() {
+               internalName = "normTexCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "47 47";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               bitmap = "tools/materialEditor/gui/unknownImage";
+               wrap = "0";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "EditorTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "56 -3";
+               Extent = "39 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "Normal";
+               maxLength = "1024";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "48 48";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeNormal();";
+               tooltipprofile = "ToolsGuiDefaultProfile";
+               ToolTip = "Change the active Normal Map for this layer.";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "width";
+               VertSizing = "bottom";
+               position = "56 15";
+               Extent = "116 17";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "None";
+               maxLength = "1024";
+            };
+            new GuiButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiButtonProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "116 0";
+               Extent = "40 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeNormal();";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               text = "Edit";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "159 0";
+               Extent = "16 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg-->normTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/gui/images/delete";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "92 34";
+               Extent = "77 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "Parallax Scale";
+               maxLength = "1024";
+            };
+            new GuiTextEditCtrl() {
+               internalName = "parallaxScaleCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextEditProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "55 33";
+               Extent = "34 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               text = "0.00";
+               maxLength = "1024";
+               historySize = "0";
+               password = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               passwordMask = "*";
+            };
          };
-         new GuiTextCtrl() {
-            text = "Material Properties";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "8 0";
-            extent = "117 16";
+
+         new GuiBitmapCtrl() {
+            bitmap = "tools/gui/images/separator-v";
+            wrap = "0";
+            position = "6 288";
+            extent = "175 2";
             minExtent = "8 2";
-            horizSizing = "right";
+            horizSizing = "width";
             vertSizing = "bottom";
-            profile = "ToolsGuiInspectorTitleTextProfile";
+            profile = "ToolsGuiDefaultProfile";
             visible = "1";
             active = "1";
             tooltipProfile = "ToolsGuiToolTipProfile";
@@ -242,27 +640,19 @@
             canSave = "1";
             canSaveDynamicFields = "0";
          };
-         new GuiScrollCtrl() {
-            willFirstRespond = "1";
-            hScrollBar = "dynamic";
-            vScrollBar = "dynamic";
-            lockHorizScroll = "1";
-            lockVertScroll = "0";
-            constantThumbHeight = "0";
-            childMargin = "0 0";
-            mouseWheelScrollSpeed = "-1";
+         new GuiContainer() {
             margin = "0 0 0 0";
             padding = "0 0 0 0";
             anchorTop = "1";
             anchorBottom = "0";
             anchorLeft = "1";
             anchorRight = "0";
-            position = "0 45";
-            extent = "189 329";
+            position = "6 122";
+            extent = "185 72";
             minExtent = "8 2";
             horizSizing = "width";
-            vertSizing = "height";
-            profile = "ToolsGuiScrollProfile";
+            vertSizing = "bottom";
+            profile = "ToolsGuiDefaultProfile";
             visible = "1";
             active = "1";
             tooltipProfile = "ToolsGuiToolTipProfile";
@@ -271,1473 +661,730 @@
             canSave = "1";
             canSaveDynamicFields = "0";
 
-            new GuiContainer() {
+            new GuiBitmapCtrl() {
+               bitmap = "tools/materialEditor/gui/unknownImage";
+               wrap = "0";
+               position = "1 1";
+               extent = "47 47";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               internalName = "macroTexCtrl";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+               bitmapMode = "Stretched";
+               autoFitExtents = "0";
+               useModifiers = "0";
+               useStates = "1";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               position = "1 1";
+               extent = "48 48";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiDefaultProfile";
+               visible = "1";
+               active = "1";
+               command = "TerrainMaterialDlg.changeMacro();";
+               tooltipProfile = "ToolsGuiDefaultProfile";
+               tooltip = "Change the active Macro Map for this layer.";
+               hovertime = "1000";
+               isContainer = "0";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiTextCtrl() {
+               text = "Macro";
+               maxLength = "1024";
                margin = "0 0 0 0";
                padding = "0 0 0 0";
                anchorTop = "1";
                anchorBottom = "0";
                anchorLeft = "1";
                anchorRight = "0";
-               position = "1 1";
-               extent = "174 73";
+               position = "56 -3";
+               extent = "34 18";
                minExtent = "8 2";
-               horizSizing = "width";
+               horizSizing = "right";
                vertSizing = "bottom";
-               profile = "ToolsGuiDefaultProfile";
+               profile = "EditorTextProfile";
                visible = "1";
                active = "1";
                tooltipProfile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
-               isContainer = "1";
+               isContainer = "0";
                canSave = "1";
                canSaveDynamicFields = "0";
-
-               new GuiCheckBoxCtrl() {
-                  text = " Use Side Projection";
-                  groupNum = "-1";
-                  buttonType = "ToggleButton";
-                  useMouseEvents = "0";
-                  position = "55 54";
-                  extent = "119 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiCheckBoxProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "sideProjectionCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapCtrl() {
-                  bitmap = "art/terrains/Example/sand";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 1";
-                  extent = "47 47";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "baseTexCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "1 1";
-                  extent = "48 48";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeBase();";
-                  tooltipProfile = "ToolsGuiDefaultProfile";
-                  tooltip = "Change the Active Diffuse Map for this layer";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Diffuse";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 -3";
-                  extent = "39 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "EditorTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "None";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 16";
-                  extent = "79 17";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiButtonCtrl() {
-                  text = "Edit";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "110 0";
-                  extent = "40 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiButtonProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeBase();";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/gui/images/delete";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "153 0";
-                  extent = "16 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg-->baseTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Size";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "132 35";
-                  extent = "39 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "200";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "94 34";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "baseSizeCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/gui/images/separator-v";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 71";
-                  extent = "148 2";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
             };
-            new GuiContainer() {
+            new GuiTextCtrl() {
+               text = "None";
+               maxLength = "1024";
                margin = "0 0 0 0";
                padding = "0 0 0 0";
                anchorTop = "1";
                anchorBottom = "0";
                anchorLeft = "1";
                anchorRight = "0";
-               position = "4 78";
-               extent = "174 76";
+               position = "56 17";
+               extent = "116 17";
                minExtent = "8 2";
                horizSizing = "width";
                vertSizing = "bottom";
+               profile = "ToolsGuiTextProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiButtonCtrl() {
+               text = "Edit";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               position = "116 0";
+               extent = "40 16";
+               minExtent = "8 2";
+               horizSizing = "left";
+               vertSizing = "bottom";
+               profile = "ToolsGuiButtonProfile";
+               visible = "1";
+               active = "1";
+               command = "TerrainMaterialDlg.changeMacro();";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               bitmap = "tools/gui/images/delete";
+               bitmapMode = "Stretched";
+               autoFitExtents = "0";
+               useModifiers = "0";
+               useStates = "1";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               position = "159 0";
+               extent = "16 16";
+               minExtent = "8 2";
+               horizSizing = "left";
+               vertSizing = "bottom";
                profile = "ToolsGuiDefaultProfile";
                visible = "1";
                active = "1";
+               command = "TerrainMaterialDlg-->macroTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
                tooltipProfile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
-               isContainer = "1";
+               isContainer = "0";
                canSave = "1";
                canSaveDynamicFields = "0";
-
-               new GuiBitmapCtrl() {
-                  bitmap = "art/terrains/Example/sand_d";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 1";
-                  extent = "47 47";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "detailTexCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "1 1";
-                  extent = "48 48";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeDetail();";
-                  tooltipProfile = "ToolsGuiDefaultProfile";
-                  tooltip = "Change the active Detail Map for this layer.";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Detail";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 -3";
-                  extent = "30 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "EditorTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "None";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 16";
-                  extent = "79 17";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiButtonCtrl() {
-                  text = "Edit";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "111 0";
-                  extent = "40 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiButtonProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeDetail();";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/gui/images/delete";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "154 0";
-                  extent = "16 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg-->detailTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Size";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "132 33";
-                  extent = "39 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "10";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "94 32";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "detSizeCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Strength";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "39 54";
-                  extent = "46 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "1";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "1 53";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "detStrengthCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Distance";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "132 54";
-                  extent = "45 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "100";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "94 53";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "detDistanceCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapCtrl() {
-                  bitmap = "core/art/gui/images/separator-v";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 73";
-                  extent = "148 2";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
             };
-            new GuiContainer() {
+            new GuiTextCtrl() {
+               text = "Size";
+               maxLength = "1024";
                margin = "0 0 0 0";
                padding = "0 0 0 0";
-               anchorTop = "1";
+               anchorTop = "0";
                anchorBottom = "0";
-               anchorLeft = "1";
+               anchorLeft = "0";
                anchorRight = "0";
-               position = "6 158";
-               extent = "174 54";
+               position = "132 33";
+               extent = "39 16";
                minExtent = "8 2";
-               horizSizing = "width";
+               horizSizing = "right";
                vertSizing = "bottom";
-               profile = "ToolsGuiDefaultProfile";
+               profile = "ToolsGuiTextProfile";
                visible = "1";
                active = "1";
                tooltipProfile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
-               isContainer = "1";
+               isContainer = "0";
                canSave = "1";
                canSaveDynamicFields = "0";
-
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/materialEditor/gui/unknownImage";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 1";
-                  extent = "47 47";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "normTexCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Normal";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 -3";
-                  extent = "39 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "EditorTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "1 1";
-                  extent = "48 48";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeNormal();";
-                  tooltipProfile = "ToolsGuiDefaultProfile";
-                  tooltip = "Change the active Normal Map for this layer.";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "None";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 15";
-                  extent = "79 17";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiButtonCtrl() {
-                  text = "Edit";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "111 0";
-                  extent = "40 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiButtonProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeNormal();";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/gui/images/delete";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "154 0";
-                  extent = "16 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg-->normTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Parallax Scale";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "92 34";
-                  extent = "77 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "0";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "55 33";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "parallaxScaleCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/gui/images/separator-v";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "-10 53";
-                  extent = "148 2";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
             };
-            new GuiContainer() {
+            new GuiTextEditCtrl() {
+               historySize = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               password = "0";
+               passwordMask = "*";
+               maxLength = "1024";
                margin = "0 0 0 0";
                padding = "0 0 0 0";
-               anchorTop = "1";
+               anchorTop = "0";
                anchorBottom = "0";
-               anchorLeft = "1";
+               anchorLeft = "0";
                anchorRight = "0";
-               position = "6 216";
-               extent = "174 53";
+               position = "94 32";
+               extent = "34 18";
                minExtent = "8 2";
-               horizSizing = "width";
+               horizSizing = "right";
                vertSizing = "bottom";
-               profile = "ToolsGuiDefaultProfile";
+               profile = "ToolsGuiTextEditProfile";
                visible = "1";
                active = "1";
                tooltipProfile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
-               isContainer = "1";
+               isContainer = "0";
+               internalName = "macroSizeCtrl";
                canSave = "1";
                canSaveDynamicFields = "0";
-
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/materialEditor/gui/unknownImage";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 1";
-                  extent = "47 47";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "compositeTexCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "1 1";
-                  extent = "48 48";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changecomposite();";
-                  tooltipProfile = "ToolsGuiDefaultProfile";
-                  tooltip = "Change the active composite Map for this layer.";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Composite";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 -3";
-                  extent = "61 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "EditorTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "None";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 17";
-                  extent = "79 17";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiButtonCtrl() {
-                  text = "Edit";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "111 0";
-                  extent = "40 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiButtonProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changecomposite();";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/gui/images/delete";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "154 0";
-                  extent = "16 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg-->compositeTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/gui/images/separator-v";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "4 51";
-                  extent = "148 2";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
             };
-            new GuiContainer() {
+            new GuiTextCtrl() {
+               text = "Strength";
+               maxLength = "1024";
                margin = "0 0 0 0";
                padding = "0 0 0 0";
-               anchorTop = "1";
+               anchorTop = "0";
                anchorBottom = "0";
-               anchorLeft = "1";
+               anchorLeft = "0";
                anchorRight = "0";
-               position = "6 272";
-               extent = "174 71";
+               position = "39 54";
+               extent = "46 16";
                minExtent = "8 2";
-               horizSizing = "width";
+               horizSizing = "right";
                vertSizing = "bottom";
-               profile = "ToolsGuiDefaultProfile";
+               profile = "ToolsGuiTextProfile";
                visible = "1";
                active = "1";
                tooltipProfile = "ToolsGuiToolTipProfile";
                hovertime = "1000";
-               isContainer = "1";
+               isContainer = "0";
                canSave = "1";
                canSaveDynamicFields = "0";
+            };
+            new GuiTextEditCtrl() {
+               historySize = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               password = "0";
+               passwordMask = "*";
+               maxLength = "1024";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "0";
+               anchorBottom = "0";
+               anchorLeft = "0";
+               anchorRight = "0";
+               position = "1 53";
+               extent = "34 18";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiTextEditProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               internalName = "macroStrengthCtrl";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiTextCtrl() {
+               text = "Distance";
+               maxLength = "1024";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "0";
+               anchorBottom = "0";
+               anchorLeft = "0";
+               anchorRight = "0";
+               position = "132 54";
+               extent = "45 16";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiTextProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+            new GuiTextEditCtrl() {
+               historySize = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               password = "0";
+               passwordMask = "*";
+               maxLength = "1024";
+               margin = "0 0 0 0";
+               padding = "0 0 0 0";
+               anchorTop = "0";
+               anchorBottom = "0";
+               anchorLeft = "0";
+               anchorRight = "0";
+               position = "94 53";
+               extent = "34 18";
+               minExtent = "8 2";
+               horizSizing = "right";
+               vertSizing = "bottom";
+               profile = "ToolsGuiTextEditProfile";
+               visible = "1";
+               active = "1";
+               tooltipProfile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               isContainer = "0";
+               internalName = "macroDistanceCtrl";
+               canSave = "1";
+               canSaveDynamicFields = "0";
+            };
+         };
+         
+         new GuiBitmapCtrl() {
+            canSaveDynamicFields = "0";
+            isContainer = "0";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "6 200";
+            Extent = "175 2";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            bitmap = "tools/gui/images/separator-v";
+            wrap = "0";
+         };
+         new GuiContainer() {
+            canSaveDynamicFields = "0";
+            isContainer = "1";
+            Profile = "ToolsGuiDefaultProfile";
+            HorizSizing = "width";
+            VertSizing = "bottom";
+            position = "6 206";
+            Extent = "185 72";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
 
-               new GuiBitmapCtrl() {
-                  bitmap = "tools/materialEditor/gui/unknownImage";
-                  color = "255 255 255 255";
-                  wrap = "0";
-                  position = "1 1";
-                  extent = "47 47";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "macroTexCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "1 1";
-                  extent = "48 48";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeMacro();";
-                  tooltipProfile = "ToolsGuiDefaultProfile";
-                  tooltip = "Change the active Macro Map for this layer.";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Macro";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 -3";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "EditorTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "None";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "1";
-                  anchorBottom = "0";
-                  anchorLeft = "1";
-                  anchorRight = "0";
-                  position = "56 17";
-                  extent = "111 17";
-                  minExtent = "8 2";
-                  horizSizing = "width";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiButtonCtrl() {
-                  text = "Edit";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "111 0";
-                  extent = "40 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiButtonProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg.changeMacro();";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiBitmapButtonCtrl() {
-                  bitmap = "tools/gui/images/delete";
-                  bitmapMode = "Stretched";
-                  autoFitExtents = "0";
-                  useModifiers = "0";
-                  useStates = "1";
-                  masked = "0";
-                  groupNum = "-1";
-                  buttonType = "PushButton";
-                  useMouseEvents = "0";
-                  position = "154 0";
-                  extent = "16 16";
-                  minExtent = "8 2";
-                  horizSizing = "left";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiDefaultProfile";
-                  visible = "1";
-                  active = "1";
-                  command = "TerrainMaterialDlg-->macroTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Size";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "132 33";
-                  extent = "39 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "200";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "94 32";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "macroSizeCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Strength";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "39 54";
-                  extent = "46 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "0.7";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "1 53";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "macroStrengthCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextCtrl() {
-                  text = "Distance";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "132 54";
-                  extent = "45 16";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
-               new GuiTextEditCtrl() {
-                  historySize = "0";
-                  tabComplete = "0";
-                  sinkAllKeyEvents = "0";
-                  password = "0";
-                  passwordMask = "*";
-                  text = "500";
-                  maxLength = "1024";
-                  margin = "0 0 0 0";
-                  padding = "0 0 0 0";
-                  anchorTop = "0";
-                  anchorBottom = "0";
-                  anchorLeft = "0";
-                  anchorRight = "0";
-                  position = "94 53";
-                  extent = "34 18";
-                  minExtent = "8 2";
-                  horizSizing = "right";
-                  vertSizing = "bottom";
-                  profile = "ToolsGuiTextEditProfile";
-                  visible = "1";
-                  active = "1";
-                  tooltipProfile = "ToolsGuiToolTipProfile";
-                  hovertime = "1000";
-                  isContainer = "0";
-                  internalName = "macroDistanceCtrl";
-                  canSave = "1";
-                  canSaveDynamicFields = "0";
-               };
+            new GuiBitmapCtrl() {
+               internalName = "detailTexCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "47 47";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               bitmap = "tools/materialEditor/gui/unknownImage";
+               wrap = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "48 48";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeDetail();";
+               tooltipprofile = "ToolsGuiDefaultProfile";
+               ToolTip = "Change the active Detail Map for this layer.";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/materialEditor/gui/cubemapBtnBorder";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "EditorTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "56 -3";
+               Extent = "30 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "Detail";
+               maxLength = "1024";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "width";
+               VertSizing = "bottom";
+               position = "56 16";
+               Extent = "116 17";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "1";
+               AnchorBottom = "0";
+               AnchorLeft = "1";
+               AnchorRight = "0";
+               text = "None";
+               maxLength = "1024";
+            };
+            new GuiButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiButtonProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "116 0";
+               Extent = "40 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg.changeDetail();";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               text = "Edit";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+            };
+            new GuiBitmapButtonCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiDefaultProfile";
+               HorizSizing = "left";
+               VertSizing = "bottom";
+               position = "159 0";
+               Extent = "16 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               Command = "TerrainMaterialDlg-->detailTexCtrl.setBitmap(\"tools/materialEditor/gui/unknownImage\");";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               groupNum = "-1";
+               buttonType = "PushButton";
+               useMouseEvents = "0";
+               bitmap = "tools/gui/images/delete";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "132 33";
+               Extent = "39 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               text = "Size";
+               maxLength = "1024";
+            };
+            new GuiTextEditCtrl() {
+               internalName = "detSizeCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextEditProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "94 32";
+               Extent = "34 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               maxLength = "1024";
+               historySize = "0";
+               password = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               passwordMask = "*";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "39 54";
+               Extent = "46 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               text = "Strength";
+               maxLength = "1024";
+            };
+            new GuiTextEditCtrl() {
+               internalName = "detStrengthCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextEditProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 53";
+               Extent = "34 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               maxLength = "1024";
+               historySize = "0";
+               password = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               passwordMask = "*";
+            };
+            new GuiTextCtrl() {
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "132 54";
+               Extent = "45 16";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               text = "Distance";
+               maxLength = "1024";
+            };
+            new GuiTextEditCtrl() {
+               internalName = "detDistanceCtrl";
+               canSaveDynamicFields = "0";
+               isContainer = "0";
+               Profile = "ToolsGuiTextEditProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "94 53";
+               Extent = "34 18";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
+               Margin = "0 0 0 0";
+               Padding = "0 0 0 0";
+               AnchorTop = "0";
+               AnchorBottom = "0";
+               AnchorLeft = "0";
+               AnchorRight = "0";
+               maxLength = "1024";
+               historySize = "0";
+               password = "0";
+               tabComplete = "0";
+               sinkAllKeyEvents = "0";
+               passwordMask = "*";
             };
          };
       };
       new GuiControl() {
-         position = "6 42";
-         extent = "189 373";
-         minExtent = "8 2";
-         horizSizing = "width";
-         vertSizing = "height";
-         profile = "ToolsGuiDefaultProfile";
-         visible = "1";
-         active = "1";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
+         canSaveDynamicFields = "0";
          isContainer = "1";
+         Profile = "ToolsGuiDefaultProfile";
+         HorizSizing = "width";
+         VertSizing = "height";
+         position = "6 42";
+         Extent = "189 373";
+         MinExtent = "8 2";
          canSave = "1";
-         canSaveDynamicFields = "0";
+         Visible = "1";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
 
          new GuiScrollCtrl() {
+            canSaveDynamicFields = "0";
+            isContainer = "1";
+            Profile = "ToolsGuiScrollProfile";
+            HorizSizing = "width";
+            VertSizing = "height";
+            position = "0 0";
+            Extent = "189 374";
+            MinExtent = "8 2";
+            canSave = "1";
+            Visible = "1";
+            tooltipprofile = "ToolsGuiToolTipProfile";
+            hovertime = "1000";
+            Margin = "0 0 0 0";
+            Padding = "0 0 0 0";
+            AnchorTop = "1";
+            AnchorBottom = "0";
+            AnchorLeft = "1";
+            AnchorRight = "0";
             willFirstRespond = "1";
             hScrollBar = "dynamic";
             vScrollBar = "dynamic";
-            lockHorizScroll = "0";
-            lockVertScroll = "0";
+            lockHorizScroll = "false";
+            lockVertScroll = "false";
             constantThumbHeight = "0";
             childMargin = "0 0";
             mouseWheelScrollSpeed = "-1";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "0 -1";
-            extent = "189 374";
-            minExtent = "8 2";
-            horizSizing = "width";
-            vertSizing = "height";
-            profile = "ToolsGuiScrollProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "ToolsGuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
-            canSave = "1";
-            canSaveDynamicFields = "0";
 
             new GuiTreeViewCtrl() {
+               internalName = "matLibTree";
+               canSaveDynamicFields = "0";
+               class = "TerrainMaterialTreeCtrl";
+               className = "TerrainMaterialTreeCtrl";
+               isContainer = "1";
+               Profile = "ToolsGuiTreeViewProfile";
+               HorizSizing = "right";
+               VertSizing = "bottom";
+               position = "1 1";
+               Extent = "125 84";
+               MinExtent = "8 2";
+               canSave = "1";
+               Visible = "1";
+               tooltipprofile = "ToolsGuiToolTipProfile";
+               hovertime = "1000";
                tabSize = "16";
                textOffset = "2";
                fullRowSelect = "0";
                itemHeight = "21";
                destroyTreeOnSleep = "1";
-               mouseDragging = "0";
-               multipleSelections = "0";
-               deleteObjectAllowed = "0";
-               dragToItemAllowed = "0";
-               clearAllOnSingleSelection = "1";
+               MouseDragging = "0";
+               MultipleSelections = "0";
+               DeleteObjectAllowed = "0";
+               DragToItemAllowed = "0";
+               ClearAllOnSingleSelection = "1";
                showRoot = "0";
-               useInspectorTooltips = "0";
-               tooltipOnWidthOnly = "0";
-               showObjectIds = "0";
-               showClassNames = "0";
-               showObjectNames = "0";
-               showInternalNames = "1";
-               showClassNameForUnnamedObjects = "0";
-               compareToObjectID = "1";
-               canRenameObjects = "1";
-               renameInternal = "0";
-               position = "1 1";
-               extent = "109 147";
-               minExtent = "8 2";
-               horizSizing = "right";
-               vertSizing = "bottom";
-               profile = "ToolsGuiTreeViewProfile";
-               visible = "1";
-               active = "1";
-               tooltipProfile = "ToolsGuiToolTipProfile";
-               hovertime = "1000";
-               isContainer = "1";
-               internalName = "matLibTree";
-               class = "TerrainMaterialTreeCtrl";
-               canSave = "1";
-               canSaveDynamicFields = "0";
+               internalNamesOnly = "1";
+               objectNamesOnly = "0";
             };
          };
       };
       new GuiButtonCtrl() {
+         canSaveDynamicFields = "0";
+         isContainer = "0";
+         Profile = "ToolsGuiButtonProfile";
+         HorizSizing = "left";
+         VertSizing = "top";
+         position = "202 394";
+         Extent = "98 22";
+         MinExtent = "8 2";
+         canSave = "1";
+         Visible = "1";
+         Command = "TerrainMaterialDlg.dialogApply();";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
          text = "Apply&Select";
          groupNum = "-1";
          buttonType = "PushButton";
          useMouseEvents = "0";
-         position = "202 394";
-         extent = "98 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "top";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "TerrainMaterialDlg.dialogApply();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
       };
       new GuiButtonCtrl() {
+         canSaveDynamicFields = "0";
+         isContainer = "0";
+         Profile = "ToolsGuiButtonProfile";
+         HorizSizing = "left";
+         VertSizing = "top";
+         position = "307 394";
+         Extent = "80 22";
+         MinExtent = "8 2";
+         canSave = "1";
+         Visible = "1";
+         Command = "TerrainMaterialDlg.dialogCancel();";
+         tooltipprofile = "ToolsGuiToolTipProfile";
+         hovertime = "1000";
          text = "Cancel";
          groupNum = "-1";
          buttonType = "PushButton";
          useMouseEvents = "0";
-         position = "307 394";
-         extent = "80 22";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "top";
-         profile = "ToolsGuiButtonProfile";
-         visible = "1";
-         active = "1";
-         command = "TerrainMaterialDlg.dialogCancel();";
-         tooltipProfile = "ToolsGuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "0";
-         canSave = "1";
-         canSaveDynamicFields = "0";
       };
-      new GuiBitmapCtrl() {
-         bitmap = "tools/gui/images/inactive-overlay";
-         color = "255 255 255 255";
-         wrap = "0";
-         position = "199 23";
-         extent = "190 267";
-         minExtent = "8 2";
-         horizSizing = "left";
-         vertSizing = "height";
-         profile = "ToolsGuiDefaultProfile";
-         visible = "0";
-         active = "1";
-         tooltipProfile = "GuiToolTipProfile";
-         hovertime = "1000";
-         isContainer = "1";
+      
+      new GuiBitmapCtrl() { // inactive overlay
          internalName = "inactiveOverlay";
-         hidden = "1";
-         canSave = "1";
-         canSaveDynamicFields = "0";
-
-         new GuiTextCtrl() {
-            text = "Inactive";
-            maxLength = "1024";
-            margin = "0 0 0 0";
-            padding = "0 0 0 0";
-            anchorTop = "1";
-            anchorBottom = "0";
-            anchorLeft = "1";
-            anchorRight = "0";
-            position = "0 104";
-            extent = "190 64";
-            minExtent = "8 2";
-            horizSizing = "width";
-            vertSizing = "center";
-            profile = "ToolsGuiTextCenterProfile";
-            visible = "1";
-            active = "1";
-            tooltipProfile = "GuiToolTipProfile";
-            hovertime = "1000";
-            isContainer = "1";
+         Profile = "ToolsGuiDefaultProfile";
+         HorizSizing = "left";
+         VertSizing = "height";
+         position = "199 23";
+         Extent = "190 267";
+         isContainer = true;
+         Visible = false;
+         bitmap = "tools/gui/images/inactive-overlay";
+         
+         new GuiTextCtrl(){
             internalName = "inactiveOverlayDlg";
-            canSave = "1";
-            canSaveDynamicFields = "0";
+            Profile = "ToolsGuiTextCenterProfile";
+            HorizSizing = "width";
+            VertSizing = "center";
+            position = "0 104";
+            Extent = "190 64";
+            text = "Inactive";
          };
       };
    };

+ 0 - 18
Templates/BaseGame/game/tools/worldEditor/gui/objectBuilderGui.ed.gui

@@ -877,24 +877,6 @@ function ObjectBuilderGui::buildParticleSimulation(%this)
 	%this.process();
 }
 
-function ObjectBuilderGui::buildReflectionProbe(%this)
-{
-   %this.objectClassName = "ReflectionProbe";
-   %this.process();
-   
-   %defaultPath = filePath($Server::MissionFile) @ "/" @ fileBase($Server::MissionFile) @ "/probes/";   
-   %this.addField("reflectionPath", "TypeFilepath", "reflectionPath", %defaultPath);
-}
-
-function ObjectBuilderGui::buildSkylight(%this)
-{
-   %this.objectClassName = "Skylight";
-   %this.process();
-   
-   %defaultPath = filePath($Server::MissionFile) @ "/" @ fileBase($Server::MissionFile) @ "/probes/";   
-   %this.addField("reflectionPath", "TypeFilepath", "reflectionPath", %defaultPath);
-}
-
 //------------------------------------------------------------------------------
 // Mission
 //------------------------------------------------------------------------------

+ 5 - 5
Templates/BaseGame/game/tools/worldEditor/gui/profiles.ed.cs

@@ -35,8 +35,8 @@ singleton GuiControlProfile (EditorToolButtonProfile)
 
 singleton GuiControlProfile (EditorTextProfile)
 {
-   fontType = "Arial Bold";
-   fontColor = "0 0 0";
+   fontType = "Noto Sans Bold";
+   fontColor = "215 215 215";
    autoSizeWidth = true;
    autoSizeHeight = true;
    category = "Editor";
@@ -44,7 +44,7 @@ singleton GuiControlProfile (EditorTextProfile)
 
 singleton GuiControlProfile (EditorTextProfileWhite)
 {
-   fontType = "Arial Bold";
+   fontType = "Noto Sans Bold";
    fontColor = "255 255 255";
    autoSizeWidth = true;
    autoSizeHeight = true;
@@ -76,7 +76,7 @@ singleton GuiControlProfile (GuiEditorClassProfile)
    border = true;
    borderColor   = "0 0 0";
    borderColorHL = "127 127 127";
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    fontColorHL = "50 50 50";
    fixedExtent = true;
    justify = "center";
@@ -108,7 +108,7 @@ singleton GuiControlProfile( EPainterBorderButtonProfile : ToolsGuiDefaultProfil
 singleton GuiControlProfile( EPainterDragDropProfile )
 {
    justify = "center";
-   fontColor = "0 0 0";
+   fontColor = "215 215 215";
    border = 0;
    textOffset = "0 0";   
    opaque = true;

+ 3 - 13
Templates/BaseGame/game/tools/worldEditor/main.cs

@@ -44,7 +44,6 @@ function initializeWorldEditor()
    exec("./gui/SelectObjectsWindow.ed.gui");
    exec("./gui/ProceduralTerrainPainterGui.gui" );
    exec("./gui/shadowViz.gui" );
-   exec("./gui/probeBakeDlg.gui" );
    
    // Load Scripts.
    exec("./scripts/menus.ed.cs");
@@ -67,7 +66,6 @@ function initializeWorldEditor()
    exec("./scripts/cameraCommands.ed.cs");
    exec("./scripts/lightViz.cs");
    exec("./scripts/shadowViz.cs");
-   exec("./scripts/probeBake.ed.cs");
 
    // Load Custom Editors
    loadDirectory(expandFilename("./scripts/editors"));
@@ -122,24 +120,16 @@ function initializeWorldEditor()
    EVisibility.addOption( "Debug Render: Light Frustums", "$Light::renderLightFrustums", "" );
    EVisibility.addOption( "Debug Render: Bounding Boxes", "$Scene::renderBoundingBoxes", "" );
    EVisibility.addOption( "Debug Render: Physics World", "$PhysicsWorld::render", "togglePhysicsDebugViz" );
-   EVisibility.addOption( "Debug Render: Reflection Probes", "$Light::renderReflectionProbes", "" );
-   EVisibility.addOption( "Debug Render: Probe Previews", "$Light::renderPreviewProbes", "" );
    EVisibility.addOption( "AL: Disable Shadows", "$Shadows::disable", "" );   
-   EVisibility.addOption( "AL: Diffuse Lighting Viz", "$AL_LightColorVisualizeVar", "toggleLightColorViz" );
-   EVisibility.addOption( "AL: Specular Lighting Viz", "$AL_LightSpecularVisualizeVar", "toggleLightSpecularViz" );
+   EVisibility.addOption( "AL: Light Color Viz", "$AL_LightColorVisualizeVar", "toggleLightColorViz" );
+   EVisibility.addOption( "AL: Light Specular Viz", "$AL_LightSpecularVisualizeVar", "toggleLightSpecularViz" );
    EVisibility.addOption( "AL: Normals Viz", "$AL_NormalsVisualizeVar", "toggleNormalsViz" );
    EVisibility.addOption( "AL: Depth Viz", "$AL_DepthVisualizeVar", "toggleDepthViz" );
    EVisibility.addOption( "AL: Color Buffer", "$AL_ColorBufferShaderVar", "toggleColorBufferViz" );
-   EVisibility.addOption( "AL: Spec Map(Rough)", "$AL_RoughMapShaderVar", "toggleRoughMapViz");
-   EVisibility.addOption( "AL: Spec Map(Metal)", "$AL_MetalMapShaderVar", "toggleMetalMapViz");
+   EVisibility.addOption( "AL: Spec Map", "$AL_SpecMapShaderVar", "toggleSpecMapViz");
    EVisibility.addOption( "AL: Backbuffer", "$AL_BackbufferVisualizeVar", "toggleBackbufferViz" );
    EVisibility.addOption( "AL: Glow Buffer", "$AL_GlowVisualizeVar", "toggleGlowViz" );
    EVisibility.addOption( "AL: PSSM Cascade Viz", "$AL::PSSMDebugRender", "" );
-   EVisibility.addOption( "Probes: Attenuation", "$Probes::showAttenuation", "" );   
-   EVisibility.addOption( "Probes: Specular Cubemaps", "$Probes::showSpecularCubemaps", "" );   
-   EVisibility.addOption( "Probes: Diffuse Cubemaps", "$Probes::showDiffuseCubemaps", "" );   
-   EVisibility.addOption( "Probes: Contribution", "$Probes::showProbeContrib", "" );   
-
    EVisibility.addOption( "Frustum Lock", "$Scene::lockCull", "" );
    EVisibility.addOption( "Disable Zone Culling", "$Scene::disableZoneCulling", "" );
    EVisibility.addOption( "Disable Terrain Occlusion", "$Scene::disableTerrainOcclusion", "" );

+ 0 - 5
Templates/BaseGame/game/tools/worldEditor/scripts/editors/creator.ed.cs

@@ -55,11 +55,6 @@ function EWCreatorWindow::init( %this )
       
       %this.registerMissionObject( "PointLight",          "Point Light" );
       %this.registerMissionObject( "SpotLight",           "Spot Light" );
-      
-      %this.registerMissionObject( "BoxEnvironmentProbe",       "Box Environment Probe" );
-      %this.registerMissionObject( "SphereEnvironmentProbe",    "Sphere Environment Probe" );
-      %this.registerMissionObject( "Skylight",       "Skylight" );
-      
       %this.registerMissionObject( "GroundCover",         "Ground Cover" );
       %this.registerMissionObject( "TerrainBlock",        "Terrain Block" );
       %this.registerMissionObject( "GroundPlane",         "Ground Plane" );

+ 2 - 38
Templates/BaseGame/game/tools/worldEditor/scripts/interfaces/terrainMaterialDlg.ed.cs

@@ -294,28 +294,6 @@ function TerrainMaterialDlg::changeNormal( %this )
 
 //-----------------------------------------------------------------------------
 
-function TerrainMaterialDlg::changecomposite( %this )
-{
-   %ctrl = %this-->compositeTexCtrl;
-   %file = %ctrl.bitmap;
-   if( getSubStr( %file, 0 , 6 ) $= "tools/" )
-      %file = "";
-
-   %file = TerrainMaterialDlg._selectTextureFileDialog( %file );  
-   if( %file $= "" )
-   {
-      if( %ctrl.bitmap !$= "" )
-         %file = %ctrl.bitmap;
-      else
-         %file = "tools/materialEditor/gui/unknownImage";
-   }
-   
-   %file = makeRelativePath( %file, getMainDotCsDir() );
-   %ctrl.setBitmap( %file );  
-}
-
-//-----------------------------------------------------------------------------
-
 function TerrainMaterialDlg::newMat( %this )
 {
    // Create a unique material name.
@@ -416,12 +394,7 @@ function TerrainMaterialDlg::setActiveMaterial( %this, %mat )
          %this-->normTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
       }else{
          %this-->normTexCtrl.setBitmap( %mat.normalMap ); 
-      }	  
-      if (%mat.compositeMap $= ""){
-         %this-->compositeTexCtrl.setBitmap( "tools/materialEditor/gui/unknownImage" );
-      }else{
-         %this-->compositeTexCtrl.setBitmap( %mat.compositeMap );
-      }	  
+      }
       %this-->detSizeCtrl.setText( %mat.detailSize );
       %this-->baseSizeCtrl.setText( %mat.diffuseSize );
       %this-->detStrengthCtrl.setText( %mat.detailStrength );
@@ -475,11 +448,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    }else{
       %newMacro = %this-->macroTexCtrl.bitmap;  
    }
-   if (%this-->compositeTexCtrl.bitmap $= "tools/materialEditor/gui/unknownImage"){
-      %newComposite = "";
-   }else{
-      %newComposite = %this-->compositeTexCtrl.bitmap;  
-   }
    %detailSize = %this-->detSizeCtrl.getText();      
    %diffuseSize = %this-->baseSizeCtrl.getText();     
    %detailStrength = %this-->detStrengthCtrl.getText();
@@ -498,7 +466,6 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
          %mat.diffuseMap $= %newDiffuse &&
          %mat.normalMap $= %newNormal &&
          %mat.detailMap $= %newDetail &&
-         %mat.compositeMap $= %newComposite &&
          %mat.macroMap $= %newMacro &&
          %mat.detailSize == %detailSize &&
          %mat.diffuseSize == %diffuseSize &&
@@ -530,8 +497,7 @@ function TerrainMaterialDlg::saveDirtyMaterial( %this, %mat )
    }
    
    %mat.diffuseMap = %newDiffuse;    
-   %mat.normalMap = %newNormal;
-   %mat.compositeMap = %newComposite;
+   %mat.normalMap = %newNormal;    
    %mat.detailMap = %newDetail;    
    %mat.macroMap = %newMacro;
    %mat.detailSize = %detailSize;  
@@ -578,7 +544,6 @@ function TerrainMaterialDlg::snapshotMaterials( %this )
          diffuseMap = %mat.diffuseMap;
          normalMap = %mat.normalMap;
          detailMap = %mat.detailMap;
-         compositeMap = %mat.compositeMap;
          macroMap = %mat.macroMap;
          detailSize = %mat.detailSize;
          diffuseSize = %mat.diffuseSize;
@@ -613,7 +578,6 @@ function TerrainMaterialDlg::restoreMaterials( %this )
       %mat.diffuseMap = %obj.diffuseMap;
       %mat.normalMap = %obj.normalMap;
       %mat.detailMap = %obj.detailMap;
-      %mat.compositeMap = %obj.compositeMap;
       %mat.macroMap = %obj.macroMap;
       %mat.detailSize = %obj.detailSize;
       %mat.diffuseSize = %obj.diffuseSize;

+ 13 - 83
Templates/BaseGame/game/tools/worldEditor/scripts/lightViz.cs

@@ -61,109 +61,39 @@ function toggleColorBufferViz( %enable )
    }
 }
 
-//roughness map display (matinfo.b)
-new ShaderData( AL_RoughMapShader )
+new ShaderData( AL_SpecMapShader )
 {
-   DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
-   DXPixelShaderFile  = "shaders/common/lighting/advanced/dbgRoughMapVisualizeP.hlsl";
-
-   OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
-   OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgRoughMapVisualizeP.glsl";
-
-   samplerNames[0] = "matinfoTex";
-   pixVersion = 2.0;
-};
-
-singleton PostEffect( AL_RoughMapVisualize )
-{   
-   shader = AL_RoughMapShader;
-   stateBlock = AL_DefaultVisualizeState;
-   texture[0] = "#matinfo";
-   target = "$backBuffer";
-   renderPriority = 9999;
-};
-
-function toggleRoughMapViz( %enable )
-{   
-   if ( %enable $= "" )
-   {
-      $AL_RoughMapShaderVar = AL_RoughMapVisualize.isEnabled() ? false : true;
-      AL_RoughMapVisualize.toggle();
-   }
-   else if ( %enable )
-      AL_RoughMapVisualize.enable();
-   else if ( !%enable )
-      AL_RoughMapVisualize.disable();    
-}
-
-//metalness map display (matinfo.a)
-new ShaderData( AL_MetalMapShader )
-{
-   DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
-   DXPixelShaderFile  = "shaders/common/lighting/advanced/dbgMetalMapVisualizeP.hlsl";
+   DXVertexShaderFile = $Core::CommonShaderPath @ "/postFX/postFxV.hlsl";
+   DXPixelShaderFile  = "./shaders/dbgSpecMapVisualizeP.hlsl";
 
-   OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
-   OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgMetalMapVisualizeP.glsl";
+   OGLVertexShaderFile = $Core::CommonShaderPath @ "/postFX/gl/postFxV.glsl";
+   OGLPixelShaderFile  = "./shaders/dbgSpecMapVisualizeP.glsl";
 
    samplerNames[0] = "matinfoTex";
    pixVersion = 2.0;
 };
 
-singleton PostEffect( AL_MetalMapVisualize )
+singleton PostEffect( AL_SpecMapVisualize )
 {   
-   shader = AL_MetalMapShader;
+   shader = AL_SpecMapShader;
    stateBlock = AL_DefaultVisualizeState;
    texture[0] = "#matinfo";
    target = "$backBuffer";
    renderPriority = 9999;
 };
 
-function toggleMetalMapViz( %enable )
-{   
-   if ( %enable $= "" )
-   {
-      $AL_MetalMapShaderVar = AL_MetalMapVisualize.isEnabled() ? false : true;
-      AL_MetalMapVisualize.toggle();
-   }
-   else if ( %enable )
-      AL_MetalMapVisualize.enable();
-   else if ( !%enable )
-      AL_MetalMapVisualize.disable();    
-}
-
-//Light map display (indirectLighting)
-new ShaderData( AL_LightMapShader )
-{
-   DXVertexShaderFile = "shaders/common/postFx/postFxV.hlsl";
-   DXPixelShaderFile  = "shaders/common/lighting/advanced/dbgLightMapVisualizeP.hlsl";
-
-   OGLVertexShaderFile = "shaders/common/postFx/gl/postFxV.glsl";
-   OGLPixelShaderFile  = "shaders/common/lighting/advanced/gl/dbgLightMapVisualizeP.glsl";
-
-   samplerNames[0] = "specularLightingBuffer";
-   pixVersion = 2.0;
-};
-
-singleton PostEffect( AL_LightMapVisualize )
-{   
-   shader = AL_LightMapShader;
-   stateBlock = AL_DefaultVisualizeState;
-   texture[0] = "#specularLighting";
-   target = "$backBuffer";
-   renderPriority = 9999;
-};
-
-function toggleLightMapViz( %enable )
+/// Toggles the visualization of the AL lighting specular power buffer.
+function toggleSpecMapViz( %enable )
 {   
    if ( %enable $= "" )
    {
-      $AL_LightMapShaderVar = AL_LightMapVisualize.isEnabled() ? false : true;
-      AL_LightMapVisualize.toggle();
+      $AL_SpecMapShaderVar = AL_SpecMapVisualize.isEnabled() ? false : true;
+      AL_SpecMapVisualize.toggle();
    }
    else if ( %enable )
-      AL_LightMapVisualize.enable();
+      AL_SpecMapVisualize.enable();
    else if ( !%enable )
-      AL_LightMapVisualize.disable();    
+      AL_SpecMapVisualize.disable();    
 }
 
 new GFXStateBlockData( AL_DepthVisualizeState )

+ 0 - 5
Templates/BaseGame/game/tools/worldEditor/scripts/lighting.ed.cs

@@ -61,8 +61,3 @@ function EditorLightingMenu::onMenuSelect( %this )
    //%selSize = EWorldEditor.getSelectionSize();
    %this.enableItem( 1, true /*%selSize == 1*/ );   
 }
-
-function updateReflectionProbes()
-{
-  Canvas.pushDialog(ProbeBakeDlg);
-}

+ 0 - 2
Templates/BaseGame/game/tools/worldEditor/scripts/menus.ed.cs

@@ -322,8 +322,6 @@ function EditorGui::buildMenus(%this)
       item[0] = "Full Relight" TAB "Alt L" TAB "Editor.lightScene(\"\", forceAlways);";
       item[1] = "Toggle ShadowViz" TAB "" TAB "toggleShadowViz();";
       item[2] = "-";
-      item[3] = "Update Reflection Probes" TAB "" TAB "updateReflectionProbes();";
-      item[4] = "-";
          
          // NOTE: The light managers will be inserted as the
          // last menu items in EditorLightingMenu::onAdd().