Parcourir la source

Removing WIP projects/files

Marko Pintera il y a 11 ans
Parent
commit
3f44711c5c
100 fichiers modifiés avec 0 ajouts et 12695 suppressions
  1. 0 373
      BansheeEditor/BansheeEditor.vcxproj
  2. 0 342
      BansheeEditor/BansheeEditor.vcxproj.filters
  3. 0 83
      BansheeEditor/Include/BsCmdEditPlainFieldGO.h
  4. 0 41
      BansheeEditor/Include/BsCmdInputFieldValueChange.h
  5. 0 26
      BansheeEditor/Include/BsCmdReparentSO.h
  6. 0 38
      BansheeEditor/Include/BsDbgTestGameObjectRef.h
  7. 0 41
      BansheeEditor/Include/BsDbgTestGameObjectRefRTTI.h
  8. 0 39
      BansheeEditor/Include/BsDebugCamera.h
  9. 0 127
      BansheeEditor/Include/BsDockManager.h
  10. 0 49
      BansheeEditor/Include/BsDockManagerLayout.h
  11. 0 113
      BansheeEditor/Include/BsDockManagerLayoutRTTI.h
  12. 0 49
      BansheeEditor/Include/BsEditorApplication.h
  13. 0 17
      BansheeEditor/Include/BsEditorCommand.h
  14. 0 140
      BansheeEditor/Include/BsEditorGUI.h
  15. 0 75
      BansheeEditor/Include/BsEditorPrerequisites.h
  16. 0 91
      BansheeEditor/Include/BsEditorWidget.h
  17. 0 55
      BansheeEditor/Include/BsEditorWidgetContainer.h
  18. 0 45
      BansheeEditor/Include/BsEditorWidgetLayout.h
  19. 0 102
      BansheeEditor/Include/BsEditorWidgetLayoutRTTI.h
  20. 0 75
      BansheeEditor/Include/BsEditorWidgetManager.h
  21. 0 29
      BansheeEditor/Include/BsEditorWindow.h
  22. 0 46
      BansheeEditor/Include/BsEditorWindowBase.h
  23. 0 28
      BansheeEditor/Include/BsEditorWindowManager.h
  24. 0 71
      BansheeEditor/Include/BsGUIColor.h
  25. 0 55
      BansheeEditor/Include/BsGUIColorField.h
  26. 0 31
      BansheeEditor/Include/BsGUIDockSlider.h
  27. 0 33
      BansheeEditor/Include/BsGUIDropButton.h
  28. 0 108
      BansheeEditor/Include/BsGUIFieldBase.h
  29. 0 36
      BansheeEditor/Include/BsGUIFloatField.h
  30. 0 45
      BansheeEditor/Include/BsGUIFoldout.h
  31. 0 81
      BansheeEditor/Include/BsGUIGameObjectField.h
  32. 0 44
      BansheeEditor/Include/BsGUIIntField.h
  33. 0 70
      BansheeEditor/Include/BsGUIMenuBar.h
  34. 0 102
      BansheeEditor/Include/BsGUIResourceTreeView.h
  35. 0 71
      BansheeEditor/Include/BsGUISceneTreeView.h
  36. 0 44
      BansheeEditor/Include/BsGUITabButton.h
  37. 0 86
      BansheeEditor/Include/BsGUITabbedTitleBar.h
  38. 0 24
      BansheeEditor/Include/BsGUITextField.h
  39. 0 25
      BansheeEditor/Include/BsGUIToggleField.h
  40. 0 170
      BansheeEditor/Include/BsGUITreeView.h
  41. 0 24
      BansheeEditor/Include/BsGUITreeViewEditBox.h
  42. 0 29
      BansheeEditor/Include/BsGUIVector2Field.h
  43. 0 30
      BansheeEditor/Include/BsGUIVector3Field.h
  44. 0 31
      BansheeEditor/Include/BsGUIVector4Field.h
  45. 0 26
      BansheeEditor/Include/BsGUIWindowDropArea.h
  46. 0 22
      BansheeEditor/Include/BsGUIWindowFrame.h
  47. 0 30
      BansheeEditor/Include/BsGUIWindowFrameWidget.h
  48. 0 31
      BansheeEditor/Include/BsMainEditorWindow.h
  49. 0 97
      BansheeEditor/Include/BsProjectLibrary.h
  50. 0 34
      BansheeEditor/Include/BsProjectLibraryEntries.h
  51. 0 198
      BansheeEditor/Include/BsProjectLibraryEntriesRTTI.h
  52. 0 35
      BansheeEditor/Include/BsResourceMeta.h
  53. 0 42
      BansheeEditor/Include/BsResourceMetaRTTI.h
  54. 0 23
      BansheeEditor/Include/BsTestTextSprite.h
  55. 0 48
      BansheeEditor/Include/BsUndoRedo.h
  56. 0 22
      BansheeEditor/Include/DbgEditorWidget1.h
  57. 0 22
      BansheeEditor/Include/DbgEditorWidget2.h
  58. 0 40
      BansheeEditor/ReadMe.txt
  59. 0 49
      BansheeEditor/Source/BsCmdReparentSO.cpp
  60. 0 23
      BansheeEditor/Source/BsDbgTestGameObjectRef.cpp
  61. 0 94
      BansheeEditor/Source/BsDebugCamera.cpp
  62. 0 983
      BansheeEditor/Source/BsDockManager.cpp
  63. 0 85
      BansheeEditor/Source/BsDockManagerLayout.cpp
  64. 0 411
      BansheeEditor/Source/BsEditorApplication.cpp
  65. 0 9
      BansheeEditor/Source/BsEditorCommand.cpp
  66. 0 823
      BansheeEditor/Source/BsEditorGUI.cpp
  67. 0 99
      BansheeEditor/Source/BsEditorWidget.cpp
  68. 0 267
      BansheeEditor/Source/BsEditorWidgetContainer.cpp
  69. 0 30
      BansheeEditor/Source/BsEditorWidgetLayout.cpp
  70. 0 202
      BansheeEditor/Source/BsEditorWidgetManager.cpp
  71. 0 69
      BansheeEditor/Source/BsEditorWindow.cpp
  72. 0 111
      BansheeEditor/Source/BsEditorWindowBase.cpp
  73. 0 73
      BansheeEditor/Source/BsEditorWindowManager.cpp
  74. 0 159
      BansheeEditor/Source/BsGUIColor.cpp
  75. 0 156
      BansheeEditor/Source/BsGUIColorField.cpp
  76. 0 78
      BansheeEditor/Source/BsGUIDockSlider.cpp
  77. 0 83
      BansheeEditor/Source/BsGUIDropButton.cpp
  78. 0 34
      BansheeEditor/Source/BsGUIFieldBase.cpp
  79. 0 143
      BansheeEditor/Source/BsGUIFloatField.cpp
  80. 0 132
      BansheeEditor/Source/BsGUIFoldout.cpp
  81. 0 173
      BansheeEditor/Source/BsGUIGameObjectField.cpp
  82. 0 184
      BansheeEditor/Source/BsGUIIntField.cpp
  83. 0 329
      BansheeEditor/Source/BsGUIMenuBar.cpp
  84. 0 467
      BansheeEditor/Source/BsGUIResourceTreeView.cpp
  85. 0 268
      BansheeEditor/Source/BsGUISceneTreeView.cpp
  86. 0 163
      BansheeEditor/Source/BsGUITabButton.cpp
  87. 0 483
      BansheeEditor/Source/BsGUITabbedTitleBar.cpp
  88. 0 41
      BansheeEditor/Source/BsGUITextField.cpp
  89. 0 39
      BansheeEditor/Source/BsGUIToggleField.cpp
  90. 0 1204
      BansheeEditor/Source/BsGUITreeView.cpp
  91. 0 58
      BansheeEditor/Source/BsGUITreeViewEditBox.cpp
  92. 0 53
      BansheeEditor/Source/BsGUIVector2Field.cpp
  93. 0 57
      BansheeEditor/Source/BsGUIVector3Field.cpp
  94. 0 61
      BansheeEditor/Source/BsGUIVector4Field.cpp
  95. 0 59
      BansheeEditor/Source/BsGUIWindowDropArea.cpp
  96. 0 49
      BansheeEditor/Source/BsGUIWindowFrame.cpp
  97. 0 106
      BansheeEditor/Source/BsGUIWindowFrameWidget.cpp
  98. 0 113
      BansheeEditor/Source/BsMainEditorWindow.cpp
  99. 0 739
      BansheeEditor/Source/BsProjectLibrary.cpp
  100. 0 32
      BansheeEditor/Source/BsProjectLibraryEntries.cpp

+ 0 - 373
BansheeEditor/BansheeEditor.vcxproj

@@ -1,373 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup Label="ProjectConfigurations">
-    <ProjectConfiguration Include="DebugRelease|Win32">
-      <Configuration>DebugRelease</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="DebugRelease|x64">
-      <Configuration>DebugRelease</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|Win32">
-      <Configuration>Debug</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Debug|x64">
-      <Configuration>Debug</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|Win32">
-      <Configuration>Release</Configuration>
-      <Platform>Win32</Platform>
-    </ProjectConfiguration>
-    <ProjectConfiguration Include="Release|x64">
-      <Configuration>Release</Configuration>
-      <Platform>x64</Platform>
-    </ProjectConfiguration>
-  </ItemGroup>
-  <PropertyGroup Label="Globals">
-    <ProjectGuid>{67137A0D-7A67-4D0C-9FBF-AF904FABEF05}</ProjectGuid>
-    <Keyword>Win32Proj</Keyword>
-    <RootNamespace>CamelotClient</RootNamespace>
-    <ProjectName>BansheeEditor</ProjectName>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|Win32'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|x64'" Label="Configuration">
-    <ConfigurationType>DynamicLibrary</ConfigurationType>
-    <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>v120</PlatformToolset>
-    <WholeProgramOptimization>true</WholeProgramOptimization>
-    <CharacterSet>NotSet</CharacterSet>
-  </PropertyGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
-  <ImportGroup Label="ExtensionSettings">
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|Win32'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|x64'" Label="PropertySheets">
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
-  </ImportGroup>
-  <PropertyGroup Label="UserMacros" />
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>..\bin\x86\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <LinkIncremental>true</LinkIncremental>
-    <OutDir>..\bin\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>..\bin\x86\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|Win32'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>..\bin\x86\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>..\bin\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|x64'">
-    <LinkIncremental>false</LinkIncremental>
-    <OutDir>..\bin\$(Platform)\$(Configuration)\</OutDir>
-    <IntDir>.\Intermediate\$(Platform)\$(Configuration)\</IntDir>
-  </PropertyGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-    </ClCompile>
-    <Link>
-      <SubSystem>NotSet</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\lib\x86\$(Configuration);..\Dependencies\lib\x86\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <ImportLibrary>..\lib\x86\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
-    <ClCompile>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <WarningLevel>Level3</WarningLevel>
-      <Optimization>Disabled</Optimization>
-      <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <AdditionalLibraryDirectories>..\lib\$(Platform)\$(Configuration);..\Dependencies\lib\x64\Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
-      <ShowProgress>NotSet</ShowProgress>
-      <ImportLibrary>..\lib\x64\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <DebugInformationFormat>None</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <SubSystem>NotSet</SubSystem>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>..\lib\x86\$(Configuration);..\Dependencies\lib\x86\Release</AdditionalLibraryDirectories>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ImportLibrary>..\lib\x86\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|Win32'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <MinimalRebuild>true</MinimalRebuild>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>..\lib\x86\$(Configuration);..\Dependencies\lib\x86\DebugRelease</AdditionalLibraryDirectories>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ImportLibrary>..\lib\x86\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <DebugInformationFormat>None</DebugInformationFormat>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>false</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>..\lib\$(Platform)\$(Configuration);..\Dependencies\lib\x64\Release</AdditionalLibraryDirectories>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ImportLibrary>..\lib\x64\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugRelease|x64'">
-    <ClCompile>
-      <WarningLevel>Level3</WarningLevel>
-      <PrecompiledHeader>
-      </PrecompiledHeader>
-      <Optimization>MaxSpeed</Optimization>
-      <FunctionLevelLinking>true</FunctionLevelLinking>
-      <IntrinsicFunctions>true</IntrinsicFunctions>
-      <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;BS_ED_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <AdditionalIncludeDirectories>.\Include;..\BansheeCore\Include;..\BansheeUtility\Include;..\Dependencies\Include;..\BansheeEngine\Include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
-      <BufferSecurityCheck>false</BufferSecurityCheck>
-      <MinimalRebuild>true</MinimalRebuild>
-    </ClCompile>
-    <Link>
-      <SubSystem>Windows</SubSystem>
-      <GenerateDebugInformation>true</GenerateDebugInformation>
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>
-      <OptimizeReferences>true</OptimizeReferences>
-      <AdditionalLibraryDirectories>..\lib\$(Platform)\$(Configuration);..\Dependencies\lib\x64\DebugRelease</AdditionalLibraryDirectories>
-      <AdditionalDependencies>BansheeCore.lib;BansheeUtility.lib;BansheeEngine.lib;%(AdditionalDependencies)</AdditionalDependencies>
-      <ImportLibrary>..\lib\x64\$(Configuration)\$(TargetName).lib</ImportLibrary>
-    </Link>
-  </ItemDefinitionGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="Include\BsCmdEditPlainFieldGO.h" />
-    <ClInclude Include="Include\BsCmdInputFieldValueChange.h" />
-    <ClInclude Include="Include\BsCmdReparentSO.h" />
-    <ClInclude Include="Include\BsDbgTestGameObjectRef.h" />
-    <ClInclude Include="Include\BsDbgTestGameObjectRefRTTI.h" />
-    <ClInclude Include="Include\BsDockManager.h" />
-    <ClInclude Include="Include\BsDockManagerLayout.h" />
-    <ClInclude Include="Include\BsDockManagerLayoutRTTI.h" />
-    <ClInclude Include="Include\BsEditorApplication.h" />
-    <ClInclude Include="Include\BsEditorCommand.h" />
-    <ClInclude Include="Include\BsEditorGUI.h" />
-    <ClInclude Include="Include\BsEditorWidgetLayout.h" />
-    <ClInclude Include="Include\BsEditorWidgetLayoutRTTI.h" />
-    <ClInclude Include="Include\BsEditorWidgetManager.h" />
-    <ClInclude Include="Include\BsGUIColor.h" />
-    <ClInclude Include="Include\BsGUIColorField.h" />
-    <ClInclude Include="Include\BsGUIFieldBase.h" />
-    <ClInclude Include="Include\BsGUIFloatField.h" />
-    <ClInclude Include="Include\BsGUIFoldout.h" />
-    <ClInclude Include="Include\BsGUIGameObjectField.h" />
-    <ClInclude Include="Include\BsGUIIntField.h" />
-    <ClInclude Include="Include\BsGUIDropButton.h" />
-    <ClInclude Include="Include\BsGUITextField.h" />
-    <ClInclude Include="Include\BsGUIToggleField.h" />
-    <ClInclude Include="Include\BsGUIVector3Field.h" />
-    <ClInclude Include="Include\BsGUIVector4Field.h" />
-    <ClInclude Include="Include\BsProjectLibraryEntriesRTTI.h" />
-    <ClInclude Include="Include\BsEditorPrerequisites.h" />
-    <ClInclude Include="Include\BsEditorWidget.h" />
-    <ClInclude Include="Include\BsEditorWidgetContainer.h" />
-    <ClInclude Include="Include\BsEditorWindow.h" />
-    <ClInclude Include="Include\BsEditorWindowBase.h" />
-    <ClInclude Include="Include\BsEditorWindowManager.h" />
-    <ClInclude Include="Include\BsGUIDockSlider.h" />
-    <ClInclude Include="Include\BsGUIMenuBar.h" />
-    <ClInclude Include="Include\BsGUIResourceTreeView.h" />
-    <ClInclude Include="Include\BsGUISceneTreeView.h" />
-    <ClInclude Include="Include\BsGUITabbedTitleBar.h" />
-    <ClInclude Include="Include\BsGUITabButton.h" />
-    <ClInclude Include="Include\BsGUITreeView.h" />
-    <ClInclude Include="Include\BsGUITreeViewEditBox.h" />
-    <ClInclude Include="Include\BsGUIWindowFrame.h" />
-    <ClInclude Include="Include\BsGUIWindowFrameWidget.h" />
-    <ClInclude Include="Include\BsGUIWindowDropArea.h" />
-    <ClInclude Include="Include\BsMainEditorWindow.h" />
-    <ClInclude Include="Include\BsProjectLibrary.h" />
-    <ClInclude Include="Include\BsProjectLibraryEntries.h" />
-    <ClInclude Include="Include\BsResourceMeta.h" />
-    <ClInclude Include="Include\BsResourceMetaRTTI.h" />
-    <ClInclude Include="Include\BsGUIVector2Field.h" />
-    <ClInclude Include="Include\BsDebugCamera.h" />
-    <ClInclude Include="Include\BsTestTextSprite.h" />
-    <ClInclude Include="Include\DbgEditorWidget1.h" />
-    <ClInclude Include="Include\DbgEditorWidget2.h" />
-    <ClInclude Include="Include\BsUndoRedo.h" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="Source\BsCmdReparentSO.cpp" />
-    <ClCompile Include="Source\BsDbgTestGameObjectRef.cpp" />
-    <ClCompile Include="Source\BsDockManager.cpp" />
-    <ClCompile Include="Source\BsDockManagerLayout.cpp" />
-    <ClCompile Include="Source\BsEditorCommand.cpp" />
-    <ClCompile Include="Source\BsEditorGUI.cpp" />
-    <ClCompile Include="Source\BsEditorWidget.cpp" />
-    <ClCompile Include="Source\BsEditorWidgetContainer.cpp" />
-    <ClCompile Include="Source\BsEditorWidgetLayout.cpp" />
-    <ClCompile Include="Source\BsEditorWidgetManager.cpp" />
-    <ClCompile Include="Source\BsEditorWindow.cpp" />
-    <ClCompile Include="Source\BsEditorWindowBase.cpp" />
-    <ClCompile Include="Source\BsEditorWindowManager.cpp" />
-    <ClCompile Include="Source\BsGUIColor.cpp" />
-    <ClCompile Include="Source\BsGUIColorField.cpp" />
-    <ClCompile Include="Source\BsGUIDockSlider.cpp" />
-    <ClCompile Include="Source\BsGUIFieldBase.cpp" />
-    <ClCompile Include="Source\BsGUIFloatField.cpp" />
-    <ClCompile Include="Source\BsGUIFoldout.cpp" />
-    <ClCompile Include="Source\BsGUIGameObjectField.cpp" />
-    <ClCompile Include="Source\BsGUIIntField.cpp" />
-    <ClCompile Include="Source\BsGUIMenuBar.cpp" />
-    <ClCompile Include="Source\BsGUIDropButton.cpp" />
-    <ClCompile Include="Source\BsGUIResourceTreeView.cpp" />
-    <ClCompile Include="Source\BsGUISceneTreeView.cpp" />
-    <ClCompile Include="Source\BsGUITabbedTitleBar.cpp" />
-    <ClCompile Include="Source\BsGUITabButton.cpp" />
-    <ClCompile Include="Source\BsGUITextField.cpp" />
-    <ClCompile Include="Source\BsGUIToggleField.cpp" />
-    <ClCompile Include="Source\BsGUITreeView.cpp" />
-    <ClCompile Include="Source\BsGUITreeViewEditBox.cpp" />
-    <ClCompile Include="Source\BsGUIVector2Field.cpp" />
-    <ClCompile Include="Source\BsGUIVector3Field.cpp" />
-    <ClCompile Include="Source\BsGUIVector4Field.cpp" />
-    <ClCompile Include="Source\BsGUIWindowFrame.cpp" />
-    <ClCompile Include="Source\BsGUIWindowFrameWidget.cpp" />
-    <ClCompile Include="Source\BsGUIWindowDropArea.cpp" />
-    <ClCompile Include="Source\BsMainEditorWindow.cpp" />
-    <ClCompile Include="Source\BsProjectLibrary.cpp" />
-    <ClCompile Include="Source\BsProjectLibraryEntries.cpp" />
-    <ClCompile Include="Source\BsResourceMeta.cpp" />
-    <ClCompile Include="Source\BsUndoRedo.cpp" />
-    <ClCompile Include="Source\BsDebugCamera.cpp" />
-    <ClCompile Include="Source\BsEditorApplication.cpp" />
-    <ClCompile Include="Source\BsTestTextSprite.cpp" />
-    <ClCompile Include="Source\DbgEditorWidget1.cpp" />
-    <ClCompile Include="Source\DbgEditorWidget2.cpp" />
-  </ItemGroup>
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
-  <ImportGroup Label="ExtensionTargets">
-  </ImportGroup>
-</Project>

+ 0 - 342
BansheeEditor/BansheeEditor.vcxproj.filters

@@ -1,342 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <ItemGroup>
-    <Filter Include="Source Files">
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
-    </Filter>
-    <Filter Include="Header Files">
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
-    </Filter>
-    <Filter Include="Resource Files">
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
-    </Filter>
-    <Filter Include="Header Files\Editor">
-      <UniqueIdentifier>{b51df1f7-00a9-49af-a616-e0dbf141c3d9}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files\Editor">
-      <UniqueIdentifier>{ccd6be96-5773-46cc-a751-18a7007716c3}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Header Files\Editor\Commands">
-      <UniqueIdentifier>{c23d8d16-3a53-4e53-9e87-a15e33d5758c}</UniqueIdentifier>
-    </Filter>
-    <Filter Include="Source Files\Editor\Command">
-      <UniqueIdentifier>{fc5eed3b-3a94-4c0b-b462-636e84615f94}</UniqueIdentifier>
-    </Filter>
-  </ItemGroup>
-  <ItemGroup>
-    <Text Include="ReadMe.txt" />
-  </ItemGroup>
-  <ItemGroup>
-    <ClInclude Include="Include\BsEditorWidgetContainer.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\DbgEditorWidget1.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\DbgEditorWidget2.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWindowBase.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWindow.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUITabbedTitleBar.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIWindowFrameWidget.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWidget.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorPrerequisites.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWindowManager.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDockManager.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsMainEditorWindow.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUITabButton.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIWindowDropArea.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIWindowFrame.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIMenuBar.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorApplication.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIDockSlider.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorGUI.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUISceneTreeView.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUITreeViewEditBox.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorCommand.h">
-      <Filter>Header Files\Editor\Commands</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsUndoRedo.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsCmdEditPlainFieldGO.h">
-      <Filter>Header Files\Editor\Commands</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsCmdReparentSO.h">
-      <Filter>Header Files\Editor\Commands</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDbgTestGameObjectRef.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDbgTestGameObjectRefRTTI.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUITreeView.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsProjectLibrary.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsResourceMeta.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsResourceMetaRTTI.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIResourceTreeView.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsProjectLibraryEntries.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsProjectLibraryEntriesRTTI.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWidgetManager.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDockManagerLayout.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDockManagerLayoutRTTI.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWidgetLayout.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsEditorWidgetLayoutRTTI.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIIntField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIFloatField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUITextField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIVector4Field.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIVector3Field.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIVector2Field.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIToggleField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIColor.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIColorField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIFoldout.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIGameObjectField.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIDropButton.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsGUIFieldBase.h">
-      <Filter>Header Files\Editor</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsCmdInputFieldValueChange.h">
-      <Filter>Header Files\Editor\Commands</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsTestTextSprite.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="Include\BsDebugCamera.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-  </ItemGroup>
-  <ItemGroup>
-    <ClCompile Include="Source\BsEditorWidgetContainer.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\DbgEditorWidget1.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\DbgEditorWidget2.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWindowBase.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWindow.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUITabbedTitleBar.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIWindowFrameWidget.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWidget.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWindowManager.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsDockManager.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsMainEditorWindow.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUITabButton.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIWindowDropArea.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIWindowFrame.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIMenuBar.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorApplication.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIDockSlider.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorGUI.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUISceneTreeView.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUITreeViewEditBox.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorCommand.cpp">
-      <Filter>Source Files\Editor\Command</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsUndoRedo.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsCmdReparentSO.cpp">
-      <Filter>Source Files\Editor\Command</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsDbgTestGameObjectRef.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUITreeView.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsProjectLibrary.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsResourceMeta.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIResourceTreeView.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsProjectLibraryEntries.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWidgetManager.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsDockManagerLayout.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsEditorWidgetLayout.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIIntField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIFloatField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUITextField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIVector4Field.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIVector3Field.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIVector2Field.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIToggleField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIColor.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIColorField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIFoldout.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIGameObjectField.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIDropButton.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsGUIFieldBase.cpp">
-      <Filter>Source Files\Editor</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsDebugCamera.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-    <ClCompile Include="Source\BsTestTextSprite.cpp">
-      <Filter>Source Files</Filter>
-    </ClCompile>
-  </ItemGroup>
-</Project>

+ 0 - 83
BansheeEditor/Include/BsCmdEditPlainFieldGO.h

@@ -1,83 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorCommand.h"
-#include "BsUndoRedo.h"
-
-namespace BansheeEngine
-{
-	// TODO - This is only valid for plain field types. Add something similar for pointers and/or arrays?
-	template<class T>
-	class CmdEditPlainFieldGO : public EditorCommand
-	{
-	public:
-		~CmdEditPlainFieldGO() 
-		{
-			if(mNewData != nullptr)
-				bs_free(mNewData);
-
-			if(mOldData != nullptr)
-				bs_free(mOldData);
-		}
-
-		static void execute(const GameObjectHandleBase& gameObject, const String& fieldName, const T& fieldValue)
-		{
-			// Register command and commit it
-			CmdEditPlainFieldGO* command = new (bs_alloc<CmdEditPlainFieldGO>()) CmdEditPlainFieldGO(gameObject, fieldName, fieldValue);
-			UndoRedo::instance().registerCommand(command);
-			command->commit();
-		}
-
-		void commit()
-		{
-			if(mGameObject.isDestroyed())
-				return;
-
-			T fieldValue;
-			RTTIPlainType<T>::fromMemory(fieldValue, (char*)mNewData);
-
-			RTTITypeBase* rtti = mGameObject->getRTTI();
-			rtti->setPlainValue(mGameObject.get(), mFieldName, fieldValue);
-		}
-
-		void revert()
-		{
-			if(mGameObject.isDestroyed())
-				return;
-
-			T fieldValue;
-			RTTIPlainType<T>::fromMemory(fieldValue, (char*)mOldData);
-
-			RTTITypeBase* rtti = mGameObject->getRTTI();
-			rtti->setPlainValue(mGameObject.get(), mFieldName, fieldValue);
-		}
-
-	private:
-		friend class UndoRedo;
-
-		CmdEditPlainFieldGO(const GameObjectHandleBase& gameObject, const String& fieldName, const T& fieldValue)
-			:mGameObject(gameObject), mFieldName(fieldName), mNewData(nullptr), mOldData(nullptr)
-		{
-			// Convert new value to bytes
-			UINT32 newDataNumBytes = RTTIPlainType<T>::getDynamicSize(fieldValue);
-			mNewData = bs_alloc(newDataNumBytes);
-
-			RTTIPlainType<T>::toMemory(fieldValue, (char*)mNewData);
-
-			// Get old value and also convert it to bytes
-			String oldFieldValue;
-			gameObject->getRTTI()->getPlainValue(gameObject.get(), fieldName, oldFieldValue);
-
-			UINT32 oldDataNumBytes = RTTIPlainType<T>::getDynamicSize(oldFieldValue);
-			mOldData = bs_alloc(oldDataNumBytes);
-
-			RTTIPlainType<T>::toMemory(oldFieldValue, (char*)mOldData);
-		}
-
-		GameObjectHandleBase mGameObject;
-		String mFieldName;
-
-		void* mNewData;
-		void* mOldData;
-	};
-}

+ 0 - 41
BansheeEditor/Include/BsCmdInputFieldValueChange.h

@@ -1,41 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorCommand.h"
-#include "BsUndoRedo.h"
-
-namespace BansheeEngine
-{
-	template <class InputFieldType, class ValueType>
-	class CmdInputFieldValueChange : public EditorCommand
-	{
-	public:
-		static void execute(InputFieldType* inputField, const ValueType& value)
-		{
-			CmdInputFieldValueChange* command = new (bs_alloc<CmdInputFieldValueChange>()) CmdInputFieldValueChange(inputField, value);
-			UndoRedo::instance().registerCommand(command);
-			command->commit();
-		}
-
-		void commit()
-		{
-			mInputField->setValue(mNewValue);
-		}
-
-		void revert()
-		{
-			mInputField->setValue(mOldValue);
-		}
-
-	private:
-		friend class UndoRedo;
-
-		CmdInputFieldValueChange(InputFieldType* inputField, const ValueType& value)
-			:mInputField(inputField), mOldValue(inputField->getValue()), mNewValue(value)
-		{ }
-
-		ValueType mOldValue;
-		ValueType mNewValue;
-		InputFieldType* mInputField;
-	};
-}

+ 0 - 26
BansheeEditor/Include/BsCmdReparentSO.h

@@ -1,26 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorCommand.h"
-#include "BsUndoRedo.h"
-
-namespace BansheeEngine
-{
-	class CmdReparentSO : public EditorCommand
-	{
-	public:
-		static void execute(const Vector<HSceneObject>& sceneObjects, const HSceneObject& newParent);
-
-		void commit();
-		void revert();
-
-	private:
-		friend class UndoRedo;
-
-		CmdReparentSO(const Vector<HSceneObject>& sceneObjects, const HSceneObject& newParent);
-
-		Vector<HSceneObject> mSceneObjects;
-		Vector<HSceneObject> mOldParents;
-		HSceneObject mNewParent;
-	};
-}

+ 0 - 38
BansheeEditor/Include/BsDbgTestGameObjectRef.h

@@ -1,38 +0,0 @@
-#pragma once
-
-#include "BsPrerequisites.h"
-#include "BsComponent.h"
-
-namespace BansheeEngine
-{
-	class DbgTestGameObjectRef : public Component
-	{
-	public:
-		HRenderable mRenderable;
-
-		/************************************************************************/
-		/* 							COMPONENT OVERRIDES                    		*/
-		/************************************************************************/
-
-	protected:
-		friend class SceneObject;
-
-		/** Standard constructor.
-        */
-		DbgTestGameObjectRef(const HSceneObject& parent);
-
-	public:
-		virtual void update() {}
-
-		/************************************************************************/
-		/* 								RTTI		                     		*/
-		/************************************************************************/
-	public:
-		friend class DbgTestGameObjectRefRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
-
-	protected:
-		DbgTestGameObjectRef() {} // Serialization only
-	};
-}

+ 0 - 41
BansheeEditor/Include/BsDbgTestGameObjectRefRTTI.h

@@ -1,41 +0,0 @@
-#pragma once
-
-#include "BsPrerequisites.h"
-#include "BsRTTIType.h"
-#include "BsDbgTestGameObjectRef.h"
-#include "BsGameObjectRTTI.h"
-
-namespace BansheeEngine
-{
-	class DbgTestGameObjectRefRTTI : public RTTIType<DbgTestGameObjectRef, Component, DbgTestGameObjectRefRTTI>
-	{
-	private:
-		HRenderable& getRenderable(DbgTestGameObjectRef* obj) { return obj->mRenderable; }
-		void setRenderable(DbgTestGameObjectRef* obj, HRenderable& val) 
-		{ 
-			obj->mRenderable = val; 
-		} 
-
-	public:
-		DbgTestGameObjectRefRTTI()
-		{
-			addReflectableField("mRenderable", 0, &DbgTestGameObjectRefRTTI::getRenderable, &DbgTestGameObjectRefRTTI::setRenderable);
-		}
-
-		virtual const String& getRTTIName()
-		{
-			static String name = "DbgTestGameObjectRef";
-			return name;
-		}
-
-		virtual UINT32 getRTTIId()
-		{
-			return 600001; // NOTE: Just a debug value
-		}
-
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
-		{
-			return GameObjectRTTI::createGameObject<DbgTestGameObjectRef>();
-		}
-	};
-}

+ 0 - 39
BansheeEditor/Include/BsDebugCamera.h

@@ -1,39 +0,0 @@
-#pragma once
-
-#include "BsPrerequisites.h"
-#include "BsComponent.h"
-#include "BsMath.h"
-
-namespace BansheeEngine
-{
-	class DebugCamera : public Component
-	{
-	private:
-		float mCurrentSpeed;
-
-		Degree mPitch;
-		Degree mYaw;
-		bool mLastButtonState;
-
-		HCamera mCamera;
-
-		static const float START_SPEED;
-		static const float TOP_SPEED;
-		static const float ACCELERATION;
-		static const float FAST_MODE_MULTIPLIER;
-		static const float ROTATION_SPEED; // Degrees/second
-
-		/************************************************************************/
-		/* 						COMPONENT OVERRIDES                      		*/
-		/************************************************************************/
-	protected:
-		friend class SceneObject;
-
-		/** Standard constructor.
-        */
-		DebugCamera(const HSceneObject& parent);
-
-	public:
-		virtual void update();
-	};
-}

+ 0 - 127
BansheeEditor/Include/BsDockManager.h

@@ -1,127 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-#include "BsRectI.h"
-
-namespace BansheeEngine
-{
-	enum class DockLocation
-	{
-		Left, Right, Top, Bottom, Center
-	};
-
-	class DockManager : public GUIElementContainer
-	{
-	public:
-		class DockContainer
-		{
-		public:
-			DockContainer();
-			DockContainer(DockContainer* parent);
-			~DockContainer();
-
-			void setArea(INT32 x, INT32 y, UINT32 width, UINT32 height);
-			void makeLeaf(GUIWidget* widgetParent, RenderWindow* parentWindow);
-			void makeLeaf(EditorWidgetContainer* existingContainer);
-			void splitContainer(GUIWidget* widgetParent, RenderWindow* parentWindow, bool horizontal, bool newChildIsFirst, float splitPosition = 0.5f);
-			void addLeft(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget);
-			void addRight(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget);
-			void addTop(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget);
-			void addBottom(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget);
-
-			void addWidget(EditorWidgetBase* widget);
-			void addWidget(const String& name);
-
-			DockContainer* find(EditorWidgetContainer* widgetContainer);
-
-			/**
-			 * @brief	Searches for a DockContainer at the specified position.
-			 *
-			 * @param	pos	Position in the same space as DockContainer. 
-			 *
-			 * @return	null if it fails, else the found DockContainer at position.
-			 */
-			DockContainer* findAtPos(const Vector2I& pos);
-
-			RectI getContentBounds() const;
-
-			bool mIsLeaf;
-			DockContainer* mChildren[2];
-			DockContainer* mParent;
-			EditorWidgetContainer* mWidgets;
-			GUIDockSlider* mSlider;
-			RectI mArea;
-			float mSplitPosition;
-			bool mIsHorizontal;
-
-			static const UINT32 SLIDER_SIZE;
-			static const UINT32 MIN_CHILD_SIZE;
-
-		private:
-			void updateChildAreas();
-
-			void sliderDragged(const Vector2I& delta);
-			void widgetRemoved();
-		};
-
-		enum class DockLocation
-		{
-			Top,
-			Bottom,
-			Left,
-			Right,
-			None
-		};
-	public:
-		static DockManager* create(RenderWindow* parentWindow);
-
-		/**
-		 * @brief	Internal method. Called once every frame.
-		 */
-		void update();
-
-		void render(const Viewport* viewport, DrawList& renderQueue);
-		void insert(EditorWidgetContainer* relativeTo, EditorWidgetBase* widgetToInsert, DockLocation location);
-
-		DockManagerLayoutPtr getLayout() const;
-		void setLayout(const DockManagerLayoutPtr& layout);
-
-		void setArea(INT32 x, INT32 y, UINT32 width, UINT32 height);
-
-	protected:
-		~DockManager();
-
-		void updateClippedBounds();
-
-	private:
-		DockManager(RenderWindow* parentWindow, const GUILayoutOptions& layoutOptions);
-
-		static const Color TINT_COLOR;
-		static const Color HIGHLIGHT_COLOR;
-
-		RenderWindow* mParentWindow;
-		DockContainer mRootContainer;
-		RectI mArea;
-
-		HMesh mDropOverlayMesh;
-		HMaterial mDropOverlayMat;
-		RectI mLastOverlayBounds;
-
-		DockContainer* mMouseOverContainer;
-		DockLocation mHighlightedDropLoc;
-		bool mShowOverlay;
-		Vector2* mTopDropPolygon;
-		Vector2* mBotDropPolygon;
-		Vector2* mLeftDropPolygon;
-		Vector2* mRightDropPolygon;
-		bool mAddedRenderCallback;
-
-		void updateDropOverlay(INT32 x, INT32 y, UINT32 width, UINT32 height);
-
-		bool mouseEvent(const GUIMouseEvent& event);
-		bool insidePolygon(Vector2* polyPoints, UINT32 numPoints, Vector2 point) const;
-
-		void _changeParentWidget(GUIWidget* widget);
-	};
-}

+ 0 - 49
BansheeEditor/Include/BsDockManagerLayout.h

@@ -1,49 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsIReflectable.h"
-#include "BsRectI.h"
-
-namespace BansheeEngine
-{
-	class DockManagerLayout : public IReflectable
-	{
-	public:
-		struct Entry
-		{
-		public:
-			Entry();
-			~Entry();
-
-			static Entry* createLeaf(Entry* parent, UINT32 childIdx, 
-				const Vector<String>& widgetNames);
-			static Entry* createContainer(Entry* parent, UINT32 childIdx, float splitPosition, 
-				bool horizontalSplit);
-
-			Vector<String> widgetNames;
-			bool isLeaf;
-			float splitPosition;
-			bool horizontalSplit;
-
-			Entry* children[2];
-			Entry* parent;
-		};
-
-	public:
-		~DockManagerLayout();
-
-		Entry& getRootEntry() { return mRootEntry; }
-
-	private:
-		Entry mRootEntry;
-
-		/************************************************************************/
-		/* 								RTTI		                     		*/
-		/************************************************************************/
-
-	public:
-		friend class DockManagerLayoutRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
-	};
-}

+ 0 - 113
BansheeEditor/Include/BsDockManagerLayoutRTTI.h

@@ -1,113 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsDockManagerLayout.h"
-#include "BsRTTIType.h"
-
-namespace BansheeEngine
-{
-	class DockManagerLayoutRTTI : public RTTIType<DockManagerLayout, IReflectable, DockManagerLayoutRTTI>
-	{
-	private:
-		DockManagerLayout::Entry& getRootEntry(DockManagerLayout* obj) { return obj->mRootEntry; }
-		void setRootEntry(DockManagerLayout* obj, DockManagerLayout::Entry& val) { obj->mRootEntry = val; } 
-
-	public:
-		DockManagerLayoutRTTI()
-		{
-			addPlainField("mRootEntry", 0, &DockManagerLayoutRTTI::getRootEntry, &DockManagerLayoutRTTI::setRootEntry);
-		}
-
-		virtual const String& getRTTIName()
-		{
-			static String name = "DockManagerLayout";
-			return name;
-		}
-
-		virtual UINT32 getRTTIId()
-		{
-			return TID_DockManagerLayout;
-		}
-
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
-		{
-			return bs_shared_ptr<DockManagerLayout>();
-		}
-	};
-}
-
-namespace BansheeEngine
-{
-	template<> struct RTTIPlainType<BansheeEngine::DockManagerLayout::Entry>
-	{	
-		enum { id = BansheeEngine::TID_DockManagerLayoutEntry }; enum { hasDynamicSize = 1 };
-
-		static void toMemory(const BansheeEngine::DockManagerLayout::Entry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			char* memoryStart = memory;
-			memory += sizeof(UINT32);
-			size += sizeof(UINT32);
-
-			memory = rttiWriteElem(data.isLeaf, memory, size);
-			memory = rttiWriteElem(data.horizontalSplit, memory, size);
-			memory = rttiWriteElem(data.splitPosition, memory, size);
-			memory = rttiWriteElem(data.widgetNames, memory, size);
-
-			if(!data.isLeaf)
-			{
-				memory = rttiWriteElem(*data.children[0], memory, size);
-				memory = rttiWriteElem(*data.children[1], memory, size);
-			}
-
-			memcpy(memoryStart, &size, sizeof(UINT32));
-		}
-
-		static UINT32 fromMemory(BansheeEngine::DockManagerLayout::Entry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			memcpy(&size, memory, sizeof(UINT32));
-			memory += sizeof(UINT32);
-
-			memory = rttiReadElem(data.isLeaf, memory);
-			memory = rttiReadElem(data.horizontalSplit, memory);
-			memory = rttiReadElem(data.splitPosition, memory);
-			memory = rttiReadElem(data.widgetNames, memory);
-
-			if(!data.isLeaf)
-			{
-				data.children[0] = bs_new<BansheeEngine::DockManagerLayout::Entry>();
-				data.children[1] = bs_new<BansheeEngine::DockManagerLayout::Entry>();
-
-				memory = rttiReadElem(*data.children[0], memory);
-				memory = rttiReadElem(*data.children[1], memory);
-				
-				data.children[0]->parent = &data;
-				data.children[1]->parent = &data;
-			}
-
-			return size;
-		}
-
-		static UINT32 getDynamicSize(const BansheeEngine::DockManagerLayout::Entry& data)	
-		{ 
-			UINT64 dataSize = sizeof(UINT32) + rttiGetElemSize(data.isLeaf) + rttiGetElemSize(data.horizontalSplit) + 
-				rttiGetElemSize(data.splitPosition) + rttiGetElemSize(data.widgetNames);
-
-			if(!data.isLeaf)
-			{
-				dataSize += rttiGetElemSize(*data.children[0]);
-				dataSize += rttiGetElemSize(*data.children[1]);
-			}
-
-#if BS_DEBUG_MODE
-			if(dataSize > std::numeric_limits<UINT32>::max())
-			{
-				__string_throwDataOverflowException();
-			}
-#endif
-
-			return (UINT32)dataSize;
-		}	
-	}; 
-}

+ 0 - 49
BansheeEditor/Include/BsEditorApplication.h

@@ -1,49 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsApplication.h"
-#include "BsPath.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT EditorApplication : public Application
-	{
-	public:
-		EditorApplication(RenderSystemPlugin renderSystemPlugin);
-		virtual ~EditorApplication();
-
-		static void startUp(RenderSystemPlugin renderSystemPlugin);
-
-		bool isProjectLoaded() const;
-		const Path& getActiveProjectPath() const;
-	private:
-		virtual void onStartUp();
-		virtual void update();
-
-		EditorWidgetLayoutPtr loadWidgetLayout();
-		void saveWidgetLayout(const EditorWidgetLayoutPtr& layout);
-
-		static void closeModalWindow(RenderWindowPtr window, HSceneObject sceneObject);
-
-	private:
-		static const Path WIDGET_LAYOUT_PATH;
-		RenderSystemPlugin mActiveRSPlugin;
-
-		// DEBUG ONLY
-
-		HGpuProgram mFragProgRef;
-		HGpuProgram mVertProgRef;
-
-		ShaderPtr mTestShader;
-		TechniquePtr mNewTechniqueGL;
-		PassPtr mNewPassGL;
-		TechniquePtr mNewTechniqueDX;
-		PassPtr mNewPassDX;
-		TechniquePtr mNewTechniqueDX11;
-		PassPtr mNewPassDX11;
-
-		HMaterial mTestMaterial;
-		HTexture mTestTexRef;
-		HMesh mDbgMeshRef;
-	};
-}

+ 0 - 17
BansheeEditor/Include/BsEditorCommand.h

@@ -1,17 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-
-namespace BansheeEngine
-{
-	class EditorCommand
-	{
-	public:
-		virtual ~EditorCommand() { }
-
-		virtual void commit() { }
-		virtual void revert() { }
-
-		static void destroy(EditorCommand* command);
-	};
-}

+ 0 - 140
BansheeEditor/Include/BsEditorGUI.h

@@ -1,140 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUISkin.h"
-#include "BsModule.h"
-#include "BsPath.h"
-
-namespace BansheeEngine
-{
-	class EditorGUI : public BansheeEngine::Module<EditorGUI>
-	{
-	public:
-		EditorGUI();
-
-		const GUISkin& getSkin() const { return mSkin; }
-
-	private:
-		GUISkin mSkin;
-
-		static const Path DefaultFolder;
-
-		static const WString DefaultFontPath;
-		static const UINT32 DefaultFontSize;
-
-		static const WString WindowBackgroundTexture;
-
-		static const WString WindowFrameNormal;
-		static const WString WindowFrameFocused;
-
-		static const WString WindowTitleBarBg;
-
-		static const WString WindowCloseButtonNormal;
-		static const WString WindowCloseButtonHover;
-
-		static const WString WindowMinButtonNormal;
-		static const WString WindowMinButtonHover;
-
-		static const WString WindowMaxButtonNormal;
-		static const WString WindowMaxButtonHover;
-
-		static const WString TabbedBarBtnNormal;
-		static const WString TabbedBarBtnActive;
-
-		static const WString ButtonNormalTex;
-		static const WString ButtonHoverTex;
-		static const WString ButtonActiveTex;
-
-		static const WString ToggleNormalTex;
-		static const WString ToggleHoverTex;
-		static const WString ToggleActiveTex;
-		static const WString ToggleNormalOnTex;
-		static const WString ToggleHoverOnTex;
-		static const WString ToggleActiveOnTex;
-
-		static const WString ObjectDropBtnNormalTex;
-		static const WString ObjectDropBtnNormalOnTex;
-		static const WString ObjectClearBtnNormalTex;
-		static const WString ObjectClearBtnHoverTex;
-		static const WString ObjectClearBtnActiveTex;
-
-		static const WString FoldoutOpenNormalTex;
-		static const WString FoldoutOpenHoverTex;
-		static const WString FoldoutClosedNormalTex;
-		static const WString FoldoutClosedHoverTex;
-		static const WString FoldoutBackgroundTex;
-
-		static const WString InputBoxNormalTex;
-		static const WString InputBoxHoverTex;
-		static const WString InputBoxFocusedTex;
-
-		static const WString ScrollBarUpNormalTex;
-		static const WString ScrollBarUpHoverTex;
-		static const WString ScrollBarUpActiveTex;
-
-		static const WString ScrollBarDownNormalTex;
-		static const WString ScrollBarDownHoverTex;
-		static const WString ScrollBarDownActiveTex;
-
-		static const WString ScrollBarLeftNormalTex;
-		static const WString ScrollBarLeftHoverTex;
-		static const WString ScrollBarLeftActiveTex;
-
-		static const WString ScrollBarRightNormalTex;
-		static const WString ScrollBarRightHoverTex;
-		static const WString ScrollBarRightActiveTex;
-
-		static const WString ScrollBarHandleHorzNormalTex;
-		static const WString ScrollBarHandleHorzHoverTex;
-		static const WString ScrollBarHandleHorzActiveTex;
-
-		static const WString ScrollBarHandleVertNormalTex;
-		static const WString ScrollBarHandleVertHoverTex;
-		static const WString ScrollBarHandleVertActiveTex;
-
-		static const WString ScrollBarBgTex;
-
-		static const WString DropDownBtnNormalTex;
-		static const WString DropDownBtnHoverTex;
-
-		static const WString DropDownBoxBgTex;
-		static const WString DropDownBoxEntryNormalTex;
-		static const WString DropDownBoxEntryHoverTex;
-
-		static const WString DropDownBoxBtnUpNormalTex;
-		static const WString DropDownBoxBtnUpHoverTex;
-
-		static const WString DropDownBoxBtnDownNormalTex;
-		static const WString DropDownBoxBtnDownHoverTex;
-
-		static const WString DropDownBoxEntryExpNormalTex;
-		static const WString DropDownBoxEntryExpHoverTex;
-
-		static const WString DropDownSeparatorTex;
-
-		static const WString DropDownBoxBtnUpArrowTex;
-		static const WString DropDownBoxBtnDownArrowTex;
-
-		static const WString MenuBarBgTex;
-
-		static const WString MenuBarBtnNormalTex;
-		static const WString MenuBarBtnHoverTex;
-
-		static const WString MenuBarBansheeLogoTex;
-
-		static const WString DockSliderNormalTex;
-
-		static const WString TreeViewExpandButtonOffNormal;
-		static const WString TreeViewExpandButtonOffHover;
-		static const WString TreeViewExpandButtonOnNormal;
-		static const WString TreeViewExpandButtonOnHover;
-
-		static const WString TreeViewSelectionBackground;
-		static const WString TreeViewEditBox;
-
-		static const WString TreeViewElementHighlight;
-		static const WString TreeViewElementSepHighlight;
-
-		static HSpriteTexture getTexture(const WString& name);
-	};
-}

+ 0 - 75
BansheeEditor/Include/BsEditorPrerequisites.h

@@ -1,75 +0,0 @@
-#pragma once
-
-#include "BsPrerequisites.h"
-
-#if (BS_PLATFORM == BS_PLATFORM_WIN32) && !defined(__MINGW32__)
-#	ifdef BS_ED_EXPORTS
-#		define BS_ED_EXPORT __declspec(dllexport)
-#	else
-#       if defined( __MINGW32__ )
-#           define BS_ED_EXPORT
-#       else
-#    		define BS_ED_EXPORT __declspec(dllimport)
-#       endif
-#	endif
-#elif defined ( BS_GCC_VISIBILITY )
-#    define BS_ED_EXPORT  __attribute__ ((visibility("default")))
-#else
-#    define BS_ED_EXPORT
-#endif
-
-namespace BansheeEngine
-{
-	// GUI
-	class EditorWindowBase;
-	class EditorWindow;
-	class EditorWidgetBase;
-	class EditorWidgetContainer;
-	class EditorWidgetManager;
-	class EditorWidgetLayout;
-	class GUITabbedTitleBar;
-	class GUITabButton;
-	class GUIWindowDropArea;
-	class GUIWindowFrame;
-	class GUIIntField;
-	class GUIFloatField;
-	class GUITextField;
-	class GUIColor;
-	class GUIFoldout;
-	class GUIDropButton;
-	class EditorWindowManager;
-	class DockManager;
-	class DockManagerLayout;
-	class MainEditorWindow;
-	class WindowFrameWidget;
-	class GUIMenuBar;
-	class GUIDockSlider;
-	class GUISceneTreeView;
-	class GUIResourceTreeView;
-	class GUITreeViewEditBox;
-	class EditorCommand;
-	class ResourceMeta;
-
-	typedef std::shared_ptr<ResourceMeta> ResourceMetaPtr;
-	typedef std::shared_ptr<DockManagerLayout> DockManagerLayoutPtr;
-	typedef std::shared_ptr<EditorWidgetLayout> EditorWidgetLayoutPtr;
-
-	enum class DragAndDropType
-	{
-		EditorWidget = 10000,
-		SceneObject = 10001,
-		Resources = 10002
-	};
-
-	enum TypeID_BansheeEditor
-	{
-		TID_ResourceMeta = 40000,
-		TID_ProjectLibraryEntries = 40001,
-		TID_ProjectLibraryResEntry = 40002,
-		TID_ProjectLibraryDirEntry = 40003,
-		TID_DockManagerLayout = 40004,
-		TID_DockManagerLayoutEntry = 40005,
-		TID_EditorWidgetLayout = 40006,
-		TID_EditorWidgetLayoutEntry = 40007
-	};
-}

+ 0 - 91
BansheeEditor/Include/BsEditorWidget.h

@@ -1,91 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWidgetManager.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT EditorWidgetBase
-	{
-	public:
-		const String& getName() const { return mName; }
-		const HString& getDisplayName() const { return mDisplayName; }
-
-		INT32 getX() const { return mX; }
-		INT32 getY() const { return mY; }
-		UINT32 getWidth() const { return mWidth; }
-		UINT32 getHeight() const { return mHeight; }
-
-		void _setSize(UINT32 width, UINT32 height);
-		void _setPosition(INT32 x, INT32 y);
-		void _changeParent(EditorWidgetContainer* parent);
-		EditorWidgetContainer* _getParent() const { return mParent; }
-
-		void _disable();
-		void _enable();
-
-		void close();
-
-		Event<void(UINT32, UINT32)> onResized;
-		Event<void(INT32, INT32)> onMoved;
-		Event<void(EditorWidgetContainer*)> onParentChanged;
-	protected:
-		friend class EditorWidgetManager;
-
-		EditorWidgetBase(const HString& displayName, const String& name, EditorWidgetContainer& parentContainer);
-		virtual ~EditorWidgetBase();
-
-		String mName;
-		HString mDisplayName;
-		EditorWidgetContainer* mParent;
-		INT32 mX, mY;
-		UINT32 mWidth, mHeight;
-		GUIArea* mContent;
-
-		GUIWidget& getParentWidget() const;
-
-		static void destroy(EditorWidgetBase* widget);
-	};
-
-	template<typename Type>
-	struct RegisterWidgetOnStart
-	{
-	public:
-		RegisterWidgetOnStart()
-		{
-			EditorWidgetManager::preRegisterWidget(Type::getTypeName(), &create);
-		}
-
-		static EditorWidgetBase* create(EditorWidgetContainer& parentContainer)
-		{
-			return bs_new<Type>(EditorWidget<Type>::ConstructPrivately(), parentContainer);
-		}
-
-		void makeSureIAmInstantiated() { }
-	};
-
-	template <class Type>
-	class EditorWidget : public EditorWidgetBase
-	{
-		static RegisterWidgetOnStart<Type> RegisterOnStart;
-
-	protected:
-		friend struct RegisterWidgetOnStart<Type>;
-
-		struct ConstructPrivately {};
-
-		EditorWidget(const HString& displayName, EditorWidgetContainer& parentContainer)
-			:EditorWidgetBase(displayName, Type::getTypeName(), parentContainer)
-		{
-			RegisterOnStart.makeSureIAmInstantiated();
-		}
-
-	public:
-
-		virtual ~EditorWidget() { }
-	};
-
-	template <typename Type>
-	RegisterWidgetOnStart<Type> EditorWidget<Type>::RegisterOnStart;
-}

+ 0 - 55
BansheeEditor/Include/BsEditorWidgetContainer.h

@@ -1,55 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT EditorWidgetContainer
-	{
-	public:
-		EditorWidgetContainer(GUIWidget* parent, RenderWindow* renderWindow, EditorWindow* parentEditorWindow);
-		virtual ~EditorWidgetContainer();
-
-		void add(EditorWidgetBase& widget);
-		void remove(EditorWidgetBase& widget);
-		void insert(UINT32 idx, EditorWidgetBase& widget);
-		bool contains(EditorWidgetBase& widget);
-
-		void setSize(UINT32 width, UINT32 height);
-		void setPosition(INT32 x, INT32 y);
-
-		UINT32 getNumWidgets() const { return (UINT32)mWidgets.size(); }
-		EditorWidgetBase* getWidget(UINT32 idx) const;
-		GUIWidget& getParentWidget() const { return *mParent; }
-		EditorWindow* getParentWindow() const { return mParentWindow; }
-
-		RectI getContentBounds() const;
-		Vector<RectI> getDraggableAreas() const;
-
-		void _notifyWidgetDestroyed(EditorWidgetBase* widget);
-
-		Event<void()> onWidgetClosed;
-	private:
-		EditorWindow* mParentWindow;
-		GUITabbedTitleBar* mTitleBar;
-		GUIArea* mTitleBarArea;
-		GUIWidget* mParent;
-		INT32 mX, mY;
-		UINT32 mWidth, mHeight;
-		UnorderedMap<UINT32, EditorWidgetBase*> mWidgets;
-		INT32 mActiveWidget;
-
-		static const UINT32 TitleBarHeight;
-
-		void removeInternal(EditorWidgetBase& widget);
-
-		void setActiveWidget(UINT32 idx);
-		void tabActivated(UINT32 idx);
-		void tabClosed(UINT32 idx);
-		void tabDraggedOff(UINT32 idx);
-		void tabDraggedOn(UINT32 idx);
-
-		static void tabDroppedCallback(bool wasDragProcessed);
-	};
-}

+ 0 - 45
BansheeEditor/Include/BsEditorWidgetLayout.h

@@ -1,45 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsIReflectable.h"
-
-namespace BansheeEngine
-{
-	class EditorWidgetLayout : public IReflectable
-	{
-	public:
-		struct Entry
-		{
-		public:
-			Entry();
-			~Entry();
-
-			Vector<String> widgetNames;
-			bool isDocked;
-			INT32 x, y;
-			UINT32 width, height;
-		};
-
-	private:
-		struct PrivatelyConstruct {};
-
-	public:
-		EditorWidgetLayout(const DockManagerLayoutPtr& dockLayout);
-		EditorWidgetLayout(const PrivatelyConstruct& dummy) { }
-
-		Vector<Entry>& getEntries() { return mEntries; }
-		const DockManagerLayoutPtr& getDockLayout() const { return mDockLayout; }
-
-	private:
-		Vector<Entry> mEntries;
-		DockManagerLayoutPtr mDockLayout;
-
-		/************************************************************************/
-		/* 								RTTI		                     		*/
-		/************************************************************************/
-	public:
-		friend class EditorWidgetLayoutRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
-	};
-}

+ 0 - 102
BansheeEditor/Include/BsEditorWidgetLayoutRTTI.h

@@ -1,102 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWidgetLayout.h"
-#include "BsDockManagerLayout.h"
-#include "BsRTTIType.h"
-
-namespace BansheeEngine
-{
-	class EditorWidgetLayoutRTTI : public RTTIType<EditorWidgetLayout, IReflectable, EditorWidgetLayoutRTTI>
-	{
-	private:
-		EditorWidgetLayout::Entry& getEntry(EditorWidgetLayout* obj, UINT32 idx) { return obj->mEntries[idx]; }
-		void setEntry(EditorWidgetLayout* obj, UINT32 idx, EditorWidgetLayout::Entry& val) { obj->mEntries[idx] = val; } 
-		UINT32 getEntriesArraySize(EditorWidgetLayout* obj) { return (UINT32)obj->mEntries.size(); }
-		void setEntriesArraySize(EditorWidgetLayout* obj, UINT32 size) { obj->mEntries.resize(size); }
-
-		DockManagerLayoutPtr getDockLayout(EditorWidgetLayout* obj) { return obj->mDockLayout; }
-		void setDockLayout(EditorWidgetLayout* obj, DockManagerLayoutPtr val) { obj->mDockLayout = val; }
-
-	public:
-		EditorWidgetLayoutRTTI()
-		{
-			addPlainArrayField("mRootEntry", 0, &EditorWidgetLayoutRTTI::getEntry, &EditorWidgetLayoutRTTI::getEntriesArraySize, 
-				&EditorWidgetLayoutRTTI::setEntry, &EditorWidgetLayoutRTTI::setEntriesArraySize);
-
-			addReflectablePtrField("mDockLayout", 1, &EditorWidgetLayoutRTTI::getDockLayout, &EditorWidgetLayoutRTTI::setDockLayout);
-		}
-
-		virtual const String& getRTTIName()
-		{
-			static String name = "EditorWidgetLayout";
-			return name;
-		}
-
-		virtual UINT32 getRTTIId()
-		{
-			return TID_EditorWidgetLayout;
-		}
-
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
-		{
-			return bs_shared_ptr<EditorWidgetLayout>(EditorWidgetLayout::PrivatelyConstruct());
-		}
-	};
-}
-
-namespace BansheeEngine
-{
-	template<> struct RTTIPlainType<BansheeEngine::EditorWidgetLayout::Entry>
-	{	
-		enum { id = BansheeEngine::TID_EditorWidgetLayoutEntry }; enum { hasDynamicSize = 1 };
-
-		static void toMemory(const BansheeEngine::EditorWidgetLayout::Entry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			char* memoryStart = memory;
-			memory += sizeof(UINT32);
-			size += sizeof(UINT32);
-
-			memory = rttiWriteElem(data.widgetNames, memory, size);
-			memory = rttiWriteElem(data.isDocked, memory, size);
-			memory = rttiWriteElem(data.x, memory, size);
-			memory = rttiWriteElem(data.y, memory, size);
-			memory = rttiWriteElem(data.width, memory, size);
-			memory = rttiWriteElem(data.height, memory, size);
-
-			memcpy(memoryStart, &size, sizeof(UINT32));
-		}
-
-		static UINT32 fromMemory(BansheeEngine::EditorWidgetLayout::Entry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			memcpy(&size, memory, sizeof(UINT32));
-			memory += sizeof(UINT32);
-
-			memory = rttiReadElem(data.widgetNames, memory);
-			memory = rttiReadElem(data.isDocked, memory);
-			memory = rttiReadElem(data.x, memory);
-			memory = rttiReadElem(data.y, memory);
-			memory = rttiReadElem(data.width, memory);
-			memory = rttiReadElem(data.height, memory);
-
-			return size;
-		}
-
-		static UINT32 getDynamicSize(const BansheeEngine::EditorWidgetLayout::Entry& data)	
-		{ 
-			UINT64 dataSize = sizeof(UINT32) + rttiGetElemSize(data.widgetNames) + rttiGetElemSize(data.isDocked) + 
-				rttiGetElemSize(data.x) + rttiGetElemSize(data.y) + rttiGetElemSize(data.width) + rttiGetElemSize(data.height);
-
-#if BS_DEBUG_MODE
-			if(dataSize > std::numeric_limits<UINT32>::max())
-			{
-				__string_throwDataOverflowException();
-			}
-#endif
-
-			return (UINT32)dataSize;
-		}	
-	}; 
-}

+ 0 - 75
BansheeEditor/Include/BsEditorWidgetManager.h

@@ -1,75 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsModule.h"
-
-namespace BansheeEngine
-{
-	/**
-	 * @brief	Handles opening and closing of EditorWidgets. Its primary purpose
-	 * 			is to keep track of all types of widgets so they can be saved and restored
-	 * 			upon program shutdown/startup, as well as being able to change widget layout on
-	 * 			the fly.
-	 */
-	class BS_ED_EXPORT EditorWidgetManager : public Module<EditorWidgetManager>
-	{
-	public:
-		EditorWidgetManager();
-
-		/**
-		 * @brief	Registers a widget that can then be opened by calling "open". When loading
-		 * 			a widget layout this name and callback will be used to attempt creating the widget.
-		 *
-		 * @param	name				  	Unique name for the widget.
-		 * @param 	createCallback			Callback that returns a new instance of the widget.
-		 */
-		void registerWidget(const String& name, std::function<EditorWidgetBase*(EditorWidgetContainer&)> createCallback);
-
-		/**
-		 * @brief	Creates a widget with the given name. If widget is already created it returns the existing instance.
-		 * 			Widget is opened in a new window.
-		 *
-		 * @param	name	The name of the widget.
-		 *
-		 * @return	Always returns the created widget, and throws an exception if it fails.
-		 */
-		EditorWidgetBase* open(const String& name);
-
-		/**
-		 * @brief	Creates a new widget an inserts it into the specified container.
-		 */
-		EditorWidgetBase* create(const String& name, EditorWidgetContainer& parentContainer);
-
-		/**
-		 * @brief	Closes the given widget.
-		 */
-		void close(EditorWidgetBase* widget);
-
-		/**
-		 * @brief	Retrieves the layout of all currently active widgets. You may later
-		 * 			use this layout to restore exact position of the widgets.
-		 */
-		EditorWidgetLayoutPtr getLayout() const;
-
-		/**
-		 * @brief	Positions all widgets according to the provided layout. It will open
-		 * 			new widgets or close current ones if needed.
-		 */
-		void setLayout(const EditorWidgetLayoutPtr& layout);
-
-		/**
-		 * @brief	Allows you to queue up widgets that will be registered as soon as an instance of EditorWidgetManager is
-		 * 			created.
-		 *
-		 * @note	Useful primarily when widgets are being registered from static methods, because then there is no
-		 * 			EditorWidgetManager instance yet.
-		 */
-		static void preRegisterWidget(const String& name, std::function<EditorWidgetBase*(EditorWidgetContainer&)> createCallback);
-
-	private:
-		Map<String, EditorWidgetBase*> mActiveWidgets;
-		Map<String, std::function<EditorWidgetBase*(EditorWidgetContainer&)>> mCreateCallbacks;
-
-		static Stack<std::pair<String, std::function<EditorWidgetBase*(EditorWidgetContainer&)>>> QueuedCreateCallbacks;
-	};
-}

+ 0 - 29
BansheeEditor/Include/BsEditorWindow.h

@@ -1,29 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWindowBase.h"
-
-namespace BansheeEngine
-{
-	class EditorWindow : public EditorWindowBase
-	{
-	public:
-		virtual ~EditorWindow();
-
-		EditorWidgetContainer& widgets() const { return *mWidgets; }
-
-		static EditorWindow* create();
-
-	protected:
-		friend class EditorWindowManager;
-		EditorWindow();
-
-		virtual void resized();
-	private:
-		EditorWidgetContainer* mWidgets;
-
-		void updateSize();
-		void widgetRemoved();
-		void closeWindowDelayed();
-	};
-}

+ 0 - 46
BansheeEditor/Include/BsEditorWindowBase.h

@@ -1,46 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class EditorWindowBase
-	{
-	public:
-		virtual ~EditorWindowBase();
-
-		virtual void setPosition(INT32 x, INT32 y);
-		virtual void setSize(UINT32 width, UINT32 height);
-
-		INT32 getLeft() const;
-		INT32 getTop() const;
-
-		UINT32 getWidth() const;
-		UINT32 getHeight() const;
-
-		virtual void close();
-		void hide();
-
-		/**
-		 * @brief	Called once every frame. Internal method.
-		 */
-		virtual void update() { }
-	protected:
-		EditorWindowBase();
-		EditorWindowBase(const RenderWindowPtr& renderWindow);
-
-		RenderWindowPtr mRenderWindow;
-		HSceneObject mSceneObject;
-		HGUIWidget mGUI;
-		HCamera mCamera;
-		GameObjectHandle<WindowFrameWidget> mWindowFrame;
-		bool mOwnsRenderWindow;
-
-		void construct(const RenderWindowPtr& renderWindow);
-		virtual void initialize();
-		virtual void resized() { }
-	private:
-		HEvent mResizedConn;
-	};
-}

+ 0 - 28
BansheeEditor/Include/BsEditorWindowManager.h

@@ -1,28 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsModule.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class EditorWindowManager : public Module<EditorWindowManager>
-	{
-	public:
-		EditorWindowManager();
-		~EditorWindowManager();
-
-		MainEditorWindow* createMain(const RenderWindowPtr& parentRenderWindow);
-		EditorWindow* create();
-		void destroy(EditorWindowBase* window);
-
-		MainEditorWindow* getMainWindow() const { return mMainWindow; }
-
-		void update();
-	protected:
-		MainEditorWindow* mMainWindow;
-
-		Vector<EditorWindowBase*> mEditorWindows;
-		Vector<EditorWindowBase*> mScheduledForDestruction;
-	};
-}

+ 0 - 71
BansheeEditor/Include/BsGUIColor.h

@@ -1,71 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElement.h"
-#include "BsImageSprite.h"
-#include "BsGUIContent.h"
-
-namespace BansheeEngine
-{
-	class GUIColor : public GUIElement
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUIColor* create(const String& styleName = StringUtil::BLANK);
-		static GUIColor* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		virtual Vector2I _getOptimalSize() const;
-
-		void setColor(const Color& color);
-		Color getColor() const { return mColor; }
-
-	protected:
-		GUIColor(const String& styleName, const GUILayoutOptions& layoutOptions);
-		virtual ~GUIColor();
-
-		/**
-		 * @copydoc GUIElement::getNumRenderElements()
-		 */
-		virtual UINT32 getNumRenderElements() const;
-
-		/**
-		 * @copydoc GUIElement::getMaterial()
-		 */
-		virtual const GUIMaterialInfo& getMaterial(UINT32 renderElementIdx) const;
-
-		/**
-		 * @copydoc GUIElement::getNumQuads()
-		 */
-		virtual UINT32 getNumQuads(UINT32 renderElementIdx) const;
-
-		/**
-		 * @copydoc GUIElement::fillBuffer()
-		 */
-		virtual void fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, 
-			UINT32 maxNumQuads, UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx) const;
-
-		/**
-		 * @copydoc GUIElement::updateRenderElementsInternal()
-		 */
-		virtual void updateRenderElementsInternal();
-
-		/**
-		 * @copydoc GUIElement::updateBounds()
-		 */
-		virtual void updateClippedBounds();
-
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-	private:
-		static const float ALPHA_SPLIT_POSITION;
-
-		ImageSprite* mColorSprite;
-		ImageSprite* mAlphaSprite;
-
-		IMAGE_SPRITE_DESC mColorImageDesc;
-		IMAGE_SPRITE_DESC mAlphaImageDesc;
-
-		Color mColor;
-	};
-}

+ 0 - 55
BansheeEditor/Include/BsGUIColorField.h

@@ -1,55 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIColorField : public GUIElementContainer
-	{
-		struct PrivatelyConstruct {};
-
-	public:
-		static const String& getGUITypeName();
-
-		static GUIColorField* create(const GUIContent& labelContent, 
-			const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
-
-		static GUIColorField* create(const HString& labelText, 
-			const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
-
-		static GUIColorField* create(const GUIOptions& layoutOptions, const String& labelStyle = StringUtil::BLANK, 
-			const String& toggleStyle = StringUtil::BLANK);
-
-		static GUIColorField* create(const GUIContent& labelContent, const String& labelStyle = StringUtil::BLANK, 
-			const String& toggleStyle = StringUtil::BLANK);
-
-		static GUIColorField* create(const HString& labelText, const String& labelStyle = StringUtil::BLANK,
-			const String& toggleStyle = StringUtil::BLANK);
-
-		static GUIColorField* create(const String& labelStyle = StringUtil::BLANK, const String& toggleStyle = StringUtil::BLANK);
-
-		GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-			const String& labelStyle, const String& toggleStyle, const GUILayoutOptions& layoutOptions);
-
-		GUIColorField(const PrivatelyConstruct& dummy, const String& labelStyle, const String& toggleStyle, 
-			const GUILayoutOptions& layoutOptions);
-
-		Color getValue() const;
-		void setValue(const Color& value);
-
-		void setLabelWidth(UINT32 width);
-
-		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-
-		Vector2I _getOptimalSize() const;
-	protected:
-		virtual ~GUIColorField();
-
-	protected:
-		UINT32 mLabelWidth;
-		GUILabel* mLabel;
-		GUIColor* mColor;
-	};
-}

+ 0 - 31
BansheeEditor/Include/BsGUIDockSlider.h

@@ -1,31 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIButtonBase.h"
-#include "BsDockManager.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUIDockSlider : public GUIButtonBase
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUIDockSlider* create(bool horizontal, const String& styleName = StringUtil::BLANK);
-		static GUIDockSlider* create(bool horizontal, const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		Event<void(const Vector2I&)> onDragged;
-	protected:
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-		bool _hasCustomCursor(const Vector2I position, CursorType& type) const;
-	private:
-		Vector2I mLastDragPosition;
-		bool mHorizontal;
-		bool mIsCursorSet;
-		bool mDragInProgress;
-
-		GUIDockSlider(bool horizontal, const String& styleName, const GUILayoutOptions& layoutOptions);
-	};
-}

+ 0 - 33
BansheeEditor/Include/BsGUIDropButton.h

@@ -1,33 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIButtonBase.h"
-#include "BsGUIToggleGroup.h"
-#include "BsImageSprite.h"
-#include "BsTextSprite.h"
-#include "BsGUIContent.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUIDropButton : public GUIButtonBase
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUIDropButton* create(UINT32 dragType, const String& styleName = StringUtil::BLANK);
-		static GUIDropButton* create(UINT32 dragType, const GUIOptions& layoutOptions, 
-			const String& styleName = StringUtil::BLANK);
-
-		Event<void(void*)> onDataDropped;
-	protected:
-		virtual ~GUIDropButton();
-
-	protected:
-		GUIDropButton(UINT32 dragType, const String& styleName, const GUILayoutOptions& layoutOptions);
-
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-		UINT32 mDragType;
-	};
-}

+ 0 - 108
BansheeEditor/Include/BsGUIFieldBase.h

@@ -1,108 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIFieldBase : public GUIElementContainer
-	{
-	protected:
-		struct PrivatelyConstruct {};
-
-	public:
-		GUIFieldBase(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-
-		Vector2I _getOptimalSize() const;
-	protected:
-		virtual ~GUIFieldBase() { }
-
-	protected:
-		static const UINT32 DEFAULT_LABEL_WIDTH;
-
-		GUILayout* mLayout;
-		GUILabel* mLabel;
-	};
-
-	template <class T>
-	class TGUIField : public GUIFieldBase
-	{
-	public:
-		static T* create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), labelContent, labelWidth, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(layoutOptions), true);
-		}
-
-		static T* create(const GUIContent& labelContent, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), labelContent, DEFAULT_LABEL_WIDTH, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(layoutOptions), true);
-		}
-
-		static T* create(const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), labelWidth, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(layoutOptions), true);
-		}
-
-		static T* create(const HString& labelText, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), DEFAULT_LABEL_WIDTH, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(layoutOptions), true);
-		}
-
-		static T* create(const GUIOptions& layoutOptions, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(), 0, nullptr, entryElementStyle, 
-				GUILayoutOptions::create(layoutOptions), false);
-		}
-
-		static T* create(const GUIContent& labelContent, UINT32 labelWidth, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), labelContent, labelWidth, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(), true);
-		}
-
-		static T* create(const GUIContent& labelContent, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), labelContent, DEFAULT_LABEL_WIDTH, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(), true);
-		}
-
-		static T* create(const HString& labelText, UINT32 labelWidth, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), labelWidth, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(), true);
-		}
-
-		static T* create(const HString& labelText, 
-			const String& labelStyle = StringUtil::BLANK, const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(labelText), DEFAULT_LABEL_WIDTH, labelStyle, entryElementStyle, 
-				GUILayoutOptions::create(), true);
-		}
-
-		static T* create(const String& entryElementStyle = StringUtil::BLANK)
-		{
-			return bs_new<T>(PrivatelyConstruct(), GUIContent(), 0, nullptr, entryElementStyle, 
-				GUILayoutOptions::create(), false);
-		}
-
-		TGUIField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-			:GUIFieldBase(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel)
-		{ }
-	};
-}

+ 0 - 36
BansheeEditor/Include/BsGUIFloatField.h

@@ -1,36 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIFloatField : public TGUIField<GUIFloatField>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		float getValue() const;
-		void setValue(float value);
-
-	protected:
-		virtual ~GUIFloatField();
-
-		void updateClippedBounds();
-
-	protected:
-		static const float DRAG_SPEED;
-
-		GUIInputBox* mInputBox;
-		INT32 mLastDragPos;
-		bool mIsDragging;
-
-		bool _hasCustomCursor(const Vector2I position, CursorType& type) const;
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-		static bool floatFilter(const WString& str);
-	};
-}

+ 0 - 45
BansheeEditor/Include/BsGUIFoldout.h

@@ -1,45 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIFoldout : public GUIElementContainer
-	{
-		struct PrivatelyConstruct {};
-
-	public:
-		static const String& getGUITypeName();
-
-		static GUIFoldout* create(const GUIOptions& layoutOptions, 
-			const String& toggleStyle = StringUtil::BLANK, const String& backgroundStyle = StringUtil::BLANK);
-
-		static GUIFoldout* create(const String& toggleStyle = StringUtil::BLANK,
-			const String& backgroundStyle = StringUtil::BLANK);
-
-		GUIFoldout(const PrivatelyConstruct& dummy, const String& toggleStyle, 
-			const String& backgroundStyle, const GUILayoutOptions& layoutOptions);
-
-		bool isExpanded() const { return mIsExpanded; }
-		void setExpanded(bool expanded);
-
-		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-
-		Vector2I _getOptimalSize() const;
-
-		Event<void(bool)> onStateChanged;
-	protected:
-		virtual ~GUIFoldout();
-
-	protected:
-		static const String FOLDOUT_BUTTON_STYLE;
-		static const String FOLDOUT_BG_STYLE;
-
-		GUIToggle* mToggle;
-		GUITexture* mBackground;
-
-		bool mIsExpanded;
-	};
-}

+ 0 - 81
BansheeEditor/Include/BsGUIGameObjectField.h

@@ -1,81 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIGameObjectField : public GUIElementContainer
-	{
-		struct PrivatelyConstruct {};
-
-	public:
-		static const String& getGUITypeName();
-
-		static GUIGameObjectField* create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const GUIContent& labelContent, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const HString& labelText, const GUIOptions& layoutOptions, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const GUIOptions& layoutOptions, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const GUIContent& labelContent, UINT32 labelWidth, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const GUIContent& labelContent, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const HString& labelText, UINT32 labelWidth, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const HString& labelText, 
-			const String& labelStyle = StringUtil::BLANK, const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		static GUIGameObjectField* create(const String& dropButtonStyle = StringUtil::BLANK,
-			const String& clearButtonStyle = StringUtil::BLANK);
-
-		GUIGameObjectField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-			UINT32 labelWidth, const String& labelStyle, const String& dropButtonStyle,
-			const String& clearButtonStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		HGameObject getValue() const;
-		void setValue(const HGameObject& value);
-
-		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-
-		Vector2I _getOptimalSize() const;
-	private:
-		virtual ~GUIGameObjectField();
-
-		void dataDropped(void* data);
-
-	private:
-		static const UINT32 DEFAULT_LABEL_WIDTH;
-		static const String DROP_BUTTON_STYLE;
-		static const String CLEAR_BUTTON_STYLE;
-
-		GUILayout* mLayout;
-		GUILabel* mLabel;
-		GUIDropButton* mDropButton;
-		GUIButton* mClearButton;
-
-		UINT64 mInstanceId;
-	};
-}

+ 0 - 44
BansheeEditor/Include/BsGUIIntField.h

@@ -1,44 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIIntField : public TGUIField<GUIIntField>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		INT32 getValue() const { return mValue; }
-		void setValue(INT32 value);
-
-		Event<void(INT32)> onValueChanged;
-
-	protected:
-		virtual ~GUIIntField();
-
-		void updateClippedBounds();
-
-	protected:
-		static const INT32 DRAG_SPEED;
-
-		GUIInputBox* mInputBox;
-		INT32 mValue;
-		INT32 mLastDragPos;
-		bool mIsDragging;
-		bool mIsDragCursorSet;
-
-		bool _hasCustomCursor(const Vector2I position, CursorType& type) const;
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-		void valueChanged(const WString& newValue);
-		void focusGained();
-		void focusLost();
-
-		static bool intFilter(const WString& str);
-	};
-}

+ 0 - 70
BansheeEditor/Include/BsGUIMenuBar.h

@@ -1,70 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-
-namespace BansheeEngine
-{
-	class GUIMenuBar
-	{
-		struct GUIMenuBarData
-		{
-			WString name;
-			GUIMenu* menu;
-			GUIButton* button;
-		};
-
-	public:
-		GUIMenuBar(GUIWidget* parent, RenderWindow* parentWindow);
-		virtual ~GUIMenuBar();
-
-		void setArea(INT32 x, INT32 y, UINT32 width, UINT32 height);
-
-		const GUIMenuItem* addMenuItem(const WString& path, std::function<void()> callback);
-		const GUIMenuItem* addSeparator(const WString& path);
-		const GUIMenuItem* getMenuItem(const WString& path) const;
-		void removeMenuItem(const WString& path);
-	private:
-		static const UINT32 NUM_ELEMENTS_AFTER_CONTENT;
-
-		RenderWindow* mParentWindow;
-		GUIWidget* mParentWidget;
-		GUIArea* mMainArea;
-		GUIArea* mBackgroundArea;
-		GUITexture* mBgTexture;
-		GUITexture* mLogoTexture;
-
-		GUIButton* mMinBtn;
-		GUIButton* mMaxBtn;
-		GUIButton* mCloseBtn;
-
-		Vector<GUIMenuBarData> mChildMenus;
-
-		GUIButton* mSubMenuButton;
-		bool mSubMenuOpen;
-
-		const GUIMenuBarData* getSubMenu(const WString& name) const;
-
-		GUIMenuBarData* addNewButton(const WString& name);
-
-		/**
-		 * @brief	Attempts to remove the first element from the specified path. First element
-		 * 			returned in specified in "pathRoot", and original "path" parameter is modified so
-		 * 			it no longer includes the first element.
-		 *
-		 * @return	False if first element doesn't exist, true otherwise.
-		 */
-		bool stripPath(WString& path, WString& pathRoot) const;
-
-		void openSubMenu(const WString& name);
-		void closeSubMenu();
-
-		void onSubMenuHover(const WString& name);
-		void onSubMenuClosed();
-
-		void onMinimizeClicked();
-		void onMaximizeClicked();
-		void onCloseClicked();
-
-		void refreshNonClientAreas();
-	};
-}

+ 0 - 102
BansheeEditor/Include/BsGUIResourceTreeView.h

@@ -1,102 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUITreeView.h"
-#include "BsProjectLibrary.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUIResourceTreeView : public GUITreeView
-	{
-		struct ResourceTreeElement : public GUITreeView::TreeElement
-		{
-			Path mFullPath;
-			WString mElementName;
-		};
-
-		struct DraggedResources
-		{
-			Vector<String> resourceUUIDs;
-		};
-
-		struct InternalDraggedResources
-		{
-			InternalDraggedResources(UINT32 numObjects);
-			~InternalDraggedResources();
-
-			UINT32 numObjects;
-			Path* resourcePaths;
-		};
-
-	public:
-		static const String& getGUITypeName();
-
-		static GUIResourceTreeView* create(
-			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
-			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
-			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
-			const String& dragSepHighlightStyle = StringUtil::BLANK);
-
-		static GUIResourceTreeView* create(const GUIOptions& options, 
-			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
-			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
-			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
-			const String& dragSepHighlightStyle = StringUtil::BLANK);
-
-
-	protected:
-		virtual ~GUIResourceTreeView();
-
-	protected:
-		InternalDraggedResources* mDraggedResources;
-		ResourceTreeElement mRootElement;
-		RenderWindow* mCurrentWindow;
-		OSDropTarget* mDropTarget;
-		bool mDropTargetDragActive;
-
-		HEvent mDropTargetEnterConn;
-		HEvent mDropTargetMoveConn;
-		HEvent mDropTargetLeaveConn;
-		HEvent mDropTargetDroppedConn;
-
-		GUIResourceTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions);
-
-		virtual void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-
-		virtual TreeElement& getRootElement() { return mRootElement; }
-		virtual const TreeElement& getRootElementConst() const { return mRootElement; }
-		virtual void updateTreeElementHierarchy();
-		virtual void renameTreeElement(TreeElement* element, const WString& name);
-		virtual void deleteTreeElement(TreeElement* element);
-		virtual bool acceptDragAndDrop() const;
-		virtual void dragAndDropStart();
-		virtual void dragAndDropEnded(TreeElement* overTreeElement);
-		virtual void dragAndDropFinalize();
-		virtual bool _acceptDragAndDrop(const Vector2I position, UINT32 typeId) const;
-
-		void updateFromProjectLibraryEntry(ResourceTreeElement* treeElement, const ProjectLibrary::LibraryEntry* libraryEntry);
-		ResourceTreeElement* addTreeElement(ResourceTreeElement* parent, const Path& fullPath);
-		void deleteTreeElement(ResourceTreeElement* element);
-		void sortTreeElement(ResourceTreeElement* element);
-
-		ResourceTreeElement* findTreeElement(const Path& fullPath);
-
-		void entryAdded(const Path& path);
-		void entryRemoved(const Path& path);
-
-		void setDropTarget(RenderWindow* parentWindow, INT32 x, INT32 y, UINT32 width, UINT32 height);
-		void clearDropTarget();
-
-		void dropTargetDragMove(INT32 x, INT32 y);
-		void dropTargetDragLeave();
-		void dropTargetDragDropped(INT32 x, INT32 y);
-
-		Path findUniquePath(const Path& path);
-
-		void _changeParentWidget(GUIWidget* widget);
-	};
-}

+ 0 - 71
BansheeEditor/Include/BsGUISceneTreeView.h

@@ -1,71 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUITreeView.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	struct DraggedSceneObjects
-	{
-		DraggedSceneObjects(UINT32 numObjects);
-		~DraggedSceneObjects();
-
-		UINT32 numObjects;
-		HSceneObject* objects;
-	};
-
-	class GUISceneTreeView : public GUITreeView
-	{
-		struct SceneTreeElement : public GUITreeView::TreeElement
-		{
-			SceneTreeElement()
-				:mId(0)
-			{ }
-
-			HSceneObject mSceneObject;
-			UINT64 mId;
-		};
-
-	public:
-		static const String& getGUITypeName();
-
-		static GUISceneTreeView* create(
-			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
-			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
-			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
-			const String& dragSepHighlightStyle = StringUtil::BLANK);
-
-		static GUISceneTreeView* create(const GUIOptions& options, 
-			const String& backgroundStyle = StringUtil::BLANK, const String& elementBtnStyle = StringUtil::BLANK, 
-			const String& foldoutBtnStyle = StringUtil::BLANK, const String& selectionBackgroundStyle = StringUtil::BLANK,
-			const String& editBoxStyle = StringUtil::BLANK, const String& dragHighlightStyle = StringUtil::BLANK, 
-			const String& dragSepHighlightStyle = StringUtil::BLANK);
-
-
-	protected:
-		virtual ~GUISceneTreeView();
-
-	protected:
-		SceneTreeElement mRootElement;
-
-		GUISceneTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions);
-
-		void updateTreeElement(SceneTreeElement* element);
-
-		virtual TreeElement& getRootElement() { return mRootElement; }
-		virtual const TreeElement& getRootElementConst() const { return mRootElement; }
-		virtual void updateTreeElementHierarchy();
-		virtual void renameTreeElement(TreeElement* element, const WString& name);
-		virtual void deleteTreeElement(TreeElement* element);
-		virtual bool acceptDragAndDrop() const;
-		virtual void dragAndDropStart();
-		virtual void dragAndDropEnded(TreeElement* overTreeElement);
-		virtual void dragAndDropFinalize();
-		virtual bool _acceptDragAndDrop(const Vector2I position, UINT32 typeId) const;
-
-		void deleteTreeElementInternal(TreeElement* element);
-	};
-}

+ 0 - 44
BansheeEditor/Include/BsGUITabButton.h

@@ -1,44 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIToggle.h"
-#include "BsGUIToggleGroup.h"
-#include "BsImageSprite.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUITabButton : public GUIToggle
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
-			const String& styleName = StringUtil::BLANK);
-		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const HString& text, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-	
-		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
-			const String& styleName = StringUtil::BLANK);
-		static GUITabButton* create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, 
-			const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		UINT32 getIndex() const { return mIndex; }
-		void _setDraggedState(bool active);
-
-		Event<void(UINT32, const Vector2I&)> onDragged;
-		Event<void(UINT32, const Vector2I&)> onDragEnd;
-	protected:
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-	private:
-		UINT32 mIndex;
-		Vector2I mDragStartPosition;
-		bool mDraggedState;
-		GUIButtonState mInactiveState;
-
-		static const UINT32 DRAG_MIN_DISTANCE;
-
-		GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, UINT32 index, const GUIContent& content, const GUILayoutOptions& layoutOptions);
-	};
-}

+ 0 - 86
BansheeEditor/Include/BsGUITabbedTitleBar.h

@@ -1,86 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-#include "BsRectI.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUITabbedTitleBar : public GUIElementContainer
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUITabbedTitleBar* create(RenderWindow* parentWindow,
-			const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
-			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
-
-		static GUITabbedTitleBar* create(RenderWindow* parentWindow, const GUILayoutOptions& layoutOptions, 
-			const String& backgroundStyle = StringUtil::BLANK, const String& tabBtnStyle = StringUtil::BLANK, 
-			const String& minBtnStyle = StringUtil::BLANK, const String& closeBtnStyle = StringUtil::BLANK);
-
-		void addTab(const HString& name);
-		UINT32 insertTab(UINT32 position, const HString& name);
-		void removeTab(UINT32 uniqueIdx);
-		void setActive(UINT32 uniqueIdx);
-		UINT32 getTabIdx(UINT32 position) const;
-		UINT32 getNumTabs() const { return (UINT32)mTabButtons.size(); }
-
-		Vector<RectI> calcDraggableAreas(INT32 x, INT32 y, UINT32 width, UINT32 height) const;
-
-		Event<void(UINT32)> onTabActivated;
-		Event<void(UINT32)> onTabClosed;
-		Event<void(UINT32)> onTabDraggedOff;
-		Event<void(UINT32)> onTabDraggedOn;
-
-	protected:
-		virtual ~GUITabbedTitleBar();
-
-		void updateClippedBounds();
-
-		void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-	protected:
-		static const UINT32 TAB_SPACING;
-		static const UINT32 OPTION_BTN_SPACING;
-
-		Vector<GUITabButton*> mTabButtons;
-
-		UINT32 mUniqueTabIdx;
-		UINT32 mActiveTabIdx;
-		GUITexture* mBackgroundImage;
-		GUIButton* mMinBtn;
-		GUIButton* mCloseBtn;
-		GUIToggleGroupPtr mTabToggleGroup;
-		RenderWindow* mParentWindow;
-
-		EditorWidgetBase* mTempDraggedWidget;
-		UINT32 mTempDraggedTabIdx;
-
-		bool mDragInProgress;
-		GUITabButton* mDraggedBtn;
-		INT32 mDragBtnOffset;
-		INT32 mInitialDragOffset;
-
-		String mBackgroundStyle;
-		String mCloseBtnStyle;
-		String mMinimizeBtnStyle;
-		String mTabBtnStyle;
-
-		GUITabbedTitleBar(RenderWindow* parentWindow, const String& backgroundStyle, const String& tabBtnStyle, 
-			const String& minBtnStyle, const String& closeBtnStyle, const GUILayoutOptions& layoutOptions);
-
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-
-		void startDrag(UINT32 seqIdx, const Vector2I& startDragPos);
-		void endDrag();
-
-		void tabToggled(UINT32 tabIdx, bool toggledOn);
-		void tabClosed();
-		void tabDragged(UINT32 tabIdx, const Vector2I& dragPos);
-		void tabDragEnd(UINT32 tabIdx, const Vector2I& dragPos);
-
-		INT32 uniqueIdxToSeqIdx(UINT32 uniqueIdx) const;
-	};
-}

+ 0 - 24
BansheeEditor/Include/BsGUITextField.h

@@ -1,24 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUITextField : public TGUIField<GUITextField>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUITextField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		WString getValue() const;
-		void setValue(const WString& value);
-	protected:
-		virtual ~GUITextField();
-
-	protected:
-		GUIInputBox* mInputBox;
-	};
-}

+ 0 - 25
BansheeEditor/Include/BsGUIToggleField.h

@@ -1,25 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIToggleField : public TGUIField<GUIToggleField>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIToggleField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& toggleStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		bool getValue() const;
-		void setValue(bool value);
-
-	protected:
-		virtual ~GUIToggleField() { }
-
-	protected:
-		GUIToggle* mToggle;
-	};
-}

+ 0 - 170
BansheeEditor/Include/BsGUITreeView.h

@@ -1,170 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIElementContainer.h"
-#include "BsVirtualInput.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUITreeView : public GUIElementContainer
-	{
-	protected:
-		enum class ScrollState
-		{
-			None,
-			Up,
-			Down,
-			TransitioningUp,
-			TransitioningDown
-		};
-
-		struct TreeElement
-		{
-			TreeElement();
-			virtual ~TreeElement();
-
-			TreeElement* mParent;
-			Vector<TreeElement*> mChildren;
-
-			GUIToggle* mFoldoutBtn;
-			GUILabel* mElement;
-
-			String mName;
-
-			UINT32 mSortedIdx;
-			bool mIsExpanded;
-			bool mIsSelected;
-			bool mIsVisible;
-
-			bool isParentRec(TreeElement* element) const;
-		};
-
-		struct InteractableElement
-		{
-			InteractableElement(TreeElement* parent, UINT32 index, const RectI& bounds)
-				:parent(parent), index(index), bounds(bounds)
-			{ }
-
-			bool isTreeElement() const { return index % 2 == 1; }
-			TreeElement* getTreeElement() const;
-
-			TreeElement* parent;
-			UINT32 index;
-			RectI bounds;
-		};
-
-		struct SelectedElement
-		{
-			SelectedElement(TreeElement* elem, GUITexture* back)
-				:element(elem), background(back)
-			{ }
-
-			TreeElement* element;
-			GUITexture* background;
-		};
-
-	public:
-		static const String& getGUITypeName();
-
-		void update();
-
-	protected:
-		virtual ~GUITreeView();
-
-		Vector2I _getOptimalSize() const;
-		void updateClippedBounds();
-
-		virtual void _updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-			RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth);
-	protected:
-		static const UINT32 ELEMENT_EXTRA_SPACING;
-		static const UINT32 INDENT_SIZE;
-		static const UINT32 INITIAL_INDENT_OFFSET;
-		static const UINT32 DRAG_MIN_DISTANCE;
-		static const float AUTO_EXPAND_DELAY_SEC;
-		static const float SCROLL_AREA_HEIGHT_PCT;
-		static const UINT32 SCROLL_SPEED_PX_PER_SEC;
-
-		String mBackgroundStyle;
-		String mElementBtnStyle;
-		String mFoldoutBtnStyle;
-		String mSelectionBackgroundStyle;
-		String mEditBoxStyle;
-		String mDragHighlightStyle;
-		String mDragSepHighlightStyle;
-
-		GUITexture* mBackgroundImage;
-
-		Vector<InteractableElement> mVisibleElements;
-
-		bool mIsElementSelected;
-		Vector<SelectedElement> mSelectedElements;
-
-		TreeElement* mEditElement;
-		GUITreeViewEditBox* mNameEditBox;
-
-		Vector2I mDragStartPosition;
-		Vector2I mDragPosition;
-		bool mDragInProgress;
-		GUITexture* mDragHighlight;
-		GUITexture* mDragSepHighlight;
-
-		RectI mTopScrollBounds;
-		RectI mBottomScrollBounds;
-		ScrollState mScrollState;
-		float mLastScrollTime;
-
-		Stack<TreeElement*> mAutoExpandedElements;
-		TreeElement* mMouseOverDragElement;
-		float mMouseOverDragElementTime;
-
-		static VirtualButton mRenameVB;
-		static VirtualButton mDeleteVB;
-
-		GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-			const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-			const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions);
-
-		const GUITreeView::InteractableElement* findElementUnderCoord(const Vector2I& coord) const;
-		TreeElement* getTopMostSelectedElement() const;
-		TreeElement* getBottomMostSelectedElement() const;
-
-		void enableEdit(TreeElement* element);
-		void disableEdit(bool acceptChanges);
-
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-		virtual bool commandEvent(const GUICommandEvent& ev);
-		virtual bool virtualButtonEvent(const GUIVirtualButtonEvent& ev);
-		void elementToggled(TreeElement* element, bool toggled);
-
-		virtual TreeElement& getRootElement() = 0;
-		virtual const TreeElement& getRootElementConst() const = 0;
-		virtual void updateTreeElementHierarchy() = 0;
-		virtual void renameTreeElement(TreeElement* element, const WString& name) = 0;
-		virtual void deleteTreeElement(TreeElement* element) = 0;
-		virtual bool acceptDragAndDrop() const = 0;
-		virtual void dragAndDropStart() = 0;
-		virtual void dragAndDropEnded(TreeElement* overTreeElement) = 0;
-		virtual void dragAndDropFinalize() = 0;
-
-		bool isSelectionActive() const;
-		void selectElement(TreeElement* element);
-		void unselectElement(TreeElement* element);
-		void unselectAll();
-
-		void expandElement(TreeElement* element);
-		void collapseElement(TreeElement* element);
-
-		void updateElementGUI(TreeElement* element);
-
-		void closeTemporarilyExpandedElements();
-		void temporarilyExpandElement(const GUITreeView::InteractableElement* mouseOverElement);
-		void scrollToElement(TreeElement* element, bool center);
-
-		GUIScrollArea* findParentScrollArea() const;
-
-		void onEditAccepted();
-		void onEditCanceled();
-	};
-}

+ 0 - 24
BansheeEditor/Include/BsGUITreeViewEditBox.h

@@ -1,24 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIInputBox.h"
-
-namespace BansheeEngine
-{
-	class GUITreeViewEditBox : public GUIInputBox
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUITreeViewEditBox* create(const String& styleName = StringUtil::BLANK);
-		static GUITreeViewEditBox* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		Event<void()> onInputConfirmed;
-		Event<void()> onInputCanceled;
-
-	private:
-		GUITreeViewEditBox(const String& styleName, const GUILayoutOptions& layoutOptions);
-
-		virtual bool commandEvent(const GUICommandEvent& ev);
-	};
-}

+ 0 - 29
BansheeEditor/Include/BsGUIVector2Field.h

@@ -1,29 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-#include "BsVector2.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIVector2Field : public TGUIField<GUIVector2Field>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		Vector2 getValue() const;
-		void setValue(const Vector2& value);
-
-	protected:
-		virtual ~GUIVector2Field() { }
-
-	protected:
-		static const UINT32 ELEMENT_LABEL_WIDTH;
-
-		GUIFloatField* mFieldX;
-		GUIFloatField* mFieldY;
-	};
-}

+ 0 - 30
BansheeEditor/Include/BsGUIVector3Field.h

@@ -1,30 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-#include "BsVector3.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIVector3Field : public TGUIField<GUIVector3Field>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		Vector3 getValue() const;
-		void setValue(const Vector3& value);
-
-	protected:
-		virtual ~GUIVector3Field() { }
-
-	protected:
-		static const UINT32 ELEMENT_LABEL_WIDTH;
-
-		GUIFloatField* mFieldX;
-		GUIFloatField* mFieldY;
-		GUIFloatField* mFieldZ;
-	};
-}

+ 0 - 31
BansheeEditor/Include/BsGUIVector4Field.h

@@ -1,31 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIFieldBase.h"
-#include "BsVector4.h"
-
-namespace BansheeEngine
-{
-	class BS_ED_EXPORT GUIVector4Field : public TGUIField<GUIVector4Field>
-	{
-	public:
-		static const String& getGUITypeName();
-
-		GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-			const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel);
-
-		Vector4 getValue() const;
-		void setValue(const Vector4& value);
-
-	protected:
-		virtual ~GUIVector4Field() { }
-
-	protected:
-		static const UINT32 ELEMENT_LABEL_WIDTH;
-
-		GUIFloatField* mFieldX;
-		GUIFloatField* mFieldY;
-		GUIFloatField* mFieldZ;
-		GUIFloatField* mFieldW;
-	};
-}

+ 0 - 26
BansheeEditor/Include/BsGUIWindowDropArea.h

@@ -1,26 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUITexture.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class GUIWindowDropArea : public GUITexture
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUIWindowDropArea* create(const String& styleName = StringUtil::BLANK);
-		static GUIWindowDropArea* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		void setFocused(bool focused);
-
-		Event<void()> onDraggedItemDropped;
-	protected:
-		~GUIWindowDropArea();
-		GUIWindowDropArea(const String& styleName, const GUILayoutOptions& layoutOptions);
-
-		virtual bool mouseEvent(const GUIMouseEvent& ev);
-	};
-}

+ 0 - 22
BansheeEditor/Include/BsGUIWindowFrame.h

@@ -1,22 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUITexture.h"
-#include "BsImageSprite.h"
-
-namespace BansheeEngine
-{
-	class GUIWindowFrame : public GUITexture
-	{
-	public:
-		static const String& getGUITypeName();
-
-		static GUIWindowFrame* create(const String& styleName = StringUtil::BLANK);
-		static GUIWindowFrame* create(const GUIOptions& layoutOptions, const String& styleName = StringUtil::BLANK);
-
-		void setFocused(bool focused);
-	protected:
-		~GUIWindowFrame();
-		GUIWindowFrame(const String& styleName, const GUILayoutOptions& layoutOptions);
-	};
-}

+ 0 - 30
BansheeEditor/Include/BsGUIWindowFrameWidget.h

@@ -1,30 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsGUIWidget.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	class WindowFrameWidget : public GUIWidget
-	{
-	public:
-		WindowFrameWidget(const HSceneObject& parent, Viewport* target, RenderWindow* ownerWindow, const GUISkin& skin);
-		virtual ~WindowFrameWidget();
-
-	protected:
-		static const UINT32 RESIZE_BORDER_WIDTH;
-
-		GUIArea* mWindowFrameArea;
-		RenderWindow* mParentWindow;
-		GUIWindowFrame* mWindowFrame;
-
-		virtual void update();
-
-		virtual bool _mouseEvent(GUIElement* element, const GUIMouseEvent& ev);
-		virtual void ownerWindowFocusChanged();
-		virtual void ownerTargetResized();
-
-		void refreshNonClientAreas() const;
-	};
-}

+ 0 - 31
BansheeEditor/Include/BsMainEditorWindow.h

@@ -1,31 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWindowBase.h"
-
-namespace BansheeEngine
-{
-	class MainEditorWindow : public EditorWindowBase
-	{
-	public:
-		~MainEditorWindow();
-
-		void update();
-
-		DockManager& getDockManager() const { return *mDockManager; }
-
-		static MainEditorWindow* create(const RenderWindowPtr& renderWindow);
-	protected:
-		friend class EditorWindowManager;
-		MainEditorWindow(const RenderWindowPtr& renderWindow);
-
-	protected:
-		GUIMenuBar* mMenuBar;
-		DockManager* mDockManager;
-		HProfilerOverlay mProfilerOverlay;
-
-		virtual void resized();
-
-		void updateAreas();
-	};
-}

+ 0 - 97
BansheeEditor/Include/BsProjectLibrary.h

@@ -1,97 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsModule.h"
-#include "BsPath.h"
-
-namespace BansheeEngine
-{
-	class ProjectLibrary : public Module<ProjectLibrary>
-	{
-	public:
-		struct LibraryEntry;
-		struct ResourceEntry;
-		struct DirectoryEntry;
-
-		enum class LibraryEntryType
-		{
-			File,
-			Directory
-		};
-
-		struct LibraryEntry
-		{
-			LibraryEntry();
-			LibraryEntry(const Path& path, const WString& name, DirectoryEntry* parent, LibraryEntryType type);
-
-			LibraryEntryType type;
-			Path path;
-			WString elementName;
-
-			DirectoryEntry* parent;
-		};
-
-		struct ResourceEntry : public LibraryEntry
-		{
-			ResourceEntry();
-			ResourceEntry(const Path& path, const WString& name, DirectoryEntry* parent);
-
-			ResourceMetaPtr meta;
-			std::time_t lastUpdateTime;
-		};
-
-		struct DirectoryEntry : public LibraryEntry
-		{
-			DirectoryEntry();
-			DirectoryEntry(const Path& path, const WString& name, DirectoryEntry* parent);
-
-			Vector<LibraryEntry*> mChildren;
-		};
-
-	public:
-		ProjectLibrary(const Path& projectFolder);
-		~ProjectLibrary();
-
-		void update();
-		void checkForModifications(const Path& fullPath);
-
-		const LibraryEntry* getRootEntry() const { return mRootEntry; }
-		LibraryEntry* findEntry(const Path& fullPath) const;
-
-		void moveEntry(const Path& oldPath, const Path& newPath);
-		void deleteEntry(const Path& path);
-
-		Event<void(const Path&)> onEntryRemoved;
-		Event<void(const Path&)> onEntryAdded;
-	private:
-		static const Path RESOURCES_DIR;
-		static const Path INTERNAL_RESOURCES_DIR;
-		static const WString LIBRARY_ENTRIES_FILENAME;
-		static const WString RESOURCE_MANIFEST_FILENAME;
-
-		ResourceManifestPtr mResourceManifest;
-		DirectoryEntry* mRootEntry;
-		FolderMonitor* mMonitor;
-		Path mProjectFolder;
-		Path mResourcesFolder;
-
-		void save();
-		void load();
-
-		ResourceEntry* addResourceInternal(DirectoryEntry* parent, const Path& filePath);
-		DirectoryEntry* addDirectoryInternal(DirectoryEntry* parent, const Path& dirPath);
-
-		void deleteResourceInternal(ResourceEntry* resource);
-		void deleteDirectoryInternal(DirectoryEntry* directory);
-
-		void reimportResourceInternal(ResourceEntry* resource);
-
-		void createInternalParentHierarchy(const Path& fullPath, DirectoryEntry** newHierarchyRoot, DirectoryEntry** newHierarchyLeaf);
-
-		bool isUpToDate(ResourceEntry* resource) const;
-		Path getMetaPath(const Path& path) const;
-		bool isMeta(const Path& fullPath) const;
-
-		void onMonitorFileModified(const Path& path);
-	};
-}

+ 0 - 34
BansheeEditor/Include/BsProjectLibraryEntries.h

@@ -1,34 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsProjectLibrary.h"
-#include "BsIReflectable.h"
-
-namespace BansheeEngine
-{
-	class ProjectLibraryEntries : public IReflectable
-	{
-		struct ConstructPrivately { };
-
-	public:
-		explicit ProjectLibraryEntries(const ConstructPrivately& dummy);
-		ProjectLibraryEntries(const ProjectLibrary::DirectoryEntry& rootEntry);
-
-		static std::shared_ptr<ProjectLibraryEntries> create(const ProjectLibrary::DirectoryEntry& rootEntry);
-		
-		const ProjectLibrary::DirectoryEntry& getRootEntry() const { return mRootEntry; }
-
-	private:
-		ProjectLibrary::DirectoryEntry mRootEntry;
-
-		/************************************************************************/
-		/* 								SERIALIZATION                      		*/
-		/************************************************************************/
-		static std::shared_ptr<ProjectLibraryEntries> createEmpty();
-
-	public:
-		friend class ProjectLibraryEntriesRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;
-	};
-}

+ 0 - 198
BansheeEditor/Include/BsProjectLibraryEntriesRTTI.h

@@ -1,198 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsRTTIType.h"
-#include "BsProjectLibraryEntries.h"
-
-namespace BansheeEngine
-{
-	class ProjectLibraryEntriesRTTI : public RTTIType<ProjectLibraryEntries, IReflectable, ProjectLibraryEntriesRTTI>
-	{
-	private:
-		ProjectLibrary::DirectoryEntry& getRootElement(ProjectLibraryEntries* obj) { return obj->mRootEntry; }
-		void setRootElement(ProjectLibraryEntries* obj, ProjectLibrary::DirectoryEntry& val) { obj->mRootEntry = val; } 
-
-	public:
-		ProjectLibraryEntriesRTTI()
-		{
-			addPlainField("mRootElement", 0, &ProjectLibraryEntriesRTTI::getRootElement, &ProjectLibraryEntriesRTTI::setRootElement);
-		}
-
-		virtual const String& getRTTIName()
-		{
-			static String name = "ProjectLibraryEntries";
-			return name;
-		}
-
-		virtual UINT32 getRTTIId()
-		{
-			return TID_ProjectLibraryEntries;
-		}
-
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
-		{
-			return ProjectLibraryEntries::createEmpty();
-		}
-	};
-}
-
-namespace BansheeEngine
-{
-	template<> struct RTTIPlainType<BansheeEngine::ProjectLibrary::ResourceEntry>
-	{	
-		enum { id = BansheeEngine::TID_ProjectLibraryResEntry }; enum { hasDynamicSize = 1 };
-
-		static void toMemory(const BansheeEngine::ProjectLibrary::ResourceEntry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			char* memoryStart = memory;
-			memory += sizeof(UINT32);
-			size += sizeof(UINT32);
-
-			UINT32 type = (UINT32)data.type;
-			memory = rttiWriteElem(type, memory, size);
-			memory = rttiWriteElem(data.path, memory, size);
-			memory = rttiWriteElem(data.elementName, memory, size);
-			memory = rttiWriteElem(data.lastUpdateTime, memory, size);
-
-			memcpy(memoryStart, &size, sizeof(UINT32));
-		}
-
-		static UINT32 fromMemory(BansheeEngine::ProjectLibrary::ResourceEntry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			memcpy(&size, memory, sizeof(UINT32));
-			memory += sizeof(UINT32);
-
-			UINT32 type;
-			memory = rttiReadElem(type, memory);
-			data.type = (BansheeEngine::ProjectLibrary::LibraryEntryType)type;
-
-			memory = rttiReadElem(data.path, memory);
-			memory = rttiReadElem(data.elementName, memory);
-			memory = rttiReadElem(data.lastUpdateTime, memory);
-
-			return size;
-		}
-
-		static UINT32 getDynamicSize(const BansheeEngine::ProjectLibrary::ResourceEntry& data)	
-		{ 
-			UINT64 dataSize = sizeof(UINT32) + rttiGetElemSize(data.type) + rttiGetElemSize(data.path) + rttiGetElemSize(data.elementName) +
-				rttiGetElemSize(data.lastUpdateTime);
-
-#if BS_DEBUG_MODE
-			if(dataSize > std::numeric_limits<UINT32>::max())
-			{
-				__string_throwDataOverflowException();
-			}
-#endif
-
-			return (UINT32)dataSize;
-		}	
-	}; 
-
-	template<> struct RTTIPlainType<BansheeEngine::ProjectLibrary::DirectoryEntry>
-	{	
-		enum { id = BansheeEngine::TID_ProjectLibraryDirEntry }; enum { hasDynamicSize = 1 };
-
-		static void toMemory(const BansheeEngine::ProjectLibrary::DirectoryEntry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			char* memoryStart = memory;
-			memory += sizeof(UINT32);
-			size += sizeof(UINT32);
-
-			memory = rttiWriteElem(data.type, memory, size);
-			memory = rttiWriteElem(data.path, memory, size);
-			memory = rttiWriteElem(data.elementName, memory, size);
-
-			UINT32 numChildren = (UINT32)data.mChildren.size();
-			memory = rttiWriteElem(numChildren, memory, size);
-
-			for(auto& child : data.mChildren)
-			{
-				if(child->type == BansheeEngine::ProjectLibrary::LibraryEntryType::File)
-				{
-					BansheeEngine::ProjectLibrary::ResourceEntry* childResEntry = static_cast<BansheeEngine::ProjectLibrary::ResourceEntry*>(child);
-					memory = rttiWriteElem(*childResEntry, memory, size);
-				}
-				else if(child->type == BansheeEngine::ProjectLibrary::LibraryEntryType::Directory)
-				{
-					BansheeEngine::ProjectLibrary::DirectoryEntry* childDirEntry = static_cast<BansheeEngine::ProjectLibrary::DirectoryEntry*>(child);
-					memory = rttiWriteElem(*childDirEntry, memory, size);
-				}
-			}
-
-			memcpy(memoryStart, &size, sizeof(UINT32));
-		}
-
-		static UINT32 fromMemory(BansheeEngine::ProjectLibrary::DirectoryEntry& data, char* memory)
-		{ 
-			UINT32 size = 0;
-			memcpy(&size, memory, sizeof(UINT32));
-			memory += sizeof(UINT32);
-
-			memory = rttiReadElem(data.type, memory);
-			memory = rttiReadElem(data.path, memory);
-			memory = rttiReadElem(data.elementName, memory);
-
-			UINT32 numChildren = 0;
-			memory = rttiReadElem(numChildren, memory);
-
-			for(UINT32 i = 0; i < numChildren; i++)
-			{
-				BansheeEngine::ProjectLibrary::LibraryEntryType childType = BansheeEngine::ProjectLibrary::LibraryEntryType::File;
-				rttiReadElem(childType, memory + sizeof(UINT32)); // Skip ahead to get type
-
-				if(childType == BansheeEngine::ProjectLibrary::LibraryEntryType::File)
-				{
-					BansheeEngine::ProjectLibrary::ResourceEntry* childResEntry = bs_new<BansheeEngine::ProjectLibrary::ResourceEntry>(); // Note: Assumes that ProjectLibrary takes care of the cleanup
-					memory = rttiReadElem(*childResEntry, memory);
-
-					childResEntry->parent = &data;
-					data.mChildren.push_back(childResEntry);
-				}
-				else if(childType == BansheeEngine::ProjectLibrary::LibraryEntryType::Directory)
-				{
-					BansheeEngine::ProjectLibrary::DirectoryEntry* childDirEntry = bs_new<BansheeEngine::ProjectLibrary::DirectoryEntry>(); // Note: Assumes that ProjectLibrary takes care of the cleanup
-					memory = rttiReadElem(*childDirEntry, memory);
-
-					childDirEntry->parent = &data;
-					data.mChildren.push_back(childDirEntry);
-				}
-			}
-
-			return size;
-		}
-
-		static UINT32 getDynamicSize(const BansheeEngine::ProjectLibrary::DirectoryEntry& data)	
-		{ 
-			UINT64 dataSize = sizeof(UINT32) + rttiGetElemSize(data.type) + rttiGetElemSize(data.path) + rttiGetElemSize(data.elementName);
-
-			dataSize += sizeof(UINT32);
-
-			for(auto& child : data.mChildren)
-			{
-				if(child->type == BansheeEngine::ProjectLibrary::LibraryEntryType::File)
-				{
-					BansheeEngine::ProjectLibrary::ResourceEntry* childResEntry = static_cast<BansheeEngine::ProjectLibrary::ResourceEntry*>(child);
-					dataSize += rttiGetElemSize(*childResEntry);
-				}
-				else if(child->type == BansheeEngine::ProjectLibrary::LibraryEntryType::Directory)
-				{
-					BansheeEngine::ProjectLibrary::DirectoryEntry* childDirEntry = static_cast<BansheeEngine::ProjectLibrary::DirectoryEntry*>(child);
-					dataSize += rttiGetElemSize(*childDirEntry);
-				}
-			}
-
-#if BS_DEBUG_MODE
-			if(dataSize > std::numeric_limits<UINT32>::max())
-			{
-				__string_throwDataOverflowException();
-			}
-#endif
-
-			return (UINT32)dataSize;
-		}	
-	}; 
-}

+ 0 - 35
BansheeEditor/Include/BsResourceMeta.h

@@ -1,35 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsIReflectable.h"
-
-namespace BansheeEngine
-{
-	class ResourceMeta : public IReflectable
-	{
-	private:
-		struct ConstructPrivately {};
-
-	public:
-		explicit ResourceMeta(const ConstructPrivately&);
-
-		static ResourceMetaPtr create(const String& uuid, const ImportOptionsPtr& importOptions);
-
-		const String& getUUID() const { return mUUID; }
-		const ImportOptionsPtr& getImportOptions() const { return mImportOptions; }
-
-	private:
-		String mUUID;
-		ImportOptionsPtr mImportOptions;
-
-		/************************************************************************/
-		/* 								RTTI		                     		*/
-		/************************************************************************/
-		static ResourceMetaPtr createEmpty();
-
-	public:
-		friend class ResourceMetaRTTI;
-		static RTTITypeBase* getRTTIStatic();
-		virtual RTTITypeBase* getRTTI() const;	
-	};
-}

+ 0 - 42
BansheeEditor/Include/BsResourceMetaRTTI.h

@@ -1,42 +0,0 @@
-#pragma once
-
-#include "BsPrerequisites.h"
-#include "BsRTTIType.h"
-#include "BsResourceMeta.h"
-#include "BsImportOptions.h"
-
-namespace BansheeEngine
-{
-	class ResourceMetaRTTI : public RTTIType<ResourceMeta, IReflectable, ResourceMetaRTTI>
-	{
-	private:
-		String& getUUID(ResourceMeta* obj) { return obj->mUUID; }
-		void setUUID(ResourceMeta* obj, String& val) { obj->mUUID = val; } 
-
-		ImportOptionsPtr getImportOptions(ResourceMeta* obj) { return obj->mImportOptions; }
-		void setImportOptions(ResourceMeta* obj, ImportOptionsPtr val) { obj->mImportOptions = val; }
-
-	public:
-		ResourceMetaRTTI()
-		{
-			addPlainField("mUUID", 0, &ResourceMetaRTTI::getUUID, &ResourceMetaRTTI::setUUID);
-			addReflectablePtrField("mImportOptions", 1, &ResourceMetaRTTI::getImportOptions, &ResourceMetaRTTI::setImportOptions);
-		}
-
-		virtual const String& getRTTIName()
-		{
-			static String name = "ResourceMeta";
-			return name;
-		}
-
-		virtual UINT32 getRTTIId()
-		{
-			return TID_ResourceMeta;
-		}
-
-		virtual std::shared_ptr<IReflectable> newRTTIObject()
-		{
-			return ResourceMeta::createEmpty();
-		}
-	};
-}

+ 0 - 23
BansheeEditor/Include/BsTestTextSprite.h

@@ -1,23 +0,0 @@
-#include "BsEditorPrerequisites.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	class TestTextSprite : public GUIWidget
-	{
-	protected:
-		friend class SceneObject;
-
-		TestTextSprite(const HSceneObject& parent, Viewport* target);
-	public:
-		~TestTextSprite();
-
-		virtual void update();
-
-		void init(const HCamera& camera, const String& text, RenderTexturePtr sceneView);
-
-	private:
-		GUISceneTreeView* mSceneTreeView;
-		GUIResourceTreeView* mResourceTreeView;
-	};
-}

+ 0 - 48
BansheeEditor/Include/BsUndoRedo.h

@@ -1,48 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsModule.h"
-
-namespace BansheeEngine
-{
-	class UndoRedo : public Module<UndoRedo>
-	{
-		struct GroupData
-		{
-			String name;
-			UINT32 numEntries;
-		};
-
-	public:
-		UndoRedo();
-		~UndoRedo();
-
-		void undo();
-		void redo();
-
-		void pushGroup(const String& name);
-		void popGroup(const String& name);
-
-		void registerCommand(EditorCommand* command);
-
-	private:
-		static const UINT32 MAX_STACK_ELEMENTS;
-
-		EditorCommand** mUndoStack;
-		EditorCommand** mRedoStack;
-
-		UINT32 mUndoStackPtr;
-		UINT32 mUndoNumElements;
-
-		UINT32 mRedoStackPtr;
-		UINT32 mRedoNumElements;
-
-		Stack<GroupData> mGroups;
-
-		EditorCommand* removeLastFromUndoStack();
-		void addToUndoStack(EditorCommand* command);
-
-		void clearUndoStack();
-		void clearRedoStack();
-	};
-}

+ 0 - 22
BansheeEditor/Include/DbgEditorWidget1.h

@@ -1,22 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWidget.h"
-
-namespace BansheeEngine
-{
-	class DbgEditorWidget1 : public EditorWidget<DbgEditorWidget1>
-	{
-	public:
-		DbgEditorWidget1(const ConstructPrivately& dummy, EditorWidgetContainer& parentContainer);
-		virtual ~DbgEditorWidget1();
-
-		static DbgEditorWidget1* instance();
-		static DbgEditorWidget1* open();
-		static void close();
-		static const String& getTypeName();
-
-	private:
-		static DbgEditorWidget1* Instance;
-	};
-}

+ 0 - 22
BansheeEditor/Include/DbgEditorWidget2.h

@@ -1,22 +0,0 @@
-#pragma once
-
-#include "BsEditorPrerequisites.h"
-#include "BsEditorWidget.h"
-
-namespace BansheeEngine
-{
-	class DbgEditorWidget2 : public EditorWidget<DbgEditorWidget2>
-	{
-	public:
-		DbgEditorWidget2(const ConstructPrivately& dummy, EditorWidgetContainer& parentContainer);
-		virtual ~DbgEditorWidget2();
-
-		static DbgEditorWidget2* instance();
-		static DbgEditorWidget2* open();
-		static void close();
-		static const String& getTypeName();
-
-	private:
-		static DbgEditorWidget2* Instance;
-	};
-}

+ 0 - 40
BansheeEditor/ReadMe.txt

@@ -1,40 +0,0 @@
-========================================================================
-    CONSOLE APPLICATION : CamelotClient Project Overview
-========================================================================
-
-AppWizard has created this CamelotClient application for you.
-
-This file contains a summary of what you will find in each of the files that
-make up your CamelotClient application.
-
-
-CamelotClient.vcxproj
-    This is the main project file for VC++ projects generated using an Application Wizard.
-    It contains information about the version of Visual C++ that generated the file, and
-    information about the platforms, configurations, and project features selected with the
-    Application Wizard.
-
-CamelotClient.vcxproj.filters
-    This is the filters file for VC++ projects generated using an Application Wizard. 
-    It contains information about the association between the files in your project 
-    and the filters. This association is used in the IDE to show grouping of files with
-    similar extensions under a specific node (for e.g. ".cpp" files are associated with the
-    "Source Files" filter).
-
-CamelotClient.cpp
-    This is the main application source file.
-
-/////////////////////////////////////////////////////////////////////////////
-Other standard files:
-
-StdAfx.h, StdAfx.cpp
-    These files are used to build a precompiled header (PCH) file
-    named CamelotClient.pch and a precompiled types file named StdAfx.obj.
-
-/////////////////////////////////////////////////////////////////////////////
-Other notes:
-
-AppWizard uses "TODO:" comments to indicate parts of the source code you
-should add to or customize.
-
-/////////////////////////////////////////////////////////////////////////////

+ 0 - 49
BansheeEditor/Source/BsCmdReparentSO.cpp

@@ -1,49 +0,0 @@
-#include "BsCmdReparentSO.h"
-#include "BsSceneObject.h"
-
-namespace BansheeEngine
-{
-	CmdReparentSO::CmdReparentSO(const Vector<HSceneObject>& sceneObjects, const HSceneObject& newParent)
-		:mSceneObjects(sceneObjects), mNewParent(newParent)
-	{
-		for(auto& sceneObject : mSceneObjects)
-		{
-			mOldParents.push_back(sceneObject->getParent());
-		}
-	}
-
-	void CmdReparentSO::execute(const Vector<HSceneObject>& sceneObjects, const HSceneObject& newParent)
-	{
-		// Register command and commit it
-		CmdReparentSO* command = new (bs_alloc<CmdReparentSO>()) CmdReparentSO(sceneObjects, newParent);
-		UndoRedo::instance().registerCommand(command);
-		command->commit();
-	}
-
-	void CmdReparentSO::commit()
-	{
-		if(mNewParent.isDestroyed())
-			return;
-
-		UINT32 cnt = 0;
-		for(auto& sceneObject : mSceneObjects)
-		{
-			if(!sceneObject.isDestroyed())
-				sceneObject->setParent(mNewParent);
-
-			cnt++;
-		}
-	}
-
-	void CmdReparentSO::revert()
-	{
-		UINT32 cnt = 0;
-		for(auto& sceneObject : mSceneObjects)
-		{
-			if(!sceneObject.isDestroyed() && !mOldParents[cnt].isDestroyed())
-				sceneObject->setParent(mOldParents[cnt]);
-
-			cnt++;
-		}
-	}
-}

+ 0 - 23
BansheeEditor/Source/BsDbgTestGameObjectRef.cpp

@@ -1,23 +0,0 @@
-#include "BsDbgTestGameObjectRef.h"
-#include "BsDbgTestGameObjectRefRTTI.h"
-#include "BsSceneObject.h"
-#include "BsRenderable.h"
-
-namespace BansheeEngine
-{
-	DbgTestGameObjectRef::DbgTestGameObjectRef(const HSceneObject& parent)
-		:Component(parent)
-	{
-
-	}
-
-	RTTITypeBase* DbgTestGameObjectRef::getRTTIStatic()
-	{
-		return DbgTestGameObjectRefRTTI::instance();
-	}
-
-	RTTITypeBase* DbgTestGameObjectRef::getRTTI() const
-	{
-		return DbgTestGameObjectRef::getRTTIStatic();
-	}
-}

+ 0 - 94
BansheeEditor/Source/BsDebugCamera.cpp

@@ -1,94 +0,0 @@
-#include "BsDebugCamera.h"
-#include "BsInput.h"
-#include "BsVector3.h"
-#include "BsTime.h"
-#include "BsMath.h"
-#include "BsSceneObject.h"
-#include "BsCamera.h"
-#include "BsPlatform.h"
-
-namespace BansheeEngine
-{
-	const float DebugCamera::START_SPEED = 40.0f;
-	const float DebugCamera::TOP_SPEED = 130.0f;
-	const float DebugCamera::ACCELERATION = 10.0f;
-	const float DebugCamera::FAST_MODE_MULTIPLIER = 2.0f;
-	const float DebugCamera::ROTATION_SPEED = 0.5f; // Degrees/pixel
-
-	DebugCamera::DebugCamera(const HSceneObject& parent)
-		:Component(parent), mPitch(0.0f), mYaw(0.0f), mLastButtonState(false)
-	{
-		setName("DebugCamera");
-
-		mCamera = sceneObject()->getComponent<Camera>();
-		mCamera->setNearClipDistance(5);
-
-		sceneObject()->setPosition(Vector3(0,0,0));
-		sceneObject()->lookAt(Vector3(0,0,-1));
-	}
-
-	void DebugCamera::update()
-	{
-		bool goingForward = gInput().isButtonHeld(BC_W) || gInput().isButtonHeld(BC_UP);
-		bool goingBack = gInput().isButtonHeld(BC_S) || gInput().isButtonHeld(BC_DOWN);
-		bool goingLeft = gInput().isButtonHeld(BC_A) || gInput().isButtonHeld(BC_LEFT);
-		bool goingRight = gInput().isButtonHeld(BC_D) || gInput().isButtonHeld(BC_RIGHT);
-		bool fastMove = gInput().isButtonHeld(BC_LSHIFT);
-		bool camRotating = gInput().isButtonHeld(BC_MOUSE_RIGHT);
-
-		if(camRotating != mLastButtonState)
-		{
-			if(camRotating)
-				Platform::hideCursor();
-			else
-				Platform::showCursor();
-
-			mLastButtonState = camRotating;
-		}
-
-		Vector3 direction = Vector3::ZERO;
-		if (goingForward) direction += SO()->getForward();
-		if (goingBack) direction -= SO()->getForward();
-		if (goingRight) direction += SO()->getRight();
-		if (goingLeft) direction -= SO()->getRight();
-
-		if (direction.squaredLength() != 0)
-		{
-			direction.normalize();
-
-			float multiplier = 1.0f;
-			if(fastMove)
-				multiplier = FAST_MODE_MULTIPLIER;
-
-			mCurrentSpeed = Math::clamp(mCurrentSpeed + ACCELERATION * gTime().getFrameDelta(), START_SPEED, TOP_SPEED);
-			mCurrentSpeed *= multiplier;
-		}
-		else
-		{
-			mCurrentSpeed = 0.0f;
-		}
-
-		float tooSmall = std::numeric_limits<float>::epsilon();
-		if(mCurrentSpeed > tooSmall)
-		{
-			Vector3 velocity = direction * mCurrentSpeed;
-			SO()->move(velocity * gTime().getFrameDelta());
-		}
-
-		if(camRotating)
-		{
-			mYaw += Degree(gInput().getAxisValue((UINT32)InputAxis::MouseX) * ROTATION_SPEED);
-			mPitch += Degree(gInput().getAxisValue((UINT32)InputAxis::MouseY) * ROTATION_SPEED);
-
-			Quaternion yRot;
-			yRot.fromAxisAngle(Vector3::UNIT_Y, Radian(mYaw));
-
-			Quaternion xRot;
-			xRot.fromAxisAngle(yRot.xAxis(), Radian(mPitch));
-
-			Quaternion camRot = xRot * yRot;
-
-			SO()->setRotation(camRot);
-		}
-	}
-}

+ 0 - 983
BansheeEditor/Source/BsDockManager.cpp

@@ -1,983 +0,0 @@
-#include "BsDockManager.h"
-#include "BsEditorWidgetContainer.h"
-#include "BsEditorWidget.h"
-#include "BsEditorWidgetManager.h"
-#include "BsMath.h"
-#include "BsException.h"
-#include "BsMesh.h"
-#include "BsMaterial.h"
-#include "BsVector2.h"
-#include "BsDrawList.h"
-#include "BsCoreApplication.h"
-#include "BsRendererManager.h"
-#include "BsRenderer.h"
-#include "BsSceneObject.h"
-#include "BsGUIManager.h"
-#include "BsBuiltinMaterialManager.h"
-#include "BsGUIWidget.h"
-#include "BsCamera.h"
-#include "BsDragAndDropManager.h"
-#include "BsGUIDockSlider.h"
-#include "BsVertexDataDesc.h"
-#include "BsGUISkin.h"
-#include "BsBuiltinResources.h"
-#include "BsDockManagerLayout.h"
-
-#include "BsGUISkin.h"
-#include "BsGUIButton.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const UINT32 DockManager::DockContainer::SLIDER_SIZE = 4;
-	const UINT32 DockManager::DockContainer::MIN_CHILD_SIZE = 20;
-
-	const Color DockManager::TINT_COLOR = Color(0.44f, 0.44f, 0.44f, 0.22f);
-	const Color DockManager::HIGHLIGHT_COLOR = Color(0.44f, 0.44f, 0.44f, 0.42f);
-
-	DockManager::DockContainer::DockContainer()
-		:mIsLeaf(true), mWidgets(nullptr), mSplitPosition(0.5f),
-		mIsHorizontal(false), mParent(nullptr), mSlider(nullptr)
-	{
-		mChildren[0] = nullptr;
-		mChildren[1] = nullptr;
-	}
-
-	DockManager::DockContainer::DockContainer(DockContainer* parent)
-		:mIsLeaf(false), mWidgets(nullptr), mSplitPosition(0.5f),
-		mIsHorizontal(false), mParent(parent), mSlider(nullptr)
-	{
-		mChildren[0] = nullptr;
-		mChildren[1] = nullptr;
-	}
-
-	DockManager::DockContainer::~DockContainer()
-	{
-		if(mIsLeaf && mWidgets != nullptr)
-			bs_delete(mWidgets);
-
-		if(!mIsLeaf)
-		{
-			if(mChildren[0] != nullptr)
-				bs_delete(mChildren[0]);
-
-			if(mChildren[1] != nullptr)
-				bs_delete(mChildren[1]);
-		}
-
-		if(mSlider != nullptr)
-		{
-			GUIElement::destroy(mSlider);
-			mSlider = nullptr;
-		}
-	}
-
-	void DockManager::DockContainer::setArea(INT32 x, INT32 y, UINT32 width, UINT32 height)
-	{
-		if(mIsLeaf)
-		{
-			if(mWidgets != nullptr)
-			{
-				mWidgets->setPosition(x, y);
-				mWidgets->setSize(width, height);
-			}
-		}
-
-		mArea.x = x;
-		mArea.y = y;
-		mArea.width = width;
-		mArea.height = height;
-
-		updateChildAreas();
-	}
-
-	void DockManager::DockContainer::updateChildAreas()
-	{
-		if(!mIsLeaf && mChildren[0] != nullptr && mChildren[1] != nullptr)
-		{
-			RectI clipRect = mArea;
-			if(mIsHorizontal)
-			{
-				UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.height - (INT32)SLIDER_SIZE);
-				UINT32 sizeTop = Math::floorToInt(remainingSize * mSplitPosition);
-				UINT32 sizeBottom = remainingSize - sizeTop;
-
-				mChildren[0]->setArea(mArea.x, mArea.y, mArea.width, sizeTop);
-				mChildren[1]->setArea(mArea.x, mArea.y + sizeTop + SLIDER_SIZE, mArea.width, sizeBottom);
-
-				mSlider->_setOffset(Vector2I(mArea.x, mArea.y + sizeTop));
-				mSlider->_setWidth(mArea.width);
-				mSlider->_setHeight(SLIDER_SIZE);
-
-				RectI elemClipRect(clipRect.x - mArea.x, clipRect.y - mArea.y, clipRect.width, clipRect.height);
-				mSlider->_setClipRect(elemClipRect);
-			}
-			else
-			{
-				UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.width - (INT32)SLIDER_SIZE);
-				UINT32 sizeLeft = Math::floorToInt(remainingSize * mSplitPosition);
-				UINT32 sizeRight = remainingSize - sizeLeft;
-
-				mChildren[0]->setArea(mArea.x, mArea.y, sizeLeft, mArea.height);
-				mChildren[1]->setArea(mArea.x + sizeLeft + SLIDER_SIZE, mArea.y, sizeRight, mArea.height);
-
-				mSlider->_setOffset(Vector2I(mArea.x + sizeLeft, mArea.y));
-				mSlider->_setWidth(SLIDER_SIZE);
-				mSlider->_setHeight(mArea.height);
-
-				RectI elemClipRect(clipRect.x - mArea.x, clipRect.y - mArea.y, clipRect.width, clipRect.height);
-				mSlider->_setClipRect(elemClipRect);
-			}
-		}
-	}
-
-	void DockManager::DockContainer::makeLeaf(GUIWidget* widgetParent, RenderWindow* parentWindow)
-	{
-		mIsLeaf = true;
-		mWidgets = bs_new<EditorWidgetContainer>(widgetParent, parentWindow, nullptr);
-
-		mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
-
-		if(mSlider != nullptr)
-		{
-			GUIElement::destroy(mSlider);
-			mSlider = nullptr;
-		}
-
-		mWidgets->setPosition(mArea.x, mArea.y);
-		mWidgets->setSize(mArea.width, mArea.height);
-	}
-
-	void DockManager::DockContainer::makeLeaf(EditorWidgetContainer* existingContainer)
-	{
-		mIsLeaf = true;
-		mWidgets = existingContainer;
-
-		mWidgets->onWidgetClosed.connect(std::bind(&DockManager::DockContainer::widgetRemoved, this));
-
-		if(mSlider != nullptr)
-		{
-			GUIElement::destroy(mSlider);
-			mSlider = nullptr;
-		}
-
-		mWidgets->setPosition(mArea.x, mArea.y);
-		mWidgets->setSize(mArea.width, mArea.height);
-	}
-
-	void DockManager::DockContainer::addLeft(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget)
-	{
-		if(mIsLeaf)
-			splitContainer(widgetParent, parentWindow, false, true);
-
-		mChildren[0]->addWidget(widget);
-	}
-
-	void DockManager::DockContainer::addRight(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget)
-	{
-		if(mIsLeaf)
-			splitContainer(widgetParent, parentWindow, false, false);
-
-		mChildren[1]->addWidget(widget);
-	}
-
-	void DockManager::DockContainer::addTop(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget)
-	{
-		if(mIsLeaf)
-			splitContainer(widgetParent, parentWindow, true, true);
-
-		mChildren[0]->addWidget(widget);
-	}
-
-	void DockManager::DockContainer::addBottom(GUIWidget* widgetParent, RenderWindow* parentWindow, EditorWidgetBase* widget)
-	{
-		if(mIsLeaf)
-			splitContainer(widgetParent, parentWindow, true, false);
-
-		mChildren[1]->addWidget(widget);
-	}
-
-	void DockManager::DockContainer::splitContainer(GUIWidget* widgetParent, RenderWindow* parentWindow, bool horizontal, bool newChildIsFirst, float splitPosition)
-	{
-		UINT32 idxA = newChildIsFirst ? 0 : 1;
-		UINT32 idxB = (idxA + 1) % 2;
-
-		mChildren[idxA] = bs_new<DockContainer>(this);
-		mChildren[idxB] = bs_new<DockContainer>(this);
-
-		mWidgets->onWidgetClosed.clear();
-
-		mChildren[idxA]->makeLeaf(widgetParent, parentWindow);
-		mChildren[idxB]->makeLeaf(mWidgets);
-
-		mIsLeaf = false;
-		mIsHorizontal = horizontal;
-		mWidgets = nullptr;
-		mSplitPosition = splitPosition;
-
-		if(horizontal)
-		{
-			mSlider = GUIDockSlider::create(true, "DockSliderBtn");
-			mSlider->_setWidgetDepth(widgetParent->getDepth());
-		}
-		else
-		{
-			mSlider = GUIDockSlider::create(false, "DockSliderBtn");
-			mSlider->_setWidgetDepth(widgetParent->getDepth());
-		}
-
-		mSlider->_changeParentWidget(widgetParent);
-
-		mSlider->onDragged.connect(std::bind(&DockManager::DockContainer::sliderDragged, this, _1));
-
-		setArea(mArea.x, mArea.y, mArea.width, mArea.height);
-	}
-
-	void DockManager::DockContainer::addWidget(EditorWidgetBase* widget)
-	{
-		if(!mIsLeaf)
-			return;
-
-		mWidgets->add(*widget);
-	}
-
-	void DockManager::DockContainer::addWidget(const String& name)
-	{
-		if(!mIsLeaf)
-			return;
-
-		EditorWidgetManager::instance().create(name, *mWidgets);
-	}
-
-	void DockManager::DockContainer::sliderDragged(const Vector2I& delta)
-	{
-		if(mIsHorizontal && delta.y != 0)
-		{
-			UINT32 maxSize = (UINT32)std::max(MIN_CHILD_SIZE, (INT32)mArea.height - (INT32)SLIDER_SIZE - MIN_CHILD_SIZE);
-			UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.height - (INT32)SLIDER_SIZE);
-			mSplitPosition = Math::clamp((UINT32)Math::floorToInt(remainingSize * mSplitPosition) + delta.y, MIN_CHILD_SIZE, maxSize) / (float)remainingSize;
-
-			updateChildAreas();
-		}
-		else if(!mIsHorizontal && delta.x != 0)
-		{
-			UINT32 maxSize = (UINT32)std::max(MIN_CHILD_SIZE, (INT32)mArea.width - (INT32)SLIDER_SIZE - MIN_CHILD_SIZE);
-			UINT32 remainingSize = (UINT32)std::max(0, (INT32)mArea.width - (INT32)SLIDER_SIZE);
-			mSplitPosition = Math::clamp((UINT32)Math::floorToInt(remainingSize * mSplitPosition) + delta.x, MIN_CHILD_SIZE, maxSize) / (float)remainingSize;
-
-			updateChildAreas();
-		}
-	}
-
-	void DockManager::DockContainer::widgetRemoved()
-	{
-		assert(mIsLeaf);
-
-		if(mWidgets->getNumWidgets() == 0)
-		{
-			if(mParent == nullptr) // We're root so we just reset ourselves, can't delete root
-			{
-				bs_delete(mWidgets);
-				mWidgets = nullptr;
-
-				mIsLeaf = false;
-				mSplitPosition = 0.5f;
-				mIsHorizontal = false;
-			}
-			else
-			{
-				// Replace our parent with our sibling
-				DockContainer* sibling = nullptr;
-				if(mParent->mChildren[0] == this)
-					sibling = mParent->mChildren[1];
-				else
-					sibling = mParent->mChildren[0];
-
-				sibling->mWidgets->onWidgetClosed.clear();
-
-				mParent->makeLeaf(sibling->mWidgets);
-				sibling->mWidgets = nullptr;
-
-				bs_delete(sibling);
-				bs_delete(this);
-			}
-		}
-	}
-
-	DockManager::DockContainer* DockManager::DockContainer::find(EditorWidgetContainer* widgetContainer)
-	{
-		if(mIsLeaf)
-		{
-			if(mWidgets == widgetContainer)
-				return this;
-			else
-				return nullptr;
-		}
-		else
-		{
-			if(mChildren[0] != nullptr && mChildren[0]->find(widgetContainer) != nullptr)
-				return mChildren[0];
-
-			if(mChildren[1] != nullptr && mChildren[1]->find(widgetContainer) != nullptr)
-				return mChildren[1];
-		}
-
-		return nullptr;
-	}
-
-	DockManager::DockContainer* DockManager::DockContainer::findAtPos(const Vector2I& pos)
-	{
-		if(mIsLeaf)
-		{
-			if(mArea.contains(pos))
-			{
-				return this;
-			}
-		}
-		else
-		{
-			if(mChildren[0] != nullptr && mChildren[0]->findAtPos(pos) != nullptr)
-				return mChildren[0];
-
-			if(mChildren[1] != nullptr && mChildren[1]->findAtPos(pos) != nullptr)
-				return mChildren[1];
-		}
-
-		return nullptr;
-	}
-
-	RectI DockManager::DockContainer::getContentBounds() const
-	{
-		if(!mIsLeaf || mWidgets == nullptr)
-			return mArea;
-
-		return mWidgets->getContentBounds();
-	}
-
-	DockManager::DockManager(RenderWindow* parentWindow, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mParentWindow(parentWindow), mMouseOverContainer(nullptr), mHighlightedDropLoc(DockLocation::None),
-		mShowOverlay(false), mAddedRenderCallback(false)
-	{
-		mTopDropPolygon = bs_newN<Vector2>(4);
-		mBotDropPolygon = bs_newN<Vector2>(4);
-		mLeftDropPolygon = bs_newN<Vector2>(4);
-		mRightDropPolygon = bs_newN<Vector2>(4);
-
-		mDropOverlayMat = BuiltinMaterialManager::instance().createDockDropOverlayMaterial();
-	}
-
-	DockManager::~DockManager()
-	{
-		bs_deleteN(mTopDropPolygon, 4);
-		bs_deleteN(mBotDropPolygon, 4);
-		bs_deleteN(mLeftDropPolygon, 4);
-		bs_deleteN(mRightDropPolygon, 4);
-	}
-
-	DockManager* DockManager::create(RenderWindow* parentWindow)
-	{
-		return new (bs_alloc<DockManager, PoolAlloc>()) DockManager(parentWindow, GUILayoutOptions::create());
-	}
-
-	void DockManager::update()
-	{
-		if(!DragAndDropManager::instance().isDragInProgress())
-		{
-			mHighlightedDropLoc = DockLocation::None;
-			mShowOverlay = false;
-		}
-	}
-
-	void DockManager::render(const Viewport* viewport, DrawList& drawList)
-	{
-		if(!mShowOverlay)
-			return;
-
-		float invViewportWidth = 1.0f / (viewport->getWidth() * 0.5f);
-		float invViewportHeight = 1.0f / (viewport->getHeight() * 0.5f);
-
-		if(mDropOverlayMesh == nullptr || !mDropOverlayMesh.isLoaded() || !mDropOverlayMesh->isInitialized())
-			return;
-
-		if(mDropOverlayMat == nullptr || !mDropOverlayMat.isLoaded() || !mDropOverlayMat->isInitialized())
-			return;
-
-		mDropOverlayMat->setFloat("invViewportWidth", invViewportWidth);
-		mDropOverlayMat->setFloat("invViewportHeight", invViewportHeight);
-
-		mDropOverlayMat->setColor("tintColor", TINT_COLOR);
-		mDropOverlayMat->setColor("highlightColor", HIGHLIGHT_COLOR);
-
-		Color highlightColor;
-		switch(mHighlightedDropLoc)
-		{
-		case DockLocation::Top:
-			highlightColor = Color(1.0f, 0.0f, 0.0f, 0.0f);
-			break;
-		case DockLocation::Bottom:
-			highlightColor = Color(0.0f, 1.0f, 0.0f, 0.0f);
-			break;
-		case DockLocation::Left:
-			highlightColor = Color(0.0f, 0.0f, 1.0f, 0.0f);
-			break;
-		case DockLocation::Right:
-			highlightColor = Color(0.0f, 0.0f, 0.0f, 1.0f);
-			break;
-		case DockLocation::None:
-			highlightColor = Color(0.0f, 0.0f, 0.0f, 0.0f);
-			break;
-		}
-
-		mDropOverlayMat->setColor("highlightActive", highlightColor);
-
-		drawList.add(mDropOverlayMat.getInternalPtr(), mDropOverlayMesh.getInternalPtr(), 0, Vector3::ZERO);
-	}
-
-	void DockManager::insert(EditorWidgetContainer* relativeTo, EditorWidgetBase* widgetToInsert, DockLocation location)
-	{
-		if(relativeTo != nullptr)
-		{
-			DockContainer* container = mRootContainer.find(relativeTo);
-			if(container == nullptr)
-				BS_EXCEPT(InternalErrorException, "Cannot find the wanted widget container relative to which the widget should be inserted.");
-
-			switch(location)
-			{
-			case DockLocation::Left:
-				container->addLeft(_getParentWidget(), mParentWindow, widgetToInsert);
-				break;
-			case DockLocation::Right:
-				container->addRight(_getParentWidget(), mParentWindow, widgetToInsert);
-				break;
-			case DockLocation::Top:
-				container->addTop(_getParentWidget(), mParentWindow, widgetToInsert);
-				break;
-			case DockLocation::Bottom:
-				container->addBottom(_getParentWidget(), mParentWindow, widgetToInsert);
-				break;
-			}
-		}
-		else
-		{
-			if(mRootContainer.mWidgets != nullptr)
-				BS_EXCEPT(InternalErrorException, "Trying to insert a widget into dock manager root container but one already exists.");
-
-			mRootContainer.makeLeaf(_getParentWidget(), mParentWindow);
-			mRootContainer.addWidget(widgetToInsert);
-		}
-	}
-
-	void DockManager::setArea(INT32 x, INT32 y, UINT32 width, UINT32 height)
-	{
-		mRootContainer.setArea(x, y, width, height);
-		mArea = RectI(x, y, width, height);
-
-		updateDropOverlay(x, y, width, height);
-	}
-
-	DockManagerLayoutPtr DockManager::getLayout() const
-	{
-		struct StackElem
-		{
-			StackElem(DockManagerLayout::Entry* layoutEntry, const DockContainer* container)
-				:layoutEntry(layoutEntry), container(container)
-			{ }
-
-			DockManagerLayout::Entry* layoutEntry;
-			const DockContainer* container;
-		};
-
-		auto GetWidgetNamesInContainer = [&] (const DockContainer* container)
-		{
-			Vector<String> widgetNames;
-			if(container->mWidgets != nullptr)
-			{
-				UINT32 numWidgets = container->mWidgets->getNumWidgets();
-
-				for(UINT32 i = 0; i < numWidgets; i++)
-				{
-					EditorWidgetBase* widget = container->mWidgets->getWidget(i);
-					widgetNames.push_back(widget->getName());
-				}				
-			}
-
-			return widgetNames;
-		};
-
-		DockManagerLayoutPtr layout = bs_shared_ptr<DockManagerLayout>();
-		DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
-
-		if(mRootContainer.mIsLeaf)
-		{
-			rootEntry->isLeaf = true;
-			rootEntry->widgetNames = GetWidgetNamesInContainer(&mRootContainer);
-		}
-		else
-		{
-			rootEntry->isLeaf = false;
-			rootEntry->horizontalSplit = mRootContainer.mIsHorizontal;
-			rootEntry->splitPosition = mRootContainer.mSplitPosition;
-			rootEntry->parent = nullptr;
-		}
-
-		Stack<StackElem> todo;
-		todo.push(StackElem(rootEntry, &mRootContainer));
-
-		while(!todo.empty())
-		{
-			StackElem currentElem = todo.top();
-			todo.pop();
-
-			if(!currentElem.container->mIsLeaf)
-			{
-				for(UINT32 i = 0; i < 2; i++)
-				{
-					if(currentElem.container->mChildren[i] == nullptr)
-						continue;
-
-					if(currentElem.container->mChildren[i]->mIsLeaf)
-					{
-						Vector<String> widgetNames = GetWidgetNamesInContainer(currentElem.container->mChildren[i]);
-						currentElem.layoutEntry->children[i] = 
-							DockManagerLayout::Entry::createLeaf(currentElem.layoutEntry, i, widgetNames);
-					}
-					else
-					{
-						currentElem.layoutEntry->children[i] = 
-							DockManagerLayout::Entry::createContainer(currentElem.layoutEntry, i, 
-							currentElem.container->mChildren[i]->mSplitPosition, 
-							currentElem.container->mChildren[i]->mIsHorizontal);
-
-						todo.push(StackElem(currentElem.layoutEntry->children[i], currentElem.container->mChildren[i]));
-					}
-				}
-			}
-		}
-
-		return layout;
-	}
-
-	void DockManager::setLayout(const DockManagerLayoutPtr& layout)
-	{
-		// Undock all currently docked widgets
-		Vector<EditorWidgetBase*> undockedWidgets;
-
-		Stack<DockContainer*> todo;
-		todo.push(&mRootContainer);
-
-		while(!todo.empty())
-		{
-			DockContainer* current = todo.top();
-			todo.pop();
-
-			if(current->mIsLeaf)
-			{
-				if(current->mWidgets != nullptr)
-				{
-					while(current->mWidgets->getNumWidgets() > 0)
-					{
-						EditorWidgetBase* curWidget = current->mWidgets->getWidget(0);
-						current->mWidgets->remove(*curWidget);
-
-						undockedWidgets.push_back(curWidget);
-					}
-				}
-			}
-			else
-			{
-				todo.push(current->mChildren[0]);
-				todo.push(current->mChildren[1]);
-			}
-		}
-
-		mRootContainer = DockContainer();
-
-		// Load layout
-		struct StackEntry
-		{
-			StackEntry(const DockManagerLayout::Entry* layoutEntry, DockContainer* container)
-				:layoutEntry(layoutEntry), container(container)
-			{ }
-
-			const DockManagerLayout::Entry* layoutEntry;
-			DockContainer* container;
-		};
-
-		auto GetLeafEntry = [] (const DockManagerLayout::Entry* parentEntry, UINT32 childIdx) -> const DockManagerLayout::Entry*
-		{
-			while(true)
-			{
-				if(parentEntry->isLeaf)
-					return parentEntry;
-
-				parentEntry = parentEntry->children[childIdx];
-			}
-
-			return nullptr;
-		};
-
-		auto OpenWidgets = [&] (DockContainer* parent, const Vector<String>& widgetNames)
-		{
-			for(auto& widgetName : widgetNames)
-			{
-				parent->addWidget(widgetName);
-			}
-		};
-
-		// Dock elements
-		const DockManagerLayout::Entry* rootEntry = &layout->getRootEntry();
-		const DockManagerLayout::Entry* leafEntry = GetLeafEntry(rootEntry, 0);
-
-		if(leafEntry->widgetNames.size() > 0) // If zero, entire layout is empty
-		{
-			mRootContainer.makeLeaf(_getParentWidget(), mParentWindow);
-			OpenWidgets(&mRootContainer, leafEntry->widgetNames);
-
-			if(!rootEntry->isLeaf)
-			{
-				Stack<StackEntry> layoutTodo;
-				layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
-
-				while(!layoutTodo.empty())
-				{
-					StackEntry curEntry = layoutTodo.top();
-					layoutTodo.pop();
-
-					leafEntry = GetLeafEntry(curEntry.layoutEntry->children[1], 0);
-
-					curEntry.container->splitContainer(_getParentWidget(), mParentWindow, curEntry.layoutEntry->horizontalSplit, false, curEntry.layoutEntry->splitPosition);
-
-					DockContainer* otherChild = curEntry.container->mChildren[1];
-					OpenWidgets(otherChild, leafEntry->widgetNames);
-
-					if(!curEntry.layoutEntry->children[0]->isLeaf)
-						layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
-
-					if(!curEntry.layoutEntry->children[1]->isLeaf)
-						layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
-				}
-			}
-		}
-
-		// Set container sizes
-		{
-			Stack<StackEntry> layoutTodo;
-			layoutTodo.push(StackEntry(rootEntry, &mRootContainer));
-
-			while(!layoutTodo.empty())
-			{
-				StackEntry curEntry = layoutTodo.top();
-				layoutTodo.pop();
-
-				if(!curEntry.layoutEntry->isLeaf)
-				{
-					layoutTodo.push(StackEntry(curEntry.layoutEntry->children[0], curEntry.container->mChildren[0]));
-					layoutTodo.push(StackEntry(curEntry.layoutEntry->children[1], curEntry.container->mChildren[1]));
-				}
-			}
-		}
-
-		// Destroy any widgets that are no longer docked anywhere
-		for(auto& widget : undockedWidgets)
-		{
-			if(widget->_getParent() == nullptr)
-				widget->close();
-		}
-
-		setArea(mArea.x, mArea.y, mArea.width, mArea.height);
-	}
-
-	void DockManager::updateClippedBounds()
-	{
-		// TODO - Clipping not actually accounted for but shouldn't matter as right now DockManager is only used in one specific situation
-		mClippedBounds = mRootContainer.mArea;
-	}
-
-	void DockManager::updateDropOverlay(INT32 x, INT32 y, UINT32 width, UINT32 height)
-	{
-		const static int spacing = 10;
-		const static float innerScale = 0.75f;
-
-		UINT32 outWidth = std::max(0, (INT32)width - spacing * 2);
-		UINT32 outHeight = std::max(0, (INT32)height - spacing * 2);
-		UINT32 inWidth = (UINT32)Math::floorToInt(innerScale * outWidth);
-		UINT32 inHeight = (UINT32)Math::floorToInt(innerScale * outHeight);
-		INT32 inXOffset = Math::floorToInt((outWidth - inWidth) * 0.5f);
-		INT32 inYOffset = Math::floorToInt((outHeight - inHeight) * 0.5f);
-
-		Vector2 outTopLeft((float)x, (float)y);
-		Vector2 outTopRight((float)(x + outWidth), (float)y);
-		Vector2 outBotLeft((float)x, (float)(y + outHeight));
-		Vector2 outBotRight((float)(x + outWidth), (float)(y + outHeight));
-
-		Vector2 inTopLeft((float)(x + inXOffset), (float)(y + inYOffset));
-		Vector2 inTopRight((float)(x + inXOffset + inWidth), (float)(y + inYOffset));
-		Vector2 inBotLeft((float)(x + inXOffset), (float)(y + inYOffset + inHeight));
-		Vector2 inBotRight((float)(x + inXOffset + inWidth), (float)(y + inYOffset + inHeight));
-
-		VertexDataDescPtr vertexDesc = bs_shared_ptr<VertexDataDesc>();
-		
-		vertexDesc->addVertElem(VET_FLOAT2, VES_POSITION);
-		vertexDesc->addVertElem(VET_COLOR, VES_COLOR);
-
-		MeshDataPtr meshData = bs_shared_ptr<MeshData, ScratchAlloc>(16, 24, vertexDesc);
-
-		auto vertIter = meshData->getVec2DataIter(VES_POSITION);
-		auto colIter = meshData->getDWORDDataIter(VES_COLOR);
-
-		// Top
-		Vector2 topOffset((float)spacing, 0.0f);
-
-		mTopDropPolygon[0] = outTopLeft + topOffset;
-		mTopDropPolygon[1] = outTopRight + topOffset;
-		mTopDropPolygon[2] = inTopRight + topOffset;
-		mTopDropPolygon[3] = inTopLeft + topOffset;
-
-		vertIter.addValue(mTopDropPolygon[0]);
-		vertIter.addValue(mTopDropPolygon[1]);
-		vertIter.addValue(mTopDropPolygon[2]);
-		vertIter.addValue(mTopDropPolygon[3]);
-
-		Color color(1.0f, 0.0f, 0.0f, 0.0f);
-		UINT32 color32 = color.getAsRGBA();
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-
-		// Bottom
-		Vector2 botOffset((float)spacing, (float)spacing * 2.0f);
-
-		mBotDropPolygon[0] = inBotLeft + botOffset;
-		mBotDropPolygon[1] = inBotRight + botOffset;
-		mBotDropPolygon[2] = outBotRight + botOffset;
-		mBotDropPolygon[3] = outBotLeft + botOffset;
-
-		vertIter.addValue(mBotDropPolygon[0]);
-		vertIter.addValue(mBotDropPolygon[1]);
-		vertIter.addValue(mBotDropPolygon[2]);
-		vertIter.addValue(mBotDropPolygon[3]);
-
-		color = Color(0.0f, 1.0f, 0.0f, 0.0f);
-		color32 = color.getAsRGBA();
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-
-		// Left
-		Vector2 leftOffset(0.0f, (float)spacing);
-
-		mLeftDropPolygon[0] = outTopLeft + leftOffset;
-		mLeftDropPolygon[1] = inTopLeft + leftOffset;
-		mLeftDropPolygon[2] = inBotLeft + leftOffset;
-		mLeftDropPolygon[3] = outBotLeft + leftOffset;
-
-		vertIter.addValue(mLeftDropPolygon[0]);
-		vertIter.addValue(mLeftDropPolygon[1]);
-		vertIter.addValue(mLeftDropPolygon[2]);
-		vertIter.addValue(mLeftDropPolygon[3]);
-
-		color = Color(0.0f, 0.0f, 1.0f, 0.0f);
-		color32 = color.getAsRGBA();
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-
-		// Right
-		Vector2 rightOffset((float)spacing * 2.0f, (float)spacing);
-
-		mRightDropPolygon[0] = inTopRight + rightOffset;
-		mRightDropPolygon[1] = outTopRight + rightOffset;
-		mRightDropPolygon[2] = outBotRight + rightOffset;
-		mRightDropPolygon[3] = inBotRight + rightOffset;
-
-		vertIter.addValue(mRightDropPolygon[0]);
-		vertIter.addValue(mRightDropPolygon[1]);
-		vertIter.addValue(mRightDropPolygon[2]);
-		vertIter.addValue(mRightDropPolygon[3]);
-
-		color = Color(0.0f, 0.0f, 0.0f, 1.0f);
-		color32 = color.getAsRGBA();
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-		colIter.addValue(color32);
-
-		UINT32* indexData = meshData->getIndices32();
-
-		// Top
-		indexData[0] = 0;
-		indexData[1] = 1;
-		indexData[2] = 2;
-
-		indexData[3] = 0;
-		indexData[4] = 2;
-		indexData[5] = 3;
-
-		// Bottom
-		indexData[6] = 4;
-		indexData[7] = 5;
-		indexData[8] = 6;
-
-		indexData[9] = 4;
-		indexData[10] = 6;
-		indexData[11] = 7;
-
-		// Left
-		indexData[12] = 8;
-		indexData[13] = 9;
-		indexData[14] = 10;
-
-		indexData[15] = 8;
-		indexData[16] = 10;
-		indexData[17] = 11;
-
-		// Right
-		indexData[18] = 12;
-		indexData[19] = 13;
-		indexData[20] = 14;
-
-		indexData[21] = 12;
-		indexData[22] = 14;
-		indexData[23] = 15;
-
-		mDropOverlayMesh = Mesh::create(meshData);
-	}
-
-	bool DockManager::mouseEvent(const GUIMouseEvent& event)
-	{
-		if(event.getType() == GUIMouseEventType::MouseDragAndDropDragged)
-		{
-			if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-				return false;
-
-			const Vector2I& widgetRelPos = event.getPosition();
-
-			const Matrix4& worldTfrm = _getParentWidget()->SO()->getWorldTfrm();
-
-			Vector4 tfrmdPos = worldTfrm.multiply3x4(Vector4((float)widgetRelPos.x, (float)widgetRelPos.y, 0.0f, 1.0f));
-			Vector2 windowPosVec(tfrmdPos.x, tfrmdPos.y);
-			Vector2I windowPos(Math::roundToInt(windowPosVec.x), Math::roundToInt(windowPosVec.y));
-
-			mMouseOverContainer = mRootContainer.findAtPos(windowPos);
-			if(mMouseOverContainer == nullptr)
-				mMouseOverContainer = &mRootContainer;
-
-			RectI overlayBounds;
-			
-			if(mMouseOverContainer != nullptr)
-				overlayBounds = mMouseOverContainer->getContentBounds();
-
-			// Update mesh if needed
-			if(mLastOverlayBounds != overlayBounds)
-			{
-				if(overlayBounds.width <= 0 || overlayBounds.height <= 0)
-					mDropOverlayMesh = HMesh();
-				else
-					updateDropOverlay(overlayBounds.x, overlayBounds.y, overlayBounds.width, overlayBounds.height);
-
-				mLastOverlayBounds = overlayBounds;
-			}
-
-			// Check if we need to highlight any drop locations
-			if(mMouseOverContainer != nullptr)
-			{
-				if(insidePolygon(mTopDropPolygon, 4, windowPosVec))
-					mHighlightedDropLoc = DockLocation::Top;
-				else if(insidePolygon(mBotDropPolygon, 4, windowPosVec))
-					mHighlightedDropLoc = DockLocation::Bottom;
-				else if(insidePolygon(mLeftDropPolygon, 4, windowPosVec))
-					mHighlightedDropLoc = DockLocation::Left;
-				else if(insidePolygon(mRightDropPolygon, 4, windowPosVec))
-					mHighlightedDropLoc = DockLocation::Right;
-				else
-					mHighlightedDropLoc = DockLocation::None;
-
-				if(overlayBounds.contains(windowPos))
-					mShowOverlay = true;
-				else
-					mShowOverlay = false;
-			}
-			else
-				mShowOverlay = false;
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragAndDropDropped)
-		{
-			if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-				return false;
-
-			EditorWidgetBase* draggedWidget = reinterpret_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-
-			const Vector2I& widgetRelPos = event.getPosition();
-			const Matrix4& worldTfrm = _getParentWidget()->SO()->getWorldTfrm();
-
-			Vector4 tfrmdPos = worldTfrm.multiply3x4(Vector4((float)widgetRelPos.x, (float)widgetRelPos.y, 0.0f, 1.0f));
-			Vector2 windowPosVec(tfrmdPos.x, tfrmdPos.y);
-			Vector2I windowPos(Math::roundToInt(windowPosVec.x), Math::roundToInt(windowPosVec.y));
-
-			DockContainer* mouseOverContainer = mRootContainer.findAtPos(windowPos);
-
-			if(mouseOverContainer == nullptr)
-			{
-				RectI overlayBounds = mRootContainer.getContentBounds();
-				if(overlayBounds.contains(windowPos))
-				{
-					insert(nullptr, draggedWidget, DockLocation::None);
-				}
-			}
-			else
-			{
-				if(insidePolygon(mTopDropPolygon, 4, windowPosVec))
-					insert(mouseOverContainer->mWidgets, draggedWidget, DockLocation::Top);
-				else if(insidePolygon(mBotDropPolygon, 4, windowPosVec))
-					insert(mouseOverContainer->mWidgets, draggedWidget, DockLocation::Bottom);
-				else if(insidePolygon(mLeftDropPolygon, 4, windowPosVec))
-					insert(mouseOverContainer->mWidgets, draggedWidget, DockLocation::Left);
-				else if(insidePolygon(mRightDropPolygon, 4, windowPosVec))
-					insert(mouseOverContainer->mWidgets, draggedWidget, DockLocation::Right);
-			}
-
-			return true;
-		}
-
-		return false;
-	}
-	
-	void DockManager::_changeParentWidget(GUIWidget* widget)
-	{
-		GUIElement::_changeParentWidget(widget);
-
-		if(widget != nullptr)
-		{
-			if(mAddedRenderCallback)
-			{
-				// Note: Adding support for this should be fairly simple though, I just didn't bother with it. You could
-				// remove the current render callback and register a new one. Will likely need to make other minor fixes.
-				BS_EXCEPT(InvalidStateException, "Attempting to change parent widget of a DockManager. This is not supported");
-			}
-
-			RendererManager::instance().getActive()->addRenderCallback(widget->getTarget(), std::bind(&DockManager::render, this, _1, _2));
-			mAddedRenderCallback = true;
-		}
-	}
-
-	// TODO - Move to a separate Polygon class?
-	bool DockManager::insidePolygon(Vector2* polyPoints, UINT32 numPoints, Vector2 point) const
-	{
-		bool isInside = false;
-		for (UINT32 i = 0, j = numPoints - 1; i < numPoints; j = i++) 
-		{
-			float lineVal = (polyPoints[j].x - polyPoints[i].x) * (point.y - polyPoints[i].y) / (polyPoints[j].y - polyPoints[i].y) + polyPoints[i].x;
-
-			if (((polyPoints[i].y > point.y) != (polyPoints[j].y > point.y)) && (point.x < lineVal))
-				isInside = !isInside;
-		}
-
-		return isInside;
-	}
-}

+ 0 - 85
BansheeEditor/Source/BsDockManagerLayout.cpp

@@ -1,85 +0,0 @@
-#include "BsDockManagerLayout.h"
-#include "BsDockManagerLayoutRTTI.h"
-
-namespace BansheeEngine
-{
-	DockManagerLayout::Entry::Entry()
-		:isLeaf(true), splitPosition(0), horizontalSplit(false),
-		parent(nullptr)
-	{
-		children[0] = nullptr;
-		children[1] = nullptr;
-	}
-
-	DockManagerLayout::Entry::~Entry()
-	{ }
-
-	DockManagerLayout::Entry* DockManagerLayout::Entry::createLeaf(Entry* parent, UINT32 childIdx, 
-		const Vector<String>& widgetNames)
-	{
-		Entry* newEntry = bs_new<Entry>();
-		newEntry->isLeaf = true;
-		newEntry->parent = parent;
-
-		if(parent != nullptr)
-			parent->children[childIdx] = newEntry;
-
-		newEntry->widgetNames = widgetNames;
-
-		return newEntry;
-	}
-
-	DockManagerLayout::Entry* DockManagerLayout::Entry::createContainer(Entry* parent, UINT32 childIdx, 
-		float splitPosition, bool horizontalSplit)
-	{
-		Entry* newEntry = bs_new<Entry>();
-		newEntry->isLeaf = false;
-		newEntry->parent = parent;
-
-		if(parent != nullptr)
-			parent->children[childIdx] = newEntry;
-
-		newEntry->horizontalSplit = horizontalSplit;
-		newEntry->splitPosition = splitPosition;
-
-		return newEntry;
-	}
-
-	DockManagerLayout::~DockManagerLayout()
-	{
-		Stack<Entry*> todo;
-		if(!mRootEntry.isLeaf)
-		{
-			todo.push(mRootEntry.children[0]);
-			todo.push(mRootEntry.children[1]);
-		}
-
-		while(!todo.empty())
-		{
-			Entry* current = todo.top();
-			todo.pop();
-
-			if(!current->isLeaf)
-			{
-				todo.push(current->children[0]);
-				todo.push(current->children[1]);
-			}
-
-			bs_delete(current);
-		}
-	}
-
-	/************************************************************************/
-	/* 								RTTI		                     		*/
-	/************************************************************************/
-
-	RTTITypeBase* DockManagerLayout::getRTTIStatic()
-	{
-		return DockManagerLayoutRTTI::instance();
-	}
-
-	RTTITypeBase* DockManagerLayout::getRTTI() const
-	{
-		return DockManagerLayout::getRTTIStatic();
-	}
-}

+ 0 - 411
BansheeEditor/Source/BsEditorApplication.cpp

@@ -1,411 +0,0 @@
-#include "BsEditorApplication.h"
-#include "BsEditorWindowManager.h"
-#include "BsEditorWidgetManager.h"
-#include "BsMainEditorWindow.h"
-#include "BsRenderWindow.h"
-#include "BsEditorGUI.h"
-#include "BsUndoRedo.h"
-#include "BsFileSerializer.h"
-#include "BsFileSystem.h"
-#include "BsPath.h"
-#include "BsEditorWidgetLayout.h"
-
-// DEBUG ONLY
-#include "DbgEditorWidget1.h"
-#include "DbgEditorWidget2.h"
-#include "BsResources.h"
-#include "BsSceneObject.h"
-#include "BsImporter.h"
-#include "BsGpuProgram.h"
-#include "BsGpuProgramImportOptions.h"
-#include "BsShader.h"
-#include "BsTexture.h"
-#include "BsMaterial.h"
-#include "BsTechnique.h"
-#include "BsPass.h"
-#include "BsRenderable.h"
-#include "BsDbgTestGameObjectRef.h"
-#include "BsVirtualInput.h"
-#include "BsFolderMonitor.h"
-#include "BsProjectLibrary.h"
-#include "BsCamera.h"
-#include "BsGUIWidget.h"
-#include "BsGUIArea.h"
-#include "BsGUIButton.h"
-#include "BsGUILayout.h"
-#include "BsEvent.h"
-
-namespace BansheeEngine
-{
-	const Path EditorApplication::WIDGET_LAYOUT_PATH = L"Internal\\Layout.asset";
-
-	RENDER_WINDOW_DESC createRenderWindowDesc()
-	{
-		RENDER_WINDOW_DESC renderWindowDesc;
-		renderWindowDesc.videoMode = VideoMode(1280, 720);
-		renderWindowDesc.title = "BansheeEditor";
-		renderWindowDesc.fullscreen = false;
-		renderWindowDesc.border = WindowBorder::None;
-
-		return renderWindowDesc;
-	}
-
-	EditorApplication::EditorApplication(RenderSystemPlugin renderSystemPlugin)
-		:Application(createRenderWindowDesc(), renderSystemPlugin, RendererPlugin::Default), 
-		mActiveRSPlugin(renderSystemPlugin)
-	{
-		EditorGUI::startUp();
-
-		{
-			auto inputConfig = VirtualInput::instance().getConfiguration();
-
-			inputConfig->registerButton("Rename", BC_F2);
-			inputConfig->registerButton("Undo", BC_Z, VButtonModifier::Ctrl);
-			inputConfig->registerButton("Redo", BC_Y, VButtonModifier::Ctrl);
-			inputConfig->registerButton("Copy", BC_C, VButtonModifier::Ctrl);
-			inputConfig->registerButton("Cut", BC_X, VButtonModifier::Ctrl);
-			inputConfig->registerButton("Paste", BC_V, VButtonModifier::Ctrl);
-			inputConfig->registerButton("Delete", BC_DELETE);
-		}
-
-		ProjectLibrary::startUp(getActiveProjectPath());
-
-		UndoRedo::startUp();
-		EditorWindowManager::startUp();
-		EditorWidgetManager::startUp();
-	}
-
-	EditorApplication::~EditorApplication()
-	{
-		saveWidgetLayout(EditorWidgetManager::instance().getLayout());
-
-		EditorWidgetManager::shutDown();
-		EditorWindowManager::shutDown();
-		UndoRedo::shutDown();
-
-
-		/************************************************************************/
-		/* 								DEBUG CODE                      		*/
-		/************************************************************************/
-
-		gResources().unload(mTestTexRef);
-		gResources().unload(mDbgMeshRef);
-		gResources().unload(mFragProgRef);
-		gResources().unload(mVertProgRef);
-		gResources().unload(mTestMaterial);
-
-		mTestMaterial = nullptr;
-		mTestTexRef = nullptr;
-		mDbgMeshRef = nullptr;
-		mFragProgRef = nullptr;
-		mVertProgRef = nullptr;
-
-		mNewPassGL = nullptr;
-		mNewTechniqueGL = nullptr;
-
-		mNewPassDX = nullptr;
-		mNewTechniqueDX = nullptr;
-
-		mNewPassDX11 = nullptr;
-		mNewTechniqueDX11 = nullptr;
-
-		mTestShader = nullptr;
-
-		/************************************************************************/
-		/* 							END DEBUG CODE                      		*/
-		/************************************************************************/
-
-		ProjectLibrary::shutDown();
-		EditorGUI::shutDown();
-	}
-
-	void EditorApplication::onStartUp()
-	{
-		Application::onStartUp();
-
-		MainEditorWindow* mainWindow = MainEditorWindow::create(getPrimaryWindow());
-		loadPlugin("SBansheeEditor"); // Managed part of the editor
-
-		EditorWidgetLayoutPtr layout = loadWidgetLayout();
-		if (layout != nullptr)
-			EditorWidgetManager::instance().setLayout(layout);
-
-		/************************************************************************/
-		/* 								DEBUG CODE                      		*/
-		/************************************************************************/
-
-		RenderSystem* renderSystem = RenderSystem::instancePtr();
-
-		HSceneObject testModelGO = SceneObject::create("TestMesh");
-		HRenderable testRenderable = testModelGO->addComponent<Renderable>();
-
-		WString psLoc;
-		WString vsLoc;
-
-		GpuProgramProfile psProfile;
-		GpuProgramProfile vsProfile;
-
-		String psEntry;
-		String vsEntry;
-
-		String language;
-
-		switch (mActiveRSPlugin)
-		{
-		case RenderSystemPlugin::DX11:
-		{
-										 psLoc = L"C:\\Projects\\BansheeEngine\\Data\\hlsl11_ps.gpuprog";
-										 vsLoc = L"C:\\Projects\\BansheeEngine\\Data\\hlsl11_vs.gpuprog";
-										 language = "hlsl";
-										 psProfile = GPP_PS_4_0;
-										 vsProfile = GPP_VS_4_0;
-										 psEntry = "ps_main";
-										 vsEntry = "vs_main";
-										 break;
-		}
-		case RenderSystemPlugin::DX9:
-		{
-										psLoc = L"C:\\Projects\\BansheeEngine\\Data\\hlsl9_ps.gpuprog";
-										vsLoc = L"C:\\Projects\\BansheeEngine\\Data\\hlsl9_vs.gpuprog";
-										language = "hlsl";
-										psProfile = GPP_PS_2_0;
-										vsProfile = GPP_VS_2_0;
-										psEntry = "ps_main";
-										vsEntry = "vs_main";
-										break;
-		}
-		case RenderSystemPlugin::OpenGL:
-		{
-										   psLoc = L"C:\\Projects\\BansheeEngine\\Data\\glsl_ps.gpuprog";
-										   vsLoc = L"C:\\Projects\\BansheeEngine\\Data\\glsl_vs.gpuprog";
-										   language = "glsl";
-										   psProfile = GPP_PS_2_0;
-										   vsProfile = GPP_VS_2_0;
-										   psEntry = "main";
-										   vsEntry = "main";
-										   break;
-		}
-		}
-
-		ImportOptionsPtr gpuProgImportOptions = Importer::instance().createImportOptions(psLoc);
-		if (rtti_is_of_type<GpuProgramImportOptions>(gpuProgImportOptions))
-		{
-			GpuProgramImportOptions* importOptions = static_cast<GpuProgramImportOptions*>(gpuProgImportOptions.get());
-
-			importOptions->setEntryPoint(psEntry);
-			importOptions->setLanguage(language);
-			importOptions->setProfile(psProfile);
-			importOptions->setType(GPT_FRAGMENT_PROGRAM);
-		}
-
-		mFragProgRef = Importer::instance().import(psLoc, gpuProgImportOptions);
-
-		gpuProgImportOptions = Importer::instance().createImportOptions(vsLoc);
-		if (rtti_is_of_type<GpuProgramImportOptions>(gpuProgImportOptions))
-		{
-			GpuProgramImportOptions* importOptions = static_cast<GpuProgramImportOptions*>(gpuProgImportOptions.get());
-
-			importOptions->setEntryPoint(vsEntry);
-			importOptions->setLanguage(language);
-			importOptions->setProfile(vsProfile);
-			importOptions->setType(GPT_VERTEX_PROGRAM);
-		}
-
-		mVertProgRef = Importer::instance().import(vsLoc, gpuProgImportOptions);
-
-		gResources().save(mVertProgRef, L"C:\\vertProgCg.vprog", true);
-		gResources().unload(mVertProgRef);
-		mVertProgRef = gResources().load(L"C:\\vertProgCg.vprog");
-
-		gResources().save(mFragProgRef, L"C:\\fragProgCg.vprog", true);
-		gResources().unload(mFragProgRef);
-		mFragProgRef = gResources().load(L"C:\\fragProgCg.vprog");
-
-		mTestShader = Shader::create("TestShader");
-		mTestShader->addParameter("matViewProjection", "matViewProjection", GPDT_MATRIX_4X4);
-
-		if (mActiveRSPlugin == RenderSystemPlugin::DX11)
-			mTestShader->addParameter("input", "input", GPDT_STRUCT, 0, 2, 8);
-
-		mTestShader->addParameter("samp", "samp", GPOT_SAMPLER2D);
-		mTestShader->addParameter("tex", "tex", GPOT_TEXTURE2D);
-		mNewTechniqueGL = mTestShader->addTechnique("GLRenderSystem", "BansheeRenderer");
-		mNewPassGL = mNewTechniqueGL->addPass();
-		mNewPassGL->setVertexProgram(mVertProgRef);
-		mNewPassGL->setFragmentProgram(mFragProgRef);
-
-		// TODO - I need to create different techniques for different render systems (and renderers, if there were any),
-		// which is redundant as some techniques can be reused. I should add a functionality that supports multiple
-		// render systems/renderers per technique
-		mNewTechniqueDX = mTestShader->addTechnique("D3D9RenderSystem", "BansheeRenderer");
-		mNewPassDX = mNewTechniqueDX->addPass();
-		mNewPassDX->setVertexProgram(mVertProgRef);
-		mNewPassDX->setFragmentProgram(mFragProgRef);
-
-		mNewTechniqueDX11 = mTestShader->addTechnique("D3D11RenderSystem", "BansheeRenderer");
-		mNewPassDX11 = mNewTechniqueDX11->addPass();
-		mNewPassDX11->setVertexProgram(mVertProgRef);
-		mNewPassDX11->setFragmentProgram(mFragProgRef);
-
-		mTestMaterial = Material::create();
-		mTestMaterial->setShader(mTestShader);
-
-		mTestMaterial->setMat4("matViewProjection", Matrix4::IDENTITY);
-
-		if (mActiveRSPlugin == RenderSystemPlugin::DX11)
-		{
-			float dbgMultipliers1[2];
-			dbgMultipliers1[0] = 0.0f;
-			dbgMultipliers1[1] = 0.0f;
-
-			float dbgMultipliers2[2];
-			dbgMultipliers2[0] = 1.0f;
-			dbgMultipliers2[1] = 1.0f;
-
-			mTestMaterial->setStructData("input", dbgMultipliers1, sizeof(dbgMultipliers1), 0);
-			mTestMaterial->setStructData("input", dbgMultipliers2, sizeof(dbgMultipliers2), 1);
-		}
-
-		mTestTexRef = static_resource_cast<Texture>(Importer::instance().import(L"C:\\ArenaTowerDFS.psd"));
-		mDbgMeshRef = static_resource_cast<Mesh>(Importer::instance().import(L"C:\\X_Arena_Tower.FBX"));
-
-		gResources().save(mTestTexRef, L"C:\\ExportTest.tex", true);
-		gResources().save(mDbgMeshRef, L"C:\\ExportMesh.mesh", true);
-
-		gResources().unload(mTestTexRef);
-		gResources().unload(mDbgMeshRef);
-
-		mTestTexRef = static_resource_cast<Texture>(gResources().loadAsync(L"C:\\ExportTest.tex"));
-		mDbgMeshRef = static_resource_cast<Mesh>(gResources().loadAsync(L"C:\\ExportMesh.mesh"));
-
-		mDbgMeshRef.synchronize();
-		mTestTexRef.synchronize();
-
-		mTestMaterial->setTexture("tex", mTestTexRef);
-		gResources().save(mTestMaterial, L"C:\\ExportMaterial.mat", true);
-
-		gResources().unload(mTestMaterial);
-
-		mTestMaterial = gResources().load(L"C:\\ExportMaterial.mat");
-
-		testRenderable->setMesh(mDbgMeshRef);
-		testRenderable->setMaterial(0, mTestMaterial);
-
-		GameObjectHandle<DbgTestGameObjectRef> dbgTestGameObjectRef = testModelGO->addComponent<DbgTestGameObjectRef>();
-		dbgTestGameObjectRef->mRenderable = testRenderable;
-
-		HSceneObject clone = testModelGO->clone();
-		GameObjectHandle<DbgTestGameObjectRef> clonedDbgTestGameObjectRef = clone->getComponent<DbgTestGameObjectRef>();
-
-		testModelGO->destroy();
-
-		//Win32FolderMonitor* folderMonitor = bs_new<Win32FolderMonitor>();
-
-		//FolderChange folderChanges = (FolderChange)((UINT32)FolderChange::FileName | (UINT32)FolderChange::DirName | 
-		//	(UINT32)FolderChange::Creation | (UINT32)FolderChange::LastWrite);
-		//folderMonitor->startMonitor(L"D:\\TestDetect", true, folderChanges);
-
-		//HTexture dbgCursor = static_resource_cast<Texture>(Importer::instance().import(L"C:\\CursorDbg.psd"));
-		//PixelDataPtr cursorPixelData = dbgCursor->allocateSubresourceBuffer(0);
-
-		//gMainSyncedCA().readSubresource(dbgCursor.getInternalPtr(), 0, cursorPixelData);
-		//gMainSyncedCA().submitToCoreThread(true);
-
-		/************************************************************************/
-		/* 								MODAL WINDOW                      		*/
-		/************************************************************************/
-
-		//RENDER_WINDOW_DESC modalWindowDesc;
-		//modalWindowDesc.width = 200;
-		//modalWindowDesc.height = 200;
-		//modalWindowDesc.left = 0;
-		//modalWindowDesc.top = 0;
-		//modalWindowDesc.title = "ModalWindow";
-		//modalWindowDesc.fullscreen = false;
-		//modalWindowDesc.border = WindowBorder::None;
-		//modalWindowDesc.toolWindow = true;
-		//modalWindowDesc.modal = true;
-
-		//RenderWindowPtr modalWindow = RenderWindow::create(modalWindowDesc, gApplication().getPrimaryWindow());
-
-		//HSceneObject modalSceneObject = SceneObject::create("ModalWindow");
-
-		//HCamera modalCamera = modalSceneObject->addComponent<Camera>();
-		//modalCamera->initialize(modalWindow, 0.0f, 0.0f, 1.0f, 1.0f);
-		//modalCamera->setNearClipDistance(5);
-		//modalCamera->setAspectRatio(1.0f);
-		//modalCamera->setIgnoreSceneRenderables(true);
-
-		//HGUIWidget modalGUI = modalSceneObject->addComponent<GUIWidget>(modalCamera->getViewport().get());
-		//modalGUI->setDepth(128);
-
-		//modalGUI->setSkin(EditorGUI::instance().getSkin());
-
-		//GUIArea* modalArea = GUIArea::createStretchedXY(*modalGUI, 0, 0, 0, 0, 500);
-		//GUIButton* modalButton = GUIButton::create(*modalGUI, HString(L"Close"));
-		//modalButton->onClick.connect(std::bind(&EditorApplication::closeModalWindow, modalWindow, modalSceneObject));
-
-		//modalArea->getLayout().addElement(modalButton);
-
-		/************************************************************************/
-		/* 							END DEBUG CODE                      		*/
-		/************************************************************************/
-
-		DbgEditorWidget1::open(); // DEBUG ONLY
-		DbgEditorWidget2::open(); // DEBUG ONLY
-	}
-
-	void EditorApplication::startUp(RenderSystemPlugin renderSystemPlugin)
-	{
-		CoreApplication::startUp<EditorApplication>(renderSystemPlugin);
-	}
-
-	void EditorApplication::closeModalWindow(RenderWindowPtr window, HSceneObject sceneObject)
-	{
-		//sceneObject->destroy();
-		window->destroy();
-	}
-
-	void EditorApplication::update()
-	{
-		Application::update();
-
-		ProjectLibrary::instance().update();
-		EditorWindowManager::instance().update();	
-	}
-
-	bool EditorApplication::isProjectLoaded() const
-	{
-		return true; // TODO - DEBUG ONLY
-	}
-
-	const Path& EditorApplication::getActiveProjectPath() const
-	{
-		static Path dummyProjectPath = L"D:\\DummyBansheeProject\\";
-
-		return dummyProjectPath;
-	}
-
-	EditorWidgetLayoutPtr EditorApplication::loadWidgetLayout()
-	{
-		Path layoutPath = getActiveProjectPath();
-		layoutPath.append(WIDGET_LAYOUT_PATH);
-
-		if(FileSystem::exists(layoutPath))
-		{
-			FileSerializer fs;
-			return std::static_pointer_cast<EditorWidgetLayout>(fs.decode(layoutPath));
-		}
-
-		return nullptr;
-	}
-
-	void EditorApplication::saveWidgetLayout(const EditorWidgetLayoutPtr& layout)
-	{
-		Path layoutPath = getActiveProjectPath();
-		layoutPath.append(WIDGET_LAYOUT_PATH);
-
-		FileSerializer fs;
-		fs.encode(layout.get(), layoutPath);
-	}
-}

+ 0 - 9
BansheeEditor/Source/BsEditorCommand.cpp

@@ -1,9 +0,0 @@
-#include "BsEditorCommand.h"
-
-namespace BansheeEngine
-{
-	void EditorCommand::destroy(EditorCommand* command)
-	{
-		bs_delete(command);
-	}
-}

+ 0 - 823
BansheeEditor/Source/BsEditorGUI.cpp

@@ -1,823 +0,0 @@
-#include "BsEditorGUI.h"
-#include "BsGUIElementStyle.h"
-
-#include "BsGUILabel.h"
-#include "BsGUIButton.h"
-#include "BsGUIInputBox.h"
-#include "BsGUIToggle.h"
-#include "BsGUIColor.h"
-#include "BsTextSprite.h"
-#include "BsSpriteTexture.h"
-#include "BsGUITreeViewEditBox.h"
-
-#include "BsFont.h"
-#include "BsFontImportOptions.h"
-#include "BsImporter.h"
-#include "BsRTTIType.h"
-#include "BsFileSystem.h"
-
-namespace BansheeEngine
-{
-	const WString EditorGUI::DefaultFontPath = L"arial.ttf";
-	const UINT32 EditorGUI::DefaultFontSize = 10;
-
-	const Path EditorGUI::DefaultFolder = L"..\\..\\..\\..\\Data\\Editor\\Skin\\";
-
-	const WString EditorGUI::WindowBackgroundTexture = L"WindowBgTile.psd";
-
-	const WString EditorGUI::ButtonNormalTex = L"ButtonNormal.psd";
-	const WString EditorGUI::ButtonHoverTex = L"ButtonHover.psd";
-	const WString EditorGUI::ButtonActiveTex = L"ButtonActive.psd";
-
-	const WString EditorGUI::ToggleNormalTex = L"ToggleNormal.psd";
-	const WString EditorGUI::ToggleHoverTex = L"ToggleHover.psd";
-	const WString EditorGUI::ToggleActiveTex = L"ToggleActive.psd";
-	const WString EditorGUI::ToggleNormalOnTex = L"ToggleOnNormal.psd";
-	const WString EditorGUI::ToggleHoverOnTex = L"ToggleOnHover.psd";
-	const WString EditorGUI::ToggleActiveOnTex = L"ToggleOnActive.psd";
-
-	const WString EditorGUI::ObjectDropBtnNormalTex = L"ObjectFieldDropNormal.psd";
-	const WString EditorGUI::ObjectDropBtnNormalOnTex = L"ObjectFieldDropNormalOn.psd";
-	const WString EditorGUI::ObjectClearBtnNormalTex = L"ObjectFieldBtnNormal.psd";
-	const WString EditorGUI::ObjectClearBtnHoverTex = L"ObjectFieldBtnHover.psd";
-	const WString EditorGUI::ObjectClearBtnActiveTex = L"ObjectFieldBtnActive.psd";
-
-	const WString EditorGUI::FoldoutOpenNormalTex = L"FoldoutOpenNormal.psd";
-	const WString EditorGUI::FoldoutOpenHoverTex = L"FoldoutOpenHover.psd";
-	const WString EditorGUI::FoldoutClosedNormalTex = L"FoldoutClosedNormal.psd";
-	const WString EditorGUI::FoldoutClosedHoverTex = L"FoldoutClosedHover.psd";
-	const WString EditorGUI::FoldoutBackgroundTex = L"FoldoutBackground.psd";
-
-	const WString EditorGUI::WindowFrameNormal = L"WindowFrameNormal.psd";
-	const WString EditorGUI::WindowFrameFocused = L"WindowFrameFocused.psd";
-
-	const WString EditorGUI::WindowTitleBarBg = L"WindowTitleBarBg.psd";
-
-	const WString EditorGUI::WindowCloseButtonNormal = L"WindowCloseBtnNormal.psd";
-	const WString EditorGUI::WindowCloseButtonHover = L"WindowCloseBtnHover.psd";
-
-	const WString EditorGUI::WindowMinButtonNormal = L"WindowMaxBtnNormal.psd";
-	const WString EditorGUI::WindowMinButtonHover = L"WindowMaxBtnHover.psd";
-
-	const WString EditorGUI::WindowMaxButtonNormal = L"WindowMinBtnNormal.psd";
-	const WString EditorGUI::WindowMaxButtonHover = L"WindowMinBtnHover.psd";
-
-	const WString EditorGUI::TabbedBarBtnNormal = L"TabbedButtonNormal.psd";
-	const WString EditorGUI::TabbedBarBtnActive = L"TabbedButtonActive.psd";
-
-	const WString EditorGUI::InputBoxNormalTex = L"InputBoxNormal.psd";
-	const WString EditorGUI::InputBoxHoverTex = L"InputBoxHover.psd";
-	const WString EditorGUI::InputBoxFocusedTex = L"InputBoxFocused.psd";
-
-	const WString EditorGUI::ScrollBarUpNormalTex = L"ScrollBarUpNormal.psd";
-	const WString EditorGUI::ScrollBarUpHoverTex = L"ScrollBarUpHover.psd";
-	const WString EditorGUI::ScrollBarUpActiveTex = L"ScrollBarUpActive.psd";
-
-	const WString EditorGUI::ScrollBarDownNormalTex = L"ScrollBarDownNormal.psd";
-	const WString EditorGUI::ScrollBarDownHoverTex = L"ScrollBarDownHover.psd";
-	const WString EditorGUI::ScrollBarDownActiveTex = L"ScrollBarDownActive.psd";
-
-	const WString EditorGUI::ScrollBarLeftNormalTex = L"ScrollBarLeftNormal.psd";
-	const WString EditorGUI::ScrollBarLeftHoverTex = L"ScrollBarLeftHover.psd";
-	const WString EditorGUI::ScrollBarLeftActiveTex = L"ScrollBarLeftActive.psd";
-
-	const WString EditorGUI::ScrollBarRightNormalTex = L"ScrollBarRightNormal.psd";
-	const WString EditorGUI::ScrollBarRightHoverTex = L"ScrollBarRightHover.psd";
-	const WString EditorGUI::ScrollBarRightActiveTex = L"ScrollBarRightActive.psd";
-
-	const WString EditorGUI::ScrollBarHandleHorzNormalTex = L"ScrollBarHorzHandleNormal.psd";
-	const WString EditorGUI::ScrollBarHandleHorzHoverTex = L"ScrollBarHorzHandleHover.psd";
-	const WString EditorGUI::ScrollBarHandleHorzActiveTex = L"ScrollBarHorzHandleActive.psd";
-
-	const WString EditorGUI::ScrollBarHandleVertNormalTex = L"ScrollBarVertHandleNormal.psd";
-	const WString EditorGUI::ScrollBarHandleVertHoverTex = L"ScrollBarVertHandleHover.psd";
-	const WString EditorGUI::ScrollBarHandleVertActiveTex = L"ScrollBarVertHandleActive.psd";
-
-	const WString EditorGUI::DropDownBtnNormalTex = L"DropDownNormal.psd";
-	const WString EditorGUI::DropDownBtnHoverTex = L"DropDownHover.psd";
-
-	const WString EditorGUI::DropDownBoxBgTex = L"DropDownBoxBg.psd";
-	const WString EditorGUI::DropDownBoxEntryNormalTex = L"DropDownButtonNormal.psd";
-	const WString EditorGUI::DropDownBoxEntryHoverTex = L"DropDownButtonHover.psd";
-
-	const WString EditorGUI::DropDownBoxBtnUpNormalTex = L"DropDownBoxBtnUpNormal.psd";
-	const WString EditorGUI::DropDownBoxBtnUpHoverTex = L"DropDownBoxBtnUpHover.psd";
-
-	const WString EditorGUI::DropDownBoxBtnDownNormalTex = L"DropDownBoxBtnDownNormal.psd";
-	const WString EditorGUI::DropDownBoxBtnDownHoverTex = L"DropDownBoxBtnDownHover.psd";
-
-	const WString EditorGUI::DropDownBoxEntryExpNormalTex = L"DropDownExpNormal.psd";
-	const WString EditorGUI::DropDownBoxEntryExpHoverTex = L"DropDownExpHover.psd";
-
-	const WString EditorGUI::DropDownSeparatorTex = L"DropDownSeparator.psd";
-
-	const WString EditorGUI::DropDownBoxBtnUpArrowTex = L"DropDownBoxBtnUpArrow.psd";
-	const WString EditorGUI::DropDownBoxBtnDownArrowTex = L"DropDownBoxBtnDownArrow.psd";
-
-	const WString EditorGUI::ScrollBarBgTex = L"ScrollBarBg.psd";
-
-	const WString EditorGUI::MenuBarBgTex = L"MenuBarBg.psd";
-
-	const WString EditorGUI::MenuBarBtnNormalTex = L"MenuBarButtonNormal.psd";
-	const WString EditorGUI::MenuBarBtnHoverTex = L"MenuBarButtonHover.psd";
-
-	const WString EditorGUI::MenuBarBansheeLogoTex = L"MenuBarBansheeLogo.psd";
-
-	const WString EditorGUI::DockSliderNormalTex = L"DockSliderBtn.psd";
-
-	const WString EditorGUI::TreeViewExpandButtonOffNormal = L"TreeViewExpandButtonOffNormal.psd";
-	const WString EditorGUI::TreeViewExpandButtonOffHover = L"TreeViewExpandButtonOffHover.psd";
-	const WString EditorGUI::TreeViewExpandButtonOnNormal = L"TreeViewExpandButtonOnNormal.psd";
-	const WString EditorGUI::TreeViewExpandButtonOnHover = L"TreeViewExpandButtonOnHover.psd";
-
-	const WString EditorGUI::TreeViewSelectionBackground = L"TreeViewSelectionBackground.psd";
-	const WString EditorGUI::TreeViewEditBox = L"TreeViewEditBox.psd";
-	const WString EditorGUI::TreeViewElementHighlight = L"TreeViewElementHighlight.psd";
-	const WString EditorGUI::TreeViewElementSepHighlight = L"TreeViewElementSepHighlight.psd";
-
-	EditorGUI::EditorGUI()
-	{
-		// TODO - Normally I want to load this from some file
-
-		// Label
-		// TODO - Instead of importing font every time, try to save a resource and then just load it?
-		HFont font;
-
-		{
-			Path fontPath = DefaultFolder;
-			fontPath.append(DefaultFontPath);
-
-			ImportOptionsPtr fontImportOptions = Importer::instance().createImportOptions(fontPath);
-			if(rtti_is_of_type<FontImportOptions>(fontImportOptions))
-			{
-				FontImportOptions* importOptions = static_cast<FontImportOptions*>(fontImportOptions.get());
-
-				Vector<BansheeEngine::UINT32> fontSizes;
-				fontSizes.push_back(DefaultFontSize);
-				importOptions->setFontSizes(fontSizes);
-				importOptions->setAntialiasing(false);
-			}
-
-			font = Importer::instance().import(fontPath, fontImportOptions);
-		}
-
-		GUIElementStyle labelStyle;
-		labelStyle.font = font;
-		labelStyle.fontSize = DefaultFontSize;
-		labelStyle.fixedWidth = false;
-		labelStyle.fixedHeight = true;
-		labelStyle.height = 11;
-		labelStyle.minWidth = 10;
-
-		mSkin.setStyle(GUILabel::getGUITypeName(), labelStyle);
-
-		// Window frame
-		GUIElementStyle windowFrameStyle;
-		windowFrameStyle.normal.texture = getTexture(WindowFrameNormal);
-		windowFrameStyle.focused.texture = getTexture(WindowFrameFocused);
-		windowFrameStyle.border.left = 1;
-		windowFrameStyle.border.right = 1;
-		windowFrameStyle.border.top = 1;
-		windowFrameStyle.border.bottom = 1;
-
-		mSkin.setStyle("WindowFrame", windowFrameStyle);
-
-		// Button
-		GUIElementStyle buttonStyle;
-		buttonStyle.normal.texture = getTexture(ButtonNormalTex);
-		buttonStyle.hover.texture = getTexture(ButtonHoverTex);
-		buttonStyle.active.texture = getTexture(ButtonActiveTex);
-		buttonStyle.border.left = 6;
-		buttonStyle.border.right = 6;
-		buttonStyle.border.top = 6;
-		buttonStyle.border.bottom = 6;
-		buttonStyle.contentOffset.left = 3;
-		buttonStyle.contentOffset.right = 3;
-		buttonStyle.fixedHeight = true;
-		buttonStyle.height = 15;
-		buttonStyle.minWidth = 50;
-		buttonStyle.font = font;
-		buttonStyle.fontSize = DefaultFontSize;
-		buttonStyle.textHorzAlign = THA_Center;
-		buttonStyle.textVertAlign = TVA_Center;
-
-		mSkin.setStyle(GUIButton::getGUITypeName(), buttonStyle);
-
-		// Toggle
-		GUIElementStyle toggleStyle;
-		toggleStyle.normal.texture = getTexture(ToggleNormalTex);
-		toggleStyle.hover.texture = getTexture(ToggleHoverTex);
-		toggleStyle.active.texture = getTexture(ToggleActiveTex);
-		toggleStyle.normalOn.texture = getTexture(ToggleNormalOnTex);
-		toggleStyle.hoverOn.texture = getTexture(ToggleHoverOnTex);
-		toggleStyle.activeOn.texture = getTexture(ToggleActiveOnTex);
-		toggleStyle.fixedHeight = true;
-		toggleStyle.fixedWidth = true;
-		toggleStyle.height = 15;
-		toggleStyle.width = 15;
-
-		mSkin.setStyle(GUIToggle::getGUITypeName(), toggleStyle);
-
-		// Color
-		GUIElementStyle colorStyle;
-		colorStyle.margins.left = 2;
-		colorStyle.margins.right = 2;
-		colorStyle.margins.top = 2;
-		colorStyle.margins.bottom = 2;
-		colorStyle.fixedHeight = true;
-		colorStyle.height = 10;
-		colorStyle.minWidth = 10;
-
-		mSkin.setStyle(GUIColor::getGUITypeName(), colorStyle);
-
-		// Window background texture
-		GUIElementStyle windowBgStyle;
-		windowBgStyle.normal.texture = getTexture(WindowBackgroundTexture);
-
-		mSkin.setStyle("WindowBackground", windowBgStyle);
-
-		// Window title bar background
-		GUIElementStyle titleBarBgStyle;
-		titleBarBgStyle.normal.texture = getTexture(WindowTitleBarBg);
-		titleBarBgStyle.fixedHeight = true;
-		titleBarBgStyle.height = 13;
-
-		mSkin.setStyle("TitleBarBackground", titleBarBgStyle);
-
-		// Tabbed title bar tab button
-		GUIElementStyle tabbedBarButton;
-		tabbedBarButton.normal.texture = getTexture(TabbedBarBtnNormal);
-		tabbedBarButton.hover.texture = getTexture(TabbedBarBtnActive);
-		tabbedBarButton.active.texture = tabbedBarButton.hover.texture;
-		tabbedBarButton.normalOn.texture = tabbedBarButton.hover.texture;
-		tabbedBarButton.hoverOn.texture = tabbedBarButton.hover.texture;
-		tabbedBarButton.activeOn.texture = tabbedBarButton.hover.texture;
-		tabbedBarButton.fixedHeight = true;
-		tabbedBarButton.height = 13;
-		tabbedBarButton.minWidth = 10;
-		tabbedBarButton.maxWidth = 110;
-		tabbedBarButton.font = font;
-		tabbedBarButton.fontSize = DefaultFontSize;
-		tabbedBarButton.textHorzAlign = THA_Center;
-		tabbedBarButton.textVertAlign = TVA_Center;
-
-		mSkin.setStyle("TabbedBarBtn", tabbedBarButton);
-
-		// Tabbed title bar drag/drop button
-		GUIElementStyle tabbedBarDropButton;
-		tabbedBarDropButton.fixedHeight = true;
-		tabbedBarDropButton.fixedWidth = true;
-		tabbedBarDropButton.height = 13;
-		tabbedBarDropButton.width = 6;
-
-		mSkin.setStyle("TabbedBarDropArea", tabbedBarDropButton);
-
-		// Window minimize button
-		GUIElementStyle winMinButtonStyle;
-		winMinButtonStyle.normal.texture = getTexture(WindowMinButtonNormal);
-		winMinButtonStyle.hover.texture = getTexture(WindowMinButtonHover);
-		winMinButtonStyle.active.texture = winMinButtonStyle.hover.texture;
-		winMinButtonStyle.fixedHeight = true;
-		winMinButtonStyle.fixedWidth = true;
-		winMinButtonStyle.height = 7;
-		winMinButtonStyle.width = 8;
-
-		mSkin.setStyle("WinMinimizeBtn", winMinButtonStyle);
-
-		// Window maximize button
-		GUIElementStyle winMaxButtonStyle;
-		winMaxButtonStyle.normal.texture = getTexture(WindowMaxButtonNormal);
-		winMaxButtonStyle.hover.texture = getTexture(WindowMaxButtonHover);
-		winMaxButtonStyle.active.texture = winMaxButtonStyle.hover.texture;
-		winMaxButtonStyle.fixedHeight = true;
-		winMaxButtonStyle.fixedWidth = true;
-		winMaxButtonStyle.height = 8;
-		winMaxButtonStyle.width = 8;
-
-		mSkin.setStyle("WinMaximizeBtn", winMaxButtonStyle);
-
-		// Window close button
-		GUIElementStyle winCloseButtonStyle;
-		winCloseButtonStyle.normal.texture = getTexture(WindowCloseButtonNormal);
-		winCloseButtonStyle.hover.texture = getTexture(WindowCloseButtonHover);
-		winCloseButtonStyle.active.texture = winCloseButtonStyle.hover.texture;
-		winCloseButtonStyle.fixedHeight = true;
-		winCloseButtonStyle.fixedWidth = true;
-		winCloseButtonStyle.height = 7;
-		winCloseButtonStyle.width = 8;
-
-		mSkin.setStyle("WinCloseBtn", winCloseButtonStyle);
-
-		// Input box
-		GUIElementStyle inputBoxStyle;
-		inputBoxStyle.normal.texture = getTexture(InputBoxNormalTex);
-		inputBoxStyle.hover.texture = getTexture(InputBoxHoverTex);
-		inputBoxStyle.focused.texture = getTexture(InputBoxFocusedTex);
-		inputBoxStyle.active.texture = inputBoxStyle.normal.texture;
-		inputBoxStyle.border.left = 1;
-		inputBoxStyle.border.right = 1;
-		inputBoxStyle.border.top = 1;
-		inputBoxStyle.border.bottom = 1;
-		inputBoxStyle.contentOffset.left = 3;
-		inputBoxStyle.contentOffset.right = 3;
-		inputBoxStyle.contentOffset.top = 2;
-		inputBoxStyle.contentOffset.bottom = 2;
-		inputBoxStyle.fixedHeight = true;
-		inputBoxStyle.height = 15;
-		inputBoxStyle.minWidth = 10;
-		inputBoxStyle.font = font;
-		inputBoxStyle.fontSize = DefaultFontSize;
-		inputBoxStyle.textHorzAlign = THA_Left;
-		inputBoxStyle.textVertAlign = TVA_Top;
-
-		mSkin.setStyle(GUIInputBox::getGUITypeName(), inputBoxStyle);
-
-		// Foldout
-		GUIElementStyle foldoutBtnStyle;
-		foldoutBtnStyle.normal.texture = getTexture(FoldoutClosedNormalTex);
-		foldoutBtnStyle.hover.texture = getTexture(FoldoutClosedHoverTex);
-		foldoutBtnStyle.active.texture = foldoutBtnStyle.hover.texture;
-		foldoutBtnStyle.normalOn.texture = getTexture(FoldoutOpenNormalTex);
-		foldoutBtnStyle.hoverOn.texture = getTexture(FoldoutOpenHoverTex);
-		foldoutBtnStyle.activeOn.texture = foldoutBtnStyle.hoverOn.texture;
-		foldoutBtnStyle.fixedHeight = true;
-		foldoutBtnStyle.fixedWidth = true;
-		foldoutBtnStyle.height = 8;
-		foldoutBtnStyle.width = 8;
-
-		mSkin.setStyle("FoldoutButton", foldoutBtnStyle);
-
-		GUIElementStyle foldoutBackgroundStyle;
-		foldoutBackgroundStyle.normal.texture = getTexture(FoldoutBackgroundTex);
-
-		mSkin.setStyle("FoldoutBackground", foldoutBackgroundStyle);
-
-		/************************************************************************/
-		/* 								SCROLL BAR                      		*/
-		/************************************************************************/
-
-		// Up button
-		GUIElementStyle scrollUpBtnStyle;
-		scrollUpBtnStyle.normal.texture = getTexture(ScrollBarUpNormalTex);
-		scrollUpBtnStyle.hover.texture = getTexture(ScrollBarUpHoverTex);
-		scrollUpBtnStyle.active.texture = getTexture(ScrollBarUpActiveTex);
-		scrollUpBtnStyle.fixedHeight = true;
-		scrollUpBtnStyle.fixedWidth = true;
-		scrollUpBtnStyle.height = 4;
-		scrollUpBtnStyle.width = 8;
-
-		mSkin.setStyle("ScrollUpBtn", scrollUpBtnStyle);
-
-		// Down button
-		GUIElementStyle scrollDownBtnStyle;
-		scrollDownBtnStyle.normal.texture = getTexture(ScrollBarDownNormalTex);
-		scrollDownBtnStyle.hover.texture = getTexture(ScrollBarDownHoverTex);
-		scrollDownBtnStyle.active.texture = getTexture(ScrollBarDownActiveTex);
-		scrollDownBtnStyle.fixedHeight = true;
-		scrollDownBtnStyle.fixedWidth = true;
-		scrollDownBtnStyle.height = 4;
-		scrollDownBtnStyle.width = 8;
-
-		mSkin.setStyle("ScrollDownBtn", scrollDownBtnStyle);
-
-		// Left button
-		GUIElementStyle scrollLeftBtnStyle;
-		scrollLeftBtnStyle.normal.texture = getTexture(ScrollBarLeftNormalTex);
-		scrollLeftBtnStyle.hover.texture = getTexture(ScrollBarLeftHoverTex);
-		scrollLeftBtnStyle.active.texture = getTexture(ScrollBarLeftActiveTex);
-		scrollLeftBtnStyle.fixedHeight = true;
-		scrollLeftBtnStyle.fixedWidth = true;
-		scrollLeftBtnStyle.height = 8;
-		scrollLeftBtnStyle.width = 4;
-
-		mSkin.setStyle("ScrollLeftBtn", scrollLeftBtnStyle);
-
-		// Right button
-		GUIElementStyle scrollRightBtnStyle;
-		scrollRightBtnStyle.normal.texture = getTexture(ScrollBarRightNormalTex);
-		scrollRightBtnStyle.hover.texture = getTexture(ScrollBarRightHoverTex);
-		scrollRightBtnStyle.active.texture = getTexture(ScrollBarRightActiveTex);
-		scrollRightBtnStyle.fixedHeight = true;
-		scrollRightBtnStyle.fixedWidth = true;
-		scrollRightBtnStyle.height = 8;
-		scrollRightBtnStyle.width = 4;
-
-		mSkin.setStyle("ScrollRightBtn", scrollRightBtnStyle);
-
-		// Horizontal handle
-		GUIElementStyle scrollBarHorzBtnStyle;
-		scrollBarHorzBtnStyle.normal.texture = getTexture(ScrollBarHandleHorzNormalTex);
-		scrollBarHorzBtnStyle.hover.texture = getTexture(ScrollBarHandleHorzHoverTex);
-		scrollBarHorzBtnStyle.active.texture = getTexture(ScrollBarHandleHorzActiveTex);
-		scrollBarHorzBtnStyle.fixedHeight = true;
-		scrollBarHorzBtnStyle.fixedWidth = true;
-		scrollBarHorzBtnStyle.height = 6;
-		scrollBarHorzBtnStyle.width = 4;
-
-		mSkin.setStyle("ScrollBarHorzBtn", scrollBarHorzBtnStyle);
-
-		// Vertical handle
-		GUIElementStyle scrollBarVertBtnStyle;
-		scrollBarVertBtnStyle.normal.texture = getTexture(ScrollBarHandleVertNormalTex);
-		scrollBarVertBtnStyle.hover.texture = getTexture(ScrollBarHandleVertHoverTex);
-		scrollBarVertBtnStyle.active.texture = getTexture(ScrollBarHandleVertActiveTex);
-		scrollBarVertBtnStyle.fixedHeight = true;
-		scrollBarVertBtnStyle.fixedWidth = true;
-		scrollBarVertBtnStyle.height = 4;
-		scrollBarVertBtnStyle.width = 6;
-
-		mSkin.setStyle("ScrollBarVertBtn", scrollBarVertBtnStyle);
-
-		HSpriteTexture scrollBarBgPtr = getTexture(ScrollBarBgTex);
-
-		// Vertical scroll bar
-		GUIElementStyle vertScrollBarStyle;
-		vertScrollBarStyle.normal.texture = scrollBarBgPtr;
-		vertScrollBarStyle.hover.texture = scrollBarBgPtr;
-		vertScrollBarStyle.active.texture = scrollBarBgPtr;
-		vertScrollBarStyle.fixedHeight = false;
-		vertScrollBarStyle.fixedWidth = true;
-		vertScrollBarStyle.minHeight = 16;
-		vertScrollBarStyle.width = 8;
-
-		mSkin.setStyle("ScrollBarVert", vertScrollBarStyle);
-
-		// Horizontal scroll bar
-		GUIElementStyle horzScrollBarStyle;
-		horzScrollBarStyle.normal.texture = scrollBarBgPtr;
-		horzScrollBarStyle.hover.texture = scrollBarBgPtr;
-		horzScrollBarStyle.active.texture = scrollBarBgPtr;
-		horzScrollBarStyle.fixedHeight = true;
-		horzScrollBarStyle.fixedWidth = false;
-		horzScrollBarStyle.minWidth = 16;
-		horzScrollBarStyle.height = 8;
-
-		mSkin.setStyle("ScrollBarHorz", horzScrollBarStyle);
-
-		/************************************************************************/
-		/* 								DROP DOWN BOX                      		*/
-		/************************************************************************/
-
-		// ListBox button
-		GUIElementStyle dropDownListStyle;
-		dropDownListStyle.normal.texture = getTexture(DropDownBtnNormalTex);
-		dropDownListStyle.hover.texture = getTexture(DropDownBtnHoverTex);
-		dropDownListStyle.active.texture = dropDownListStyle.hover.texture;
-		dropDownListStyle.normalOn.texture = dropDownListStyle.hover.texture;
-		dropDownListStyle.hoverOn.texture = dropDownListStyle.hover.texture;
-		dropDownListStyle.activeOn.texture = dropDownListStyle.hover.texture;
-		dropDownListStyle.fixedHeight = true;
-		dropDownListStyle.fixedWidth = false;
-		dropDownListStyle.height = 13;
-		dropDownListStyle.width = 30;
-		dropDownListStyle.contentOffset.left = 3;
-		dropDownListStyle.contentOffset.right = 11;
-		dropDownListStyle.contentOffset.top = 1;
-		dropDownListStyle.contentOffset.bottom = 1;
-		dropDownListStyle.border.left = 1;
-		dropDownListStyle.border.right = 10;
-		dropDownListStyle.border.top = 1;
-		dropDownListStyle.border.bottom = 1;
-		dropDownListStyle.font = font;
-		dropDownListStyle.fontSize = DefaultFontSize;
-		dropDownListStyle.textHorzAlign = THA_Left;
-		dropDownListStyle.textVertAlign = TVA_Top;
-
-		mSkin.setStyle("ListBox", dropDownListStyle);
-
-		// DropDown scroll up button arrow
-		HTexture dropDownBtnScrollUpArrow = getTexture(DropDownBoxBtnUpArrowTex);
-
-		GUIElementStyle dropDownScrollUpBtnArrowStyle;
-		dropDownScrollUpBtnArrowStyle.normal.texture = getTexture(DropDownBoxBtnUpArrowTex);
-		dropDownScrollUpBtnArrowStyle.hover.texture = dropDownScrollUpBtnArrowStyle.normal.texture;
-		dropDownScrollUpBtnArrowStyle.active.texture = dropDownScrollUpBtnArrowStyle.hover.texture;
-		dropDownScrollUpBtnArrowStyle.fixedHeight = true;
-		dropDownScrollUpBtnArrowStyle.fixedWidth = false;
-		dropDownScrollUpBtnArrowStyle.height = 7;
-		dropDownScrollUpBtnArrowStyle.width = 30;
-		dropDownScrollUpBtnArrowStyle.border.left = 1;
-		dropDownScrollUpBtnArrowStyle.border.right = 1;
-		dropDownScrollUpBtnArrowStyle.border.top = 1;
-		dropDownScrollUpBtnArrowStyle.border.bottom = 1;
-
-		mSkin.setStyle("ListBoxScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
-		mSkin.setStyle("MenuBarScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
-		mSkin.setStyle("ContextMenuScrollUpBtnArrow", dropDownScrollUpBtnArrowStyle);
-
-		// DropDown scroll up button
-		GUIElementStyle dropDownScrollUpBtnStyle;
-		dropDownScrollUpBtnStyle.normal.texture = getTexture(DropDownBoxBtnUpNormalTex);
-		dropDownScrollUpBtnStyle.hover.texture = getTexture(DropDownBoxBtnUpHoverTex);
-		dropDownScrollUpBtnStyle.active.texture = dropDownScrollUpBtnStyle.hover.texture;
-		dropDownScrollUpBtnStyle.fixedHeight = true;
-		dropDownScrollUpBtnStyle.fixedWidth = false;
-		dropDownScrollUpBtnStyle.height = 7;
-		dropDownScrollUpBtnStyle.width = 30;
-		dropDownScrollUpBtnStyle.border.left = 1;
-		dropDownScrollUpBtnStyle.border.right = 1;
-		dropDownScrollUpBtnStyle.border.top = 1;
-		dropDownScrollUpBtnStyle.border.bottom = 1;
-
-		mSkin.setStyle("ListBoxScrollUpBtn", dropDownScrollUpBtnStyle);
-		mSkin.setStyle("MenuBarScrollUpBtn", dropDownScrollUpBtnStyle);
-		mSkin.setStyle("ContextMenuScrollUpBtn", dropDownScrollUpBtnStyle);
-
-		// DropDown scroll down button arrow
-		GUIElementStyle dropDownScrollDownBtnArrowStyle;
-		dropDownScrollDownBtnArrowStyle.normal.texture = getTexture(DropDownBoxBtnDownArrowTex);
-		dropDownScrollDownBtnArrowStyle.hover.texture = dropDownScrollDownBtnArrowStyle.normal.texture;
-		dropDownScrollDownBtnArrowStyle.active.texture = dropDownScrollDownBtnArrowStyle.hover.texture;
-		dropDownScrollDownBtnArrowStyle.fixedHeight = true;
-		dropDownScrollDownBtnArrowStyle.fixedWidth = false;
-		dropDownScrollDownBtnArrowStyle.height = 7;
-		dropDownScrollDownBtnArrowStyle.width = 30;
-		dropDownScrollDownBtnArrowStyle.border.left = 1;
-		dropDownScrollDownBtnArrowStyle.border.right = 1;
-		dropDownScrollDownBtnArrowStyle.border.top = 1;
-		dropDownScrollDownBtnArrowStyle.border.bottom = 1;
-
-		mSkin.setStyle("ListBoxScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
-		mSkin.setStyle("MenuBarScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
-		mSkin.setStyle("ContextMenuScrollDownBtnArrow", dropDownScrollDownBtnArrowStyle);
-
-		// DropDown scroll down button
-		GUIElementStyle dropDownScrollDownBtnStyle;
-		dropDownScrollDownBtnStyle.normal.texture = getTexture(DropDownBoxBtnDownNormalTex);
-		dropDownScrollDownBtnStyle.hover.texture = getTexture(DropDownBoxBtnDownHoverTex);
-		dropDownScrollDownBtnStyle.active.texture = dropDownScrollDownBtnStyle.hover.texture;
-		dropDownScrollDownBtnStyle.fixedHeight = true;
-		dropDownScrollDownBtnStyle.fixedWidth = false;
-		dropDownScrollDownBtnStyle.height = 7;
-		dropDownScrollDownBtnStyle.width = 30;
-		dropDownScrollDownBtnStyle.border.left = 1;
-		dropDownScrollDownBtnStyle.border.right = 1;
-		dropDownScrollDownBtnStyle.border.top = 1;
-		dropDownScrollDownBtnStyle.border.bottom = 1;
-
-		mSkin.setStyle("ListBoxScrollDownBtn", dropDownScrollDownBtnStyle);
-		mSkin.setStyle("MenuBarScrollDownBtn", dropDownScrollDownBtnStyle);
-		mSkin.setStyle("ContextMenuScrollDownBtn", dropDownScrollDownBtnStyle);
-
-		// DropDown entry button
-		GUIElementStyle dropDownEntryBtnStyle;
-		dropDownEntryBtnStyle.normal.texture = getTexture(DropDownBoxEntryNormalTex);
-		dropDownEntryBtnStyle.hover.texture = getTexture(DropDownBoxEntryHoverTex);
-		dropDownEntryBtnStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
-		dropDownEntryBtnStyle.fixedHeight = true;
-		dropDownEntryBtnStyle.fixedWidth = false;
-		dropDownEntryBtnStyle.height = 14;
-		dropDownEntryBtnStyle.width = 30;
-		dropDownEntryBtnStyle.border.left = 1;
-		dropDownEntryBtnStyle.border.right = 1;
-		dropDownEntryBtnStyle.border.top = 1;
-		dropDownEntryBtnStyle.border.bottom = 1;
-		dropDownEntryBtnStyle.font = font;
-		dropDownEntryBtnStyle.fontSize = DefaultFontSize;
-		dropDownEntryBtnStyle.textHorzAlign = THA_Left;
-		dropDownEntryBtnStyle.textVertAlign = TVA_Top;
-
-		mSkin.setStyle("ListBoxEntryBtn", dropDownEntryBtnStyle);
-		mSkin.setStyle("MenuBarEntryBtn", dropDownEntryBtnStyle);
-		mSkin.setStyle("ContextMenuEntryBtn", dropDownEntryBtnStyle);
-
-		// DropDown entry button with expand
-		GUIElementStyle dropDownEntryExpBtnStyle;
-		dropDownEntryExpBtnStyle.normal.texture = getTexture(DropDownBoxEntryExpNormalTex);
-		dropDownEntryExpBtnStyle.hover.texture = getTexture(DropDownBoxEntryExpHoverTex);
-		dropDownEntryExpBtnStyle.active.texture = dropDownEntryExpBtnStyle.hover.texture;
-		dropDownEntryExpBtnStyle.fixedHeight = true;
-		dropDownEntryExpBtnStyle.fixedWidth = false;
-		dropDownEntryExpBtnStyle.height = 14;
-		dropDownEntryExpBtnStyle.width = 30;
-		dropDownEntryExpBtnStyle.border.left = 1;
-		dropDownEntryExpBtnStyle.border.right = 6;
-		dropDownEntryExpBtnStyle.border.top = 1;
-		dropDownEntryExpBtnStyle.border.bottom = 1;
-		dropDownEntryExpBtnStyle.font = font;
-		dropDownEntryExpBtnStyle.fontSize = DefaultFontSize;
-		dropDownEntryExpBtnStyle.textHorzAlign = THA_Left;
-		dropDownEntryExpBtnStyle.textVertAlign = TVA_Top;
-
-		mSkin.setStyle("ListBoxEntryExpBtn", dropDownEntryExpBtnStyle);
-		mSkin.setStyle("MenuBarEntryExpBtn", dropDownEntryExpBtnStyle);
-		mSkin.setStyle("ContextMenuEntryExpBtn", dropDownEntryExpBtnStyle);
-
-		// DropDown box frame
-		GUIElementStyle dropDownBoxStyle;
-		dropDownBoxStyle.normal.texture = getTexture(DropDownBoxBgTex);
-		dropDownBoxStyle.hover.texture = dropDownEntryBtnStyle.normal.texture;
-		dropDownBoxStyle.active.texture = dropDownEntryBtnStyle.hover.texture;
-		dropDownBoxStyle.fixedHeight = false;
-		dropDownBoxStyle.fixedWidth = false;
-		dropDownBoxStyle.border.left = 1;
-		dropDownBoxStyle.border.right = 1;
-		dropDownBoxStyle.border.top = 1;
-		dropDownBoxStyle.border.bottom = 1;
-		dropDownBoxStyle.margins.left = 1;
-		dropDownBoxStyle.margins.right = 1;
-		dropDownBoxStyle.margins.top = 1;
-		dropDownBoxStyle.margins.bottom = 1;
-
-		mSkin.setStyle("ListBoxFrame", dropDownBoxStyle);
-		mSkin.setStyle("MenuBarFrame", dropDownBoxStyle);
-		mSkin.setStyle("ContextMenuFrame", dropDownBoxStyle);
-
-		// Drop down separator
-		GUIElementStyle dropDownSeparatorStyle;
-		dropDownSeparatorStyle.normal.texture = getTexture(DropDownSeparatorTex);
-		dropDownSeparatorStyle.fixedHeight = true;
-		dropDownSeparatorStyle.fixedWidth = false;
-		dropDownSeparatorStyle.height = 3;
-		dropDownSeparatorStyle.width = 30;
-		dropDownSeparatorStyle.border.left = 1;
-		dropDownSeparatorStyle.border.right = 1;
-		dropDownSeparatorStyle.border.top = 1;
-		dropDownSeparatorStyle.border.bottom = 1;
-
-		mSkin.setStyle("ListBoxSeparator", dropDownSeparatorStyle);
-		mSkin.setStyle("MenuBarSeparator", dropDownSeparatorStyle);
-		mSkin.setStyle("ContextMenuSeparator", dropDownSeparatorStyle);
-
-		/************************************************************************/
-		/* 								MENU BAR	                     		*/
-		/************************************************************************/
-
-		// MenuBar background
-		GUIElementStyle menuBarBgStyle;
-		menuBarBgStyle.normal.texture = getTexture(MenuBarBgTex);
-		menuBarBgStyle.fixedHeight = false;
-		menuBarBgStyle.fixedWidth = false;
-		menuBarBgStyle.height = 4;
-		menuBarBgStyle.width = 4;
-
-		mSkin.setStyle("MenuBarBg", menuBarBgStyle);
-
-		// MenuBar Banshee logo
-		GUIElementStyle menuBarBansheeLogoStyle;
-		menuBarBansheeLogoStyle.normal.texture = getTexture(MenuBarBansheeLogoTex);
-		menuBarBansheeLogoStyle.fixedHeight = true;
-		menuBarBansheeLogoStyle.fixedWidth = true;
-		menuBarBansheeLogoStyle.height = 7;
-		menuBarBansheeLogoStyle.width = 51;
-
-		mSkin.setStyle("MenuBarBansheeLogo", menuBarBansheeLogoStyle);
-
-		// MenuBar button
-		GUIElementStyle menuBarBtnStyle;
-		menuBarBtnStyle.normal.texture = getTexture(MenuBarBtnNormalTex);
-		menuBarBtnStyle.hover.texture = getTexture(MenuBarBtnHoverTex);
-		menuBarBtnStyle.active.texture = menuBarBtnStyle.hover.texture;
-		menuBarBtnStyle.normalOn.texture = menuBarBtnStyle.hover.texture;
-		menuBarBtnStyle.hoverOn.texture = menuBarBtnStyle.hover.texture;
-		menuBarBtnStyle.activeOn.texture = menuBarBtnStyle.hover.texture;
-		menuBarBtnStyle.fixedHeight = true;
-		menuBarBtnStyle.fixedWidth = false;
-		menuBarBtnStyle.height = 15;
-		menuBarBtnStyle.width = 4;
-		menuBarBtnStyle.margins.left = 2;
-		menuBarBtnStyle.margins.right = 2;
-		menuBarBtnStyle.margins.top = 2;
-		menuBarBtnStyle.margins.bottom = 2;
-		menuBarBtnStyle.font = font;
-		menuBarBtnStyle.fontSize = DefaultFontSize;
-		menuBarBtnStyle.textHorzAlign = THA_Left;
-		menuBarBtnStyle.textVertAlign = TVA_Top;
-
-		mSkin.setStyle("MenuBarBtn", menuBarBtnStyle);
-
-		/************************************************************************/
-		/* 								DOCK SLIDER	                     		*/
-		/************************************************************************/
-
-		GUIElementStyle dockSliderBtnStyle;
-		dockSliderBtnStyle.normal.texture = getTexture(DockSliderNormalTex);
-		dockSliderBtnStyle.fixedHeight = false;
-		dockSliderBtnStyle.fixedWidth = false;
-		dockSliderBtnStyle.height = 2;
-		dockSliderBtnStyle.width = 2;
-
-		mSkin.setStyle("DockSliderBtn", dockSliderBtnStyle);
-
-		/************************************************************************/
-		/* 								TREE VIEW	                     		*/
-		/************************************************************************/
-
-		// Expand button
-		GUIElementStyle treeViewExpandButtonStyle;
-		treeViewExpandButtonStyle.normal.texture = getTexture(TreeViewExpandButtonOffNormal);
-		treeViewExpandButtonStyle.hover.texture = getTexture(TreeViewExpandButtonOffHover);
-		treeViewExpandButtonStyle.active.texture = treeViewExpandButtonStyle.hover.texture;
-		treeViewExpandButtonStyle.normalOn.texture = getTexture(TreeViewExpandButtonOnNormal);
-		treeViewExpandButtonStyle.hoverOn.texture = getTexture(TreeViewExpandButtonOnHover);
-		treeViewExpandButtonStyle.activeOn.texture = treeViewExpandButtonStyle.hoverOn.texture;
-		treeViewExpandButtonStyle.margins.left = 4;
-		treeViewExpandButtonStyle.margins.right = 4;
-		treeViewExpandButtonStyle.margins.top = 5;
-		treeViewExpandButtonStyle.margins.bottom = 4;
-		treeViewExpandButtonStyle.fixedHeight = true;
-		treeViewExpandButtonStyle.fixedWidth = true;
-		treeViewExpandButtonStyle.height = 16;
-		treeViewExpandButtonStyle.width = 16;
-
-		mSkin.setStyle("TreeViewFoldoutBtn", treeViewExpandButtonStyle);
-
-		// Entry
-		GUIElementStyle treeViewEntryStyle;
-		treeViewEntryStyle.font = font;
-		treeViewEntryStyle.fontSize = DefaultFontSize;
-		treeViewEntryStyle.fixedWidth = false;
-		treeViewEntryStyle.fixedHeight = true;
-		treeViewEntryStyle.height = 16;
-		treeViewEntryStyle.minWidth = 10;
-
-		mSkin.setStyle("TreeViewElementBtn", treeViewEntryStyle);
-
-		// Selection background
-		GUIElementStyle treeViewSelBackgroundStyle;
-		treeViewSelBackgroundStyle.normal.texture = getTexture(TreeViewSelectionBackground);
-		treeViewSelBackgroundStyle.fixedHeight = false;
-		treeViewSelBackgroundStyle.fixedWidth = false;
-		treeViewSelBackgroundStyle.height = 2;
-		treeViewSelBackgroundStyle.width = 2;
-
-		mSkin.setStyle("TreeViewSelectionBackground", treeViewSelBackgroundStyle);
-
-		// Edit box
-		GUIElementStyle treeViewEditBox;
-		treeViewEditBox.normal.texture = getTexture(TreeViewEditBox);
-		treeViewEditBox.hover.texture = treeViewEditBox.normal.texture;
-		treeViewEditBox.focused.texture = treeViewEditBox.normal.texture;
-		treeViewEditBox.active.texture = treeViewEditBox.normal.texture;
-		treeViewEditBox.border.left = 1;
-		treeViewEditBox.border.right = 1;
-		treeViewEditBox.border.top = 1;
-		treeViewEditBox.border.bottom = 1;
-		treeViewEditBox.margins.left = 1;
-		treeViewEditBox.margins.right = 1;
-		treeViewEditBox.margins.top = 1;
-		treeViewEditBox.margins.bottom = 1;
-		treeViewEditBox.fixedHeight = true;
-		treeViewEditBox.height = 13;
-		treeViewEditBox.minWidth = 10;
-		treeViewEditBox.font = font;
-		treeViewEditBox.fontSize = DefaultFontSize;
-		treeViewEditBox.textHorzAlign = THA_Left;
-		treeViewEditBox.textVertAlign = TVA_Top;
-
-		mSkin.setStyle(GUITreeViewEditBox::getGUITypeName(), treeViewEditBox);
-
-		// Element highlight
-		GUIElementStyle treeViewElementHighlight;
-		treeViewElementHighlight.normal.texture = getTexture(TreeViewElementHighlight);
-		treeViewElementHighlight.border.left = 1;
-		treeViewElementHighlight.border.right = 1;
-		treeViewElementHighlight.border.top = 1;
-		treeViewElementHighlight.border.bottom = 1;
-
-		mSkin.setStyle("TreeViewElementHighlight", treeViewElementHighlight);
-
-		// Element separator highlight
-		GUIElementStyle treeViewElementSepHighlight;
-		treeViewElementSepHighlight.normal.texture = getTexture(TreeViewElementSepHighlight);
-		treeViewElementSepHighlight.border.left = 1;
-		treeViewElementSepHighlight.border.right = 1;
-		treeViewElementSepHighlight.border.top = 1;
-		treeViewElementSepHighlight.border.bottom = 1;
-
-		mSkin.setStyle("TreeViewElementSepHighlight", treeViewElementSepHighlight);
-	
-		/************************************************************************/
-		/* 							OBJECT DROP FIELD                      		*/
-		/************************************************************************/
-		GUIElementStyle objectDropStyle;
-		objectDropStyle.normal.texture = getTexture(ObjectDropBtnNormalTex);
-		objectDropStyle.normalOn.texture = getTexture(ObjectDropBtnNormalOnTex);
-		objectDropStyle.fixedHeight = true;
-		objectDropStyle.height = 15;
-		objectDropStyle.minWidth = 50;
-		objectDropStyle.font = font;
-		objectDropStyle.fontSize = DefaultFontSize;
-		objectDropStyle.textHorzAlign = THA_Center;
-		objectDropStyle.textVertAlign = TVA_Center;
-
-		mSkin.setStyle("DropButton", objectDropStyle);
-
-		GUIElementStyle objectClearBtnStyle;
-		objectClearBtnStyle.normal.texture = getTexture(ObjectClearBtnNormalTex);
-		objectClearBtnStyle.hover.texture = getTexture(ObjectClearBtnHoverTex);
-		objectClearBtnStyle.active.texture = getTexture(ObjectClearBtnActiveTex);
-		objectClearBtnStyle.fixedHeight = true;
-		objectClearBtnStyle.fixedWidth = true;
-		objectClearBtnStyle.height = 15;
-		objectClearBtnStyle.width = 13;
-
-		mSkin.setStyle("ObjectClearButton", objectClearBtnStyle);
-
-	}
-
-	HSpriteTexture EditorGUI::getTexture(const WString& name)
-	{
-		return SpriteTexture::create(static_resource_cast<Texture>(Importer::instance().import(FileSystem::getWorkingDirectoryPath().append(DefaultFolder).append(name))));
-	}
-}

+ 0 - 99
BansheeEditor/Source/BsEditorWidget.cpp

@@ -1,99 +0,0 @@
-#include "BsEditorWidget.h"
-#include "BsGUIManager.h"
-#include "BsGUIWidget.h"
-#include "BsGUITexture.h"
-#include "BsGUISkin.h"
-#include "BsGUILayout.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIArea.h"
-#include "BsEditorWidgetContainer.h"
-#include "BsEditorWidgetManager.h"
-
-namespace BansheeEngine
-{
-	EditorWidgetBase::EditorWidgetBase(const HString& displayName, const String& name, EditorWidgetContainer& parentContainer)
-		:mDisplayName(displayName), mName(name), mParent(nullptr), mContent(nullptr), mX(0), mY(0), mWidth(0), mHeight(0)
-	{
-		parentContainer.add(*this);
-	}
-
-	EditorWidgetBase::~EditorWidgetBase()
-	{
-
-	}
-
-	void EditorWidgetBase::close()
-	{
-		EditorWidgetManager::instance().close(this);
-	}
-
-	void EditorWidgetBase::destroy(EditorWidgetBase* widget)
-	{
-		widget->~EditorWidgetBase();
-		bs_free(widget);
-	}
-
-	void EditorWidgetBase::_setPosition(INT32 x, INT32 y)
-	{
-		mX = x;
-		mY = y;
-
-		if(mContent != nullptr)
-			mContent->setPosition(x, y);
-
-		if(!onMoved.empty())
-			onMoved(x, y);
-	}
-
-	void EditorWidgetBase::_setSize(UINT32 width, UINT32 height)
-	{
-		mWidth = width;
-		mHeight = height;
-
-		if(mContent != nullptr)
-			mContent->setSize(width, height);
-
-		if(!onResized.empty())
-			onResized(width, height);
-	}
-
-	// Note: Must not be virtual as parent container uses it in constructor
-	void EditorWidgetBase::_changeParent(EditorWidgetContainer* parent)
-	{
-		if(mParent != parent) 
-		{
-			if(parent != nullptr)
-			{
-				if(mContent == nullptr)
-					mContent = GUIArea::create(parent->getParentWidget(), 0, 0, 0, 0, 10000);
-				else
-					mContent->changeParentWidget(&parent->getParentWidget());
-			}
-			else
-			{
-				if(mContent != nullptr)
-					mContent->changeParentWidget(nullptr);
-			}
-
-			mParent = parent;
-
-			if(!onParentChanged.empty())
-				onParentChanged(mParent);
-		}
-	}
-
-	void EditorWidgetBase::_disable()
-	{
-		mContent->disable();
-	}
-
-	void EditorWidgetBase::_enable()
-	{
-		mContent->enable();
-	}
-
-	GUIWidget& EditorWidgetBase::getParentWidget() const
-	{
-		return mParent->getParentWidget();
-	}
-}

+ 0 - 267
BansheeEditor/Source/BsEditorWidgetContainer.cpp

@@ -1,267 +0,0 @@
-#include "BsEditorWidgetContainer.h"
-#include "BsGUITabbedTitleBar.h"
-#include "BsEditorWidget.h"
-#include "BsDragAndDropManager.h"
-#include "BsEditorWindow.h"
-#include "BsGUIArea.h"
-#include "BsMath.h"
-#include "BsInput.h"
-#include "BsGUIWidget.h"
-#include "BsGUILayout.h"
-#include "BsCursor.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const UINT32 EditorWidgetContainer::TitleBarHeight = 13;
-
-	EditorWidgetContainer::EditorWidgetContainer(GUIWidget* parent, RenderWindow* renderWindow, EditorWindow* parentEditorWindow)
-		:mParent(parent), mX(0), mY(0), mWidth(0), mHeight(0), mTitleBar(nullptr), mActiveWidget(-1),
-		mTitleBarArea(nullptr), mParentWindow(parentEditorWindow)
-	{
-		mTitleBarArea = GUIArea::create(*parent, 0, 0, 0, 0, 9900);
-
-		mTitleBar = GUITabbedTitleBar::create(renderWindow);
-		mTitleBar->onTabActivated.connect(std::bind(&EditorWidgetContainer::tabActivated, this, _1));
-		mTitleBar->onTabClosed.connect(std::bind(&EditorWidgetContainer::tabClosed, this, _1));
-		mTitleBar->onTabDraggedOff.connect(std::bind(&EditorWidgetContainer::tabDraggedOff, this, _1));
-		mTitleBar->onTabDraggedOn.connect(std::bind(&EditorWidgetContainer::tabDraggedOn, this, _1));
-
-		mTitleBarArea->getLayout().addElement(mTitleBar);
-	}
-
-	EditorWidgetContainer::~EditorWidgetContainer()
-	{
-		for(auto& widget : mWidgets)
-		{
-			widget.second->close();
-		}
-
-		GUIArea::destroy(mTitleBarArea);
-		GUIElement::destroy(mTitleBar);
-	}
-
-	void EditorWidgetContainer::add(EditorWidgetBase& widget)
-	{
-		insert((UINT32)mWidgets.size(), widget);
-	}
-
-	void EditorWidgetContainer::remove(EditorWidgetBase& widget)
-	{
-		removeInternal(widget);
-
-		if(!onWidgetClosed.empty())
-			onWidgetClosed();
-	}
-
-	void EditorWidgetContainer::removeInternal(EditorWidgetBase& widget)
-	{
-		INT32 tabIdx = 0;
-		for(auto& curWidget : mWidgets)
-		{
-			if(curWidget.second == &widget)
-			{
-				tabIdx = curWidget.first;
-				break;
-			}
-		}
-
-		if(tabIdx == -1)
-			return;
-
-		mWidgets.erase((UINT32)tabIdx);
-		mTitleBar->removeTab((UINT32)tabIdx);
-		widget._changeParent(nullptr);
-
-		if(tabIdx == mActiveWidget)
-		{
-			mActiveWidget = -1;
-			if(mTitleBar->getNumTabs() > 0)
-			{
-				setActiveWidget(mTitleBar->getTabIdx(0));
-			}
-		}
-	}
-
-	void EditorWidgetContainer::insert(UINT32 idx, EditorWidgetBase& widget)
-	{
-		if(contains(widget))
-			return;
-
-		idx = Math::clamp(idx, 0U, (UINT32)mWidgets.size());
-
-		UINT32 tabIdx = mTitleBar->insertTab(idx, widget.getDisplayName());
-		mWidgets[tabIdx] = &widget;
-		widget._changeParent(this);
-
-		if(mActiveWidget == -1)
-			setActiveWidget(mTitleBar->getTabIdx(mTitleBar->getNumTabs() - 1));
-		else
-			widget._disable();
-	}
-
-	bool EditorWidgetContainer::contains(EditorWidgetBase& widget)
-	{
-		for(auto& curWidget : mWidgets)
-		{
-			if(curWidget.second == &widget)
-				return true;
-		}
-
-		return false;
-	}
-
-	EditorWidgetBase* EditorWidgetContainer::getWidget(UINT32 idx) const
-	{
-		if(idx >= (UINT32)mWidgets.size())
-			return nullptr;
-
-		UINT32 tabIdx = mTitleBar->getTabIdx(idx);
-
-		auto iterFind = mWidgets.find(tabIdx);
-
-		if(iterFind != mWidgets.end())
-			return iterFind->second;
-
-		return nullptr;
-	}
-
-	void EditorWidgetContainer::setSize(UINT32 width, UINT32 height)
-	{
-		// TODO - Title bar is always TitleBarHeight size, so what happens when the container area is smaller than that?
-		mTitleBarArea->setSize(width, TitleBarHeight);
-
-		if(mActiveWidget >= 0)
-		{
-			EditorWidgetBase* activeWidgetPtr = mWidgets[mActiveWidget];
-			UINT32 contentHeight = (UINT32)std::max(0, (INT32)height - (INT32)TitleBarHeight);
-
-			activeWidgetPtr->_setSize(width, contentHeight);
-		}
-
-		mWidth = width;
-		mHeight = height;
-	}
-
-	void EditorWidgetContainer::setPosition(INT32 x, INT32 y)
-	{
-		mTitleBarArea->setPosition(x, y);
-
-		if(mActiveWidget >= 0)
-		{
-			EditorWidgetBase* activeWidgetPtr = mWidgets[mActiveWidget];
-
-			activeWidgetPtr->_setPosition(x, y + TitleBarHeight);
-		}
-
-		mX = x;
-		mY = y;
-	}
-
-	void EditorWidgetContainer::setActiveWidget(UINT32 idx)
-	{
-		if(mActiveWidget == idx)
-			return;
-
-		mActiveWidget = idx;
-
-		for(auto& curWidget : mWidgets)
-		{
-			if(curWidget.first != (UINT32)mActiveWidget)
-				curWidget.second->_disable();
-			else
-				curWidget.second->_enable();
-		}
-
-		mTitleBar->setActive(idx);
-
-		setPosition(mX, mY);
-		setSize(mWidth, mHeight);
-	}
-
-	void EditorWidgetContainer::tabActivated(UINT32 uniqueIdx)
-	{
-		setActiveWidget(uniqueIdx);
-	}
-
-	void EditorWidgetContainer::tabClosed(UINT32 uniqueIdx)
-	{
-		EditorWidgetBase* widget = mWidgets[uniqueIdx];
-		widget->close();
-
-		if(!onWidgetClosed.empty())
-			onWidgetClosed();
-	}
-
-	void EditorWidgetContainer::tabDraggedOff(UINT32 uniqueIdx)
-	{
-		EditorWidgetBase* widget = mWidgets[uniqueIdx];
-		removeInternal(*widget);
-
-		DragAndDropManager::instance().startDrag((UINT32)DragAndDropType::EditorWidget, (void*)widget, 
-			std::bind(&EditorWidgetContainer::tabDroppedCallback, _1), false);
-
-		if(!onWidgetClosed.empty())
-			onWidgetClosed();
-	}
-
-	void EditorWidgetContainer::tabDraggedOn(UINT32 seqIdx)
-	{
-#if BS_DEBUG_MODE
-		if(!DragAndDropManager::instance().isDragInProgress())
-			BS_EXCEPT(InternalErrorException, "Tab drag and drop reported but no drag in progress.");
-
-		if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-			BS_EXCEPT(InternalErrorException, "Tab drag and drop reported but drag type is invalid.");
-#endif
-
-		EditorWidgetBase* draggedWidget = static_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-
-		insert(seqIdx, *draggedWidget);
-		setActiveWidget(mTitleBar->getTabIdx(seqIdx));
-	}
-
-	void EditorWidgetContainer::tabDroppedCallback(bool wasDragProcessed)
-	{
-		if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-			return;
-
-		if(!wasDragProcessed)
-		{
-			EditorWidgetBase* draggedWidget = static_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-			EditorWindow* newWindow = EditorWindow::create();
-
-			newWindow->widgets().add(*draggedWidget);
-
-			Vector2I mousePos = Cursor::instance().getScreenPosition();
-			newWindow->setPosition(mousePos.x, mousePos.y);
-		}
-	}
-
-	RectI EditorWidgetContainer::getContentBounds() const
-	{
-		return RectI(mX, mY + TitleBarHeight, mWidth, (UINT32)std::max(0, (INT32)mHeight - (INT32)TitleBarHeight));
-	}
-
-	Vector<RectI> EditorWidgetContainer::getDraggableAreas() const
-	{
-		return mTitleBar->calcDraggableAreas(mX, mY, mWidth, TitleBarHeight);
-	}
-
-	void EditorWidgetContainer::_notifyWidgetDestroyed(EditorWidgetBase* widget)
-	{
-		for(auto& curWidget : mWidgets)
-		{
-			if(curWidget.second == widget)
-			{
-				removeInternal(*widget);
-
-				if(!onWidgetClosed.empty())
-					onWidgetClosed();
-
-				return;
-			}
-		}		
-	}
-}

+ 0 - 30
BansheeEditor/Source/BsEditorWidgetLayout.cpp

@@ -1,30 +0,0 @@
-#include "BsEditorWidgetLayout.h"
-#include "BsEditorWidgetLayoutRTTI.h"
-
-namespace BansheeEngine
-{
-	EditorWidgetLayout::Entry::Entry()
-		:isDocked(true), x(0), y(0), width(0), height(0)
-	{ }
-
-	EditorWidgetLayout::Entry::~Entry()
-	{ }
-
-	EditorWidgetLayout::EditorWidgetLayout(const DockManagerLayoutPtr& dockLayout)
-		:mDockLayout(dockLayout)
-	{ }
-
-	/************************************************************************/
-	/* 								RTTI		                     		*/
-	/************************************************************************/
-
-	RTTITypeBase* EditorWidgetLayout::getRTTIStatic()
-	{
-		return EditorWidgetLayoutRTTI::instance();
-	}
-
-	RTTITypeBase* EditorWidgetLayout::getRTTI() const
-	{
-		return EditorWidgetLayout::getRTTIStatic();
-	}
-}

+ 0 - 202
BansheeEditor/Source/BsEditorWidgetManager.cpp

@@ -1,202 +0,0 @@
-#include "BsEditorWidgetManager.h"
-#include "BsEditorWidget.h"
-#include "BsEditorWindow.h"
-#include "BsEditorWidgetContainer.h"
-#include "BsEditorWindowManager.h"
-#include "BsMainEditorWindow.h"
-#include "BsEditorWidgetLayout.h"
-#include "BsDockManager.h"
-#include "BsException.h"
-
-namespace BansheeEngine
-{
-	Stack<std::pair<String, std::function<EditorWidgetBase*(EditorWidgetContainer&)>>> EditorWidgetManager::QueuedCreateCallbacks;
-
-	EditorWidgetManager::EditorWidgetManager()
-	{
-		while(!QueuedCreateCallbacks.empty())
-		{
-			std::pair<String, std::function<EditorWidgetBase*(EditorWidgetContainer&)>> curElement = QueuedCreateCallbacks.top();
-			QueuedCreateCallbacks.pop();
-
-			registerWidget(curElement.first, curElement.second);
-		}
-	}
-
-	void EditorWidgetManager::registerWidget(const String& name, std::function<EditorWidgetBase*(EditorWidgetContainer&)> createCallback)
-	{
-		auto iterFind = mCreateCallbacks.find(name);
-
-		if(iterFind != mCreateCallbacks.end())
-			BS_EXCEPT(InvalidParametersException, "Widget with the same name is already registered. Name: \"" + name + "\"");
-
-		mCreateCallbacks[name] = createCallback;
-	}
-
-	EditorWidgetBase* EditorWidgetManager::open(const String& name)
-	{
-		auto iterFind = mActiveWidgets.find(name);
-
-		if(iterFind != mActiveWidgets.end())
-			return iterFind->second;
-
-		EditorWindow* window = EditorWindow::create();
-		EditorWidgetBase* newWidget = create(name, window->widgets());
-		if(newWidget == nullptr)
-		{
-			window->close();
-			return nullptr;
-		}
-
-		return newWidget;
-	}
-
-	void EditorWidgetManager::close(EditorWidgetBase* widget)
-	{
-		auto findIter = std::find_if(mActiveWidgets.begin(), mActiveWidgets.end(),
-			[&] (const std::pair<String, EditorWidgetBase*>& entry) { return entry.second == widget; });
-
-		if(findIter != mActiveWidgets.end())
-			mActiveWidgets.erase(findIter);
-
-		if(widget->mParent != nullptr)
-			widget->mParent->_notifyWidgetDestroyed(widget);
-
-		EditorWidgetBase::destroy(widget);
-	}
-
-	EditorWidgetBase* EditorWidgetManager::create(const String& name, EditorWidgetContainer& parentContainer)
-	{
-		auto iterFind = mActiveWidgets.find(name);
-
-		if(iterFind != mActiveWidgets.end())
-		{
-			EditorWidgetBase* existingWidget = iterFind->second;
-			if(existingWidget->_getParent() != nullptr && existingWidget->_getParent() != &parentContainer)
-				existingWidget->_getParent()->remove(*existingWidget);
-
-			if(existingWidget->_getParent() != &parentContainer)
-				parentContainer.add(*iterFind->second);
-
-			return iterFind->second;
-		}
-
-		auto iterFindCreate = mCreateCallbacks.find(name);
-		if(iterFindCreate == mCreateCallbacks.end())
-			return nullptr;
-
-		EditorWidgetBase* newWidget = mCreateCallbacks[name](parentContainer);
-		parentContainer.add(*newWidget);
-
-		if(newWidget != nullptr)
-			mActiveWidgets[name] = newWidget;
-
-		return newWidget;
-	}
-
-	EditorWidgetLayoutPtr EditorWidgetManager::getLayout() const
-	{
-		auto GetWidgetNamesInContainer = [&] (const EditorWidgetContainer* container)
-		{
-			Vector<String> widgetNames;
-			if(container != nullptr)
-			{
-				UINT32 numWidgets = container->getNumWidgets();
-
-				for(UINT32 i = 0; i < numWidgets; i++)
-				{
-					EditorWidgetBase* widget = container->getWidget(i);
-					widgetNames.push_back(widget->getName());
-				}				
-			}
-
-			return widgetNames;
-		};
-
-		MainEditorWindow* mainWindow = EditorWindowManager::instance().getMainWindow();
-		DockManager& dockManager = mainWindow->getDockManager();
-		EditorWidgetLayoutPtr layout = bs_shared_ptr<EditorWidgetLayout>(dockManager.getLayout());
-
-		Vector<EditorWidgetLayout::Entry>& layoutEntries = layout->getEntries();
-		UnorderedSet<EditorWidgetContainer*> widgetContainers;
-
-		for(auto& widget : mActiveWidgets)
-		{
-			widgetContainers.insert(widget.second->_getParent());
-		}
-
-		for(auto& widgetContainer : widgetContainers)
-		{
-			if(widgetContainer == nullptr)
-				continue;
-
-			layoutEntries.push_back(EditorWidgetLayout::Entry());
-			EditorWidgetLayout::Entry& entry = layoutEntries.back();
-
-			entry.widgetNames = GetWidgetNamesInContainer(widgetContainer);
-
-			EditorWindow* parentWindow = widgetContainer->getParentWindow();
-			entry.isDocked = parentWindow == nullptr;
-			
-			if(!entry.isDocked)
-			{
-				entry.x = parentWindow->getLeft();
-				entry.y = parentWindow->getTop();
-				entry.width = parentWindow->getWidth();
-				entry.height = parentWindow->getHeight();
-			}
-		}
-
-		return layout;
-	}
-
-	void EditorWidgetManager::setLayout(const EditorWidgetLayoutPtr& layout)
-	{
-		// Unparent all widgets
-		Vector<EditorWidgetBase*> unparentedWidgets;
-		for(auto& widget : mActiveWidgets)
-		{
-			if(widget.second->_getParent() != nullptr)
-				widget.second->_getParent()->remove(*(widget.second));
-
-			unparentedWidgets.push_back(widget.second);
-		}
-
-		// Restore floating widgets
-		for(auto& entry : layout->getEntries())
-		{
-			if(entry.isDocked)
-				continue;
-
-			EditorWindow* window = EditorWindow::create();
-			for(auto& widgetName : entry.widgetNames)
-			{
-				create(widgetName, window->widgets());
-			}
-
-			window->setPosition(entry.x, entry.y);
-			window->setSize(entry.width, entry.height);
-
-			if(window->widgets().getNumWidgets() == 0)
-				window->close();
-		}
-
-		// Restore docked widgets
-		MainEditorWindow* mainWindow = EditorWindowManager::instance().getMainWindow();
-		DockManager& dockManager = mainWindow->getDockManager();
-
-		dockManager.setLayout(layout->getDockLayout());
-
-		// Destroy any widgets that are no longer have parents
-		for(auto& widget : unparentedWidgets)
-		{
-			if(widget->_getParent() == nullptr)
-				widget->close();
-		}
-	}
-
-	void EditorWidgetManager::preRegisterWidget(const String& name, std::function<EditorWidgetBase*(EditorWidgetContainer&)> createCallback)
-	{
-		QueuedCreateCallbacks.push(std::pair<String, std::function<EditorWidgetBase*(EditorWidgetContainer&)>>(name, createCallback));
-	}
-}

+ 0 - 69
BansheeEditor/Source/BsEditorWindow.cpp

@@ -1,69 +0,0 @@
-#include "BsEditorWindow.h"
-#include "BsEditorWidgetContainer.h"
-#include "BsEditorWindowManager.h"
-#include "BsDragAndDropManager.h"
-
-namespace BansheeEngine
-{
-	EditorWindow::EditorWindow()
-		:EditorWindowBase(), mWidgets(bs_new<EditorWidgetContainer>(mGUI.get(), mRenderWindow.get(), this))
-	{
-		updateSize();
-		
-		mWidgets->onWidgetClosed.connect(std::bind(&EditorWindow::widgetRemoved, this));
-	}
-
-	EditorWindow::~EditorWindow()
-	{
-		bs_delete(mWidgets);
-	}
-
-	void EditorWindow::resized()
-	{
-		EditorWindowBase::resized();
-
-		updateSize();
-	}
-
-	void EditorWindow::updateSize()
-	{
-		mWidgets->setPosition(1, 1);
-
-		UINT32 widgetWidth = (UINT32)std::max(0, (INT32)getWidth() - 2);
-		UINT32 widgetHeight = (UINT32)std::max(0, (INT32)getHeight() - 2);
-
-		mWidgets->setSize(widgetWidth, widgetHeight);
-
-		Platform::setCaptionNonClientAreas(*mRenderWindow.get(), mWidgets->getDraggableAreas());
-	}
-
-	void EditorWindow::widgetRemoved()
-	{
-		if(mWidgets->getNumWidgets() == 0)
-		{
-			// HACK - If widget is being handled by drag and drop we don't want to
-			// destroy its parent window just yet because Windows doesn't approve of
-			// windows being destroyed while mouse is being held down (some events won't get
-			// fired). I should probably handle this at a lower level, in RenderWindowManager.
-			if(DragAndDropManager::instance().isDragInProgress() && DragAndDropManager::instance().getDragTypeId() == (UINT32)DragAndDropType::EditorWidget)
-			{
-				hide();
-
-				// Get notified when drag and drop is done
-				DragAndDropManager::instance().addDropCallback(std::bind(&EditorWindow::closeWindowDelayed, this));
-			}
-			else
-				close();
-		}
-	}
-
-	void EditorWindow::closeWindowDelayed()
-	{
-		close();
-	}
-
-	EditorWindow* EditorWindow::create()
-	{
-		return EditorWindowManager::instance().create();
-	}
-}

+ 0 - 111
BansheeEditor/Source/BsEditorWindowBase.cpp

@@ -1,111 +0,0 @@
-#include "BsEditorWindowBase.h"
-#include "BsCoreApplication.h"
-#include "BsCoreThread.h"
-#include "BsSceneObject.h"
-#include "BsRenderWindow.h"
-
-#include "BsEditorWindowManager.h"
-#include "BsCamera.h"
-#include "BsGUIWindowFrameWidget.h"
-#include "BsEditorGUI.h"
-
-namespace BansheeEngine
-{
-	EditorWindowBase::EditorWindowBase()
-		:mOwnsRenderWindow(true)
-	{
-		RENDER_WINDOW_DESC renderWindowDesc;
-		renderWindowDesc.videoMode = VideoMode(200, 200);
-		renderWindowDesc.title = "EditorWindow";
-		renderWindowDesc.fullscreen = false;
-		renderWindowDesc.border = WindowBorder::None;
-		renderWindowDesc.toolWindow = true;
-
-		mRenderWindow = RenderWindow::create(renderWindowDesc, gCoreApplication().getPrimaryWindow());
-
-		construct(mRenderWindow);
-	}
-
-	EditorWindowBase::EditorWindowBase(const RenderWindowPtr& renderWindow)
-		:mOwnsRenderWindow(false)
-	{
-		construct(renderWindow);
-	}
-
-	EditorWindowBase::~EditorWindowBase()
-	{
-		mResizedConn.disconnect();
-
-		if(mOwnsRenderWindow)
-			mRenderWindow->destroy();
-
-		mSceneObject->destroy();
-	}
-
-	void EditorWindowBase::initialize()
-	{
-		setPosition(0, 0);
-		setSize(200, 200);
-	}
-
-	void EditorWindowBase::close()
-	{
-		EditorWindowManager::instance().destroy(this);
-	}
-
-	void EditorWindowBase::hide()
-	{
-		gCoreAccessor().hideWindow(mRenderWindow);
-	}
-
-	void EditorWindowBase::construct(const RenderWindowPtr& renderWindow)
-	{
-		mRenderWindow = renderWindow;
-		mSceneObject = SceneObject::create("EditorWindow");
-
-		mCamera = mSceneObject->addComponent<Camera>(renderWindow, 0.0f, 0.0f, 1.0f, 1.0f);
-		mCamera->setNearClipDistance(5);
-		mCamera->setAspectRatio(1.0f);
-		mCamera->setIgnoreSceneRenderables(true);
-
-		mGUI = mSceneObject->addComponent<GUIWidget>(mCamera->getViewport().get());
-		mGUI->setDepth(128);
-
-		mGUI->setSkin(EditorGUI::instance().getSkin());
-
-		mWindowFrame = mSceneObject->addComponent<WindowFrameWidget>(mCamera->getViewport().get(), renderWindow.get(), EditorGUI::instance().getSkin());
-		mWindowFrame->setDepth(129);
-
-		mResizedConn = renderWindow->onResized.connect(std::bind(&EditorWindowBase::resized, this));
-	}
-
-	void EditorWindowBase::setPosition(INT32 x, INT32 y)
-	{
-		gCoreAccessor().moveWindow(mRenderWindow, x, y);
-	}
-
-	void EditorWindowBase::setSize(UINT32 width, UINT32 height)
-	{
-		gCoreAccessor().resizeWindow(mRenderWindow, width, height);
-	}
-
-	INT32 EditorWindowBase::getLeft() const
-	{
-		return mRenderWindow->getLeft();
-	}
-
-	INT32 EditorWindowBase::getTop() const
-	{
-		return mRenderWindow->getTop();
-	}
-
-	UINT32 EditorWindowBase::getWidth() const
-	{
-		return (UINT32) mRenderWindow->getWidth();
-	}
-
-	UINT32 EditorWindowBase::getHeight() const
-	{
-		return (UINT32) mRenderWindow->getHeight();
-	}
-}

+ 0 - 73
BansheeEditor/Source/BsEditorWindowManager.cpp

@@ -1,73 +0,0 @@
-#include "BsEditorWindowManager.h"
-#include "BsEditorWindow.h"
-#include "BsMainEditorWindow.h"
-
-namespace BansheeEngine
-{
-	EditorWindowManager::EditorWindowManager()
-		:mMainWindow(nullptr)
-	{
-
-	}
-
-	EditorWindowManager::~EditorWindowManager()
-	{
-		while(mEditorWindows.size() > 0)
-			destroy(mEditorWindows[0]);
-
-		if(mMainWindow != nullptr)
-			bs_delete(mMainWindow);
-	}
-
-	MainEditorWindow* EditorWindowManager::createMain(const RenderWindowPtr& parentRenderWindow)
-	{
-		if(mMainWindow == nullptr)
-			mMainWindow = new (bs_alloc<MainEditorWindow>()) MainEditorWindow(parentRenderWindow);
-
-		return mMainWindow;
-	}
-
-	EditorWindow* EditorWindowManager::create()
-	{
-		EditorWindow* newWindow = new (bs_alloc<EditorWindow>()) EditorWindow();
-		mEditorWindows.push_back(newWindow);
-
-		newWindow->initialize();
-		return newWindow;
-	}
-
-	void EditorWindowManager::destroy(EditorWindowBase* window)
-	{
-		auto iterFind = std::find(begin(mEditorWindows), end(mEditorWindows), window);
-
-		if(iterFind == end(mEditorWindows))
-			return;
-
-		auto iterFind2 = std::find(begin(mScheduledForDestruction), end(mScheduledForDestruction), window);
-		
-		if(iterFind2 == end(mScheduledForDestruction))
-			mScheduledForDestruction.push_back(window);
-
-		mEditorWindows.erase(iterFind);
-	}
-
-	void EditorWindowManager::update()
-	{
-		// Editor window destroy is deferred to this point, otherwise we risk
-		// destroying a window while it's still being used (situation that was happening with GUIManager)
-		
-		for(auto& windowToDestroy : mScheduledForDestruction)
-		{
-			bs_delete(windowToDestroy);
-		}
-
-		mScheduledForDestruction.clear();
-
-		mMainWindow->update();
-
-		for(auto& window : mEditorWindows)
-		{
-			window->update();
-		}
-	}
-}

+ 0 - 159
BansheeEditor/Source/BsGUIColor.cpp

@@ -1,159 +0,0 @@
-#include "BsGUIColor.h"
-#include "BsImageSprite.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsSpriteTexture.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIHelper.h"
-#include "BsBuiltinResources.h"
-#include "BsTexture.h"
-
-namespace BansheeEngine
-{
-	const float GUIColor::ALPHA_SPLIT_POSITION = 0.75f;
-
-	GUIColor::GUIColor(const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUIElement(styleName, layoutOptions), mColorSprite(nullptr), mAlphaSprite(nullptr)
-	{
-		mColorSprite = bs_new<ImageSprite, PoolAlloc>();
-		mAlphaSprite = bs_new<ImageSprite, PoolAlloc>();
-
-		mColorImageDesc.texture = BuiltinResources::instance().getWhiteSpriteTexture().getInternalPtr();
-		mAlphaImageDesc.texture = BuiltinResources::instance().getWhiteSpriteTexture().getInternalPtr();
-	}
-
-	GUIColor::~GUIColor()
-	{
-		bs_delete<PoolAlloc>(mColorSprite);
-		bs_delete<PoolAlloc>(mAlphaSprite);
-	}
-
-	const String& GUIColor::getGUITypeName()
-	{
-		static String name = "Color";
-		return name;
-	}
-
-	GUIColor* GUIColor::create(const String& styleName)
-	{
-		return new (bs_alloc<GUIColor, PoolAlloc>()) GUIColor(getStyleName<GUIColor>(styleName), GUILayoutOptions::create());
-	}
-
-	GUIColor* GUIColor::create(const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUIColor, PoolAlloc>()) GUIColor(getStyleName<GUIColor>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	void GUIColor::setColor(const Color& color)
-	{
-		mColor = color;
-
-		mColorImageDesc.color = mColor;
-		mColorImageDesc.color.a = 1.0f;
-
-		mAlphaImageDesc.color = Color::White * mColor.a;
-		mAlphaImageDesc.color.a = 1.0f;
-
-		markContentAsDirty();
-	}
-
-	UINT32 GUIColor::getNumRenderElements() const
-	{
-		UINT32 numElements = mColorSprite->getNumRenderElements();
-		numElements += mAlphaSprite->getNumRenderElements();
-
-		return numElements;
-	}
-
-	const GUIMaterialInfo& GUIColor::getMaterial(UINT32 renderElementIdx) const
-	{
-		UINT32 alphaSpriteIdx = mColorSprite->getNumRenderElements();
-
-		if(renderElementIdx >= alphaSpriteIdx)
-			return mAlphaSprite->getMaterial(alphaSpriteIdx - renderElementIdx);
-		else
-			return mColorSprite->getMaterial(renderElementIdx);
-	}
-
-	UINT32 GUIColor::getNumQuads(UINT32 renderElementIdx) const
-	{
-		UINT32 alphaSpriteIdx = mColorSprite->getNumRenderElements();
-
-		UINT32 numQuads = 0;
-		if(renderElementIdx >= alphaSpriteIdx)
-			numQuads = mAlphaSprite->getNumQuads(alphaSpriteIdx - renderElementIdx);
-		else
-			numQuads = mColorSprite->getNumQuads(renderElementIdx);
-
-		return numQuads;
-	}
-
-	void GUIColor::updateRenderElementsInternal()
-	{		
-		mColorImageDesc.width = (UINT32)(mWidth * ALPHA_SPLIT_POSITION);
-		mColorImageDesc.height = mHeight;
-
-		mAlphaImageDesc.width = mWidth - mColorImageDesc.width;
-		mAlphaImageDesc.height = mHeight;
-
-		mColorSprite->update(mColorImageDesc);
-		mAlphaSprite->update(mAlphaImageDesc);
-
-		GUIElement::updateRenderElementsInternal();
-	}
-
-	void GUIColor::updateClippedBounds()
-	{
-		mClippedBounds = RectI(0, 0, mWidth, mHeight);
-
-		if(mClipRect.width > 0 && mClipRect.height > 0)
-			mClippedBounds.clip(mClipRect);
-
-		mClippedBounds.x += mOffset.x;
-		mClippedBounds.y += mOffset.y;
-	}
-
-	Vector2I GUIColor::_getOptimalSize() const
-	{
-		return GUIHelper::calcOptimalContentsSize(Vector2I(80, 10), *_getStyle(), _getLayoutOptions()); // Arbitrary size
-	}
-
-	void GUIColor::fillBuffer(UINT8* vertices, UINT8* uv, UINT32* indices, UINT32 startingQuad, UINT32 maxNumQuads, 
-		UINT32 vertexStride, UINT32 indexStride, UINT32 renderElementIdx) const
-	{
-		UINT32 alphaSpriteIdx = mColorSprite->getNumRenderElements();
-
-		if(renderElementIdx < alphaSpriteIdx)
-		{
-			mColorSprite->fillBuffer(vertices, uv, indices, startingQuad, maxNumQuads, 
-				vertexStride, indexStride, renderElementIdx, mOffset, mClipRect);
-
-			return;
-		}
-		else if(renderElementIdx >= alphaSpriteIdx)
-		{
-			Vector2I alphaOffset = mOffset;
-			UINT32 xOffset = (UINT32)(mWidth * ALPHA_SPLIT_POSITION);
-			alphaOffset.x += xOffset;
-
-			RectI alphaClipRect = mClipRect;
-			alphaClipRect.x -= xOffset;
-
-			mAlphaSprite->fillBuffer(vertices, uv, indices, startingQuad, maxNumQuads, 
-				vertexStride, indexStride, alphaSpriteIdx - renderElementIdx, alphaOffset, alphaClipRect);
-		}
-	}
-
-	bool GUIColor::mouseEvent(const GUIMouseEvent& ev)
-	{
-		if(ev.getType() == GUIMouseEventType::MouseUp)
-		{
-			// TODO
-
-			return true;
-		}
-
-		return false;
-	}
-}

+ 0 - 156
BansheeEditor/Source/BsGUIColorField.cpp

@@ -1,156 +0,0 @@
-#include "BsGUIColorField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIColor.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	GUIColorField::GUIColorField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		const String& labelStyle, const String& colorStyle, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mLabel(nullptr), mColor(nullptr), mLabelWidth(100)
-	{
-		mLabel = GUILabel::create(labelContent, labelStyle);
-		mColor = GUIColor::create(colorStyle);
-
-		_registerChildElement(mLabel);
-		_registerChildElement(mColor);
-	}
-
-	GUIColorField::GUIColorField(const PrivatelyConstruct& dummy, 
-		const String& labelStyle, const String& colorStyle, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mLabel(nullptr), mColor(nullptr), mLabelWidth(100)
-	{
-		mColor = GUIColor::create(colorStyle);
-
-		_registerChildElement(mColor);
-	}
-
-	GUIColorField::~GUIColorField()
-	{
-
-	}
-
-	GUIColorField* GUIColorField::create(const GUIContent& labelContent, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), labelContent, labelStyle, toggleStyle, 
-			GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUIColorField* GUIColorField::create(const GUIContent& labelContent, const String& labelStyle, 
-		const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), labelContent, labelStyle, toggleStyle, 
-			GUILayoutOptions::create());
-	}
-
-	GUIColorField* GUIColorField::create(const HString& labelContent, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), GUIContent(labelContent), labelStyle, 
-			toggleStyle, GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUIColorField* GUIColorField::create( const HString& labelContent, const String& labelStyle, 
-		const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), GUIContent(labelContent), labelStyle, toggleStyle, 
-			GUILayoutOptions::create());
-	}
-
-	GUIColorField* GUIColorField::create(const GUIOptions& layoutOptions, const String& labelStyle, 
-		const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), labelStyle, toggleStyle, 
-			GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUIColorField* GUIColorField::create(const String& labelStyle, const String& toggleStyle)
-	{
-		return bs_new<GUIColorField>(PrivatelyConstruct(), labelStyle, toggleStyle, GUILayoutOptions::create());
-	}
-
-	Color GUIColorField::getValue() const
-	{
-		return mColor->getColor();
-	}
-
-	void GUIColorField::setValue(const Color& color)
-	{
-		mColor->setColor(color);
-	}
-
-	void GUIColorField::setLabelWidth(UINT32 width)
-	{
-		mLabelWidth = width;
-
-		markContentAsDirty();
-	}
-
-	void GUIColorField::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		UINT32 colorOffset = 0;
-		UINT32 colorWidth = width;
-
-		if(mLabel != nullptr)
-		{
-			UINT32 labelWidth = mLabelWidth;
-
-			Vector2I optimalSize = mLabel->_getOptimalSize();
-			INT32 yOffset = Math::roundToInt((height - optimalSize.y) * 0.5f);
-
-			Vector2I offset(x, y + yOffset);
-			mLabel->_setOffset(offset);
-			mLabel->_setWidth(labelWidth);
-			mLabel->_setHeight(optimalSize.y);
-			mLabel->_setAreaDepth(areaDepth);
-			mLabel->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mLabel->_setClipRect(elemClipRect);
-
-			colorOffset = labelWidth;
-			colorWidth = width - labelWidth;
-		}
-
-		{
-			Vector2I optimalSize = mColor->_getOptimalSize();
-			INT32 yOffset = Math::roundToInt((height - optimalSize.y) * 0.5f);
-
-			Vector2I offset(x + colorOffset, y + yOffset);
-			mColor->_setOffset(offset);
-			mColor->_setWidth(colorWidth);
-			mColor->_setHeight(optimalSize.y);
-			mColor->_setAreaDepth(areaDepth);
-			mColor->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mColor->_setClipRect(elemClipRect);
-		}
-	}
-
-	Vector2I GUIColorField::_getOptimalSize() const
-	{
-		Vector2I optimalsize = mColor->_getOptimalSize();
-
-		if(mLabel != nullptr)
-		{
-			optimalsize.x += mLabel->_getOptimalSize().x;
-			optimalsize.y = std::max(optimalsize.y, mLabel->_getOptimalSize().y);
-		}
-
-		return optimalsize;
-	}
-
-	const String& GUIColorField::getGUITypeName()
-	{
-		static String typeName = "GUIColorField";
-		return typeName;
-	}
-}

+ 0 - 78
BansheeEditor/Source/BsGUIDockSlider.cpp

@@ -1,78 +0,0 @@
-#include "BsGUIDockSlider.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUITabbedTitleBar.h"
-#include "BsCursor.h"
-#include "BsPlatform.h"
-
-namespace BansheeEngine
-{
-	const String& GUIDockSlider::getGUITypeName()
-	{
-		static String name = "DockSlider";
-		return name;
-	}
-
-	GUIDockSlider::GUIDockSlider(bool horizontal, const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"")), layoutOptions),
-		mDragInProgress(false), mHorizontal(horizontal), mIsCursorSet(false)
-	{
-
-	}
-
-	GUIDockSlider* GUIDockSlider::create(bool horizontal, const String& styleName)
-	{
-		return new (bs_alloc<GUIDockSlider, PoolAlloc>()) GUIDockSlider(horizontal, 
-			getStyleName<GUIDockSlider>(styleName), GUILayoutOptions::create());
-	}
-
-	GUIDockSlider* GUIDockSlider::create(bool horizontal, const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUIDockSlider, PoolAlloc>()) GUIDockSlider(horizontal, 
-			getStyleName<GUIDockSlider>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	bool GUIDockSlider::_hasCustomCursor(const Vector2I position, CursorType& type) const
-	{
-		if(_isInBounds(position))
-		{
-			type = mHorizontal ? CursorType::SizeNS : CursorType::SizeWE;
-			return true;
-		}
-
-		return false;
-	}
-
-	bool GUIDockSlider::mouseEvent(const GUIMouseEvent& ev)
-	{	
-		bool processed = GUIButtonBase::mouseEvent(ev);
-
-		if(ev.getType() == GUIMouseEventType::MouseDragStart)
-		{
-			mLastDragPosition = ev.getPosition();
-			mDragInProgress = true;
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDrag)
-		{
-			Vector2I delta = ev.getPosition() - mLastDragPosition;
-			mLastDragPosition = ev.getPosition();
-
-			if(!onDragged.empty())
-				onDragged(delta);
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDragEnd)
-		{
-			mDragInProgress = false;
-
-			return true;
-		}
-
-		return processed;
-	}
-}

+ 0 - 83
BansheeEditor/Source/BsGUIDropButton.cpp

@@ -1,83 +0,0 @@
-#include "BsGUIDropButton.h"
-#include "BsImageSprite.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsSpriteTexture.h"
-#include "BsTextSprite.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIHelper.h"
-#include "BsTexture.h"
-#include "BsDragAndDropManager.h"
-
-namespace BansheeEngine
-{
-	const String& GUIDropButton::getGUITypeName()
-	{
-		static String name = "DropButton";
-		return name;
-	}
-
-	GUIDropButton::GUIDropButton(UINT32 dragType, const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUIButtonBase(styleName, GUIContent(HString(L"None")), layoutOptions)
-	{
-
-	}
-
-	GUIDropButton::~GUIDropButton()
-	{ }
-
-	GUIDropButton* GUIDropButton::create(UINT32 dragType, const String& styleName)
-	{
-		return new (bs_alloc<GUIDropButton, PoolAlloc>()) GUIDropButton(dragType, 
-			getStyleName<GUIDropButton>(styleName), GUILayoutOptions::create());
-	}
-
-	GUIDropButton* GUIDropButton::create(UINT32 dragType, const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUIDropButton, PoolAlloc>()) GUIDropButton(dragType, 
-			getStyleName<GUIDropButton>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	bool GUIDropButton::mouseEvent(const GUIMouseEvent& ev)
-	{
-		bool processed = GUIButtonBase::mouseEvent(ev);
-
-		if(ev.getType() == GUIMouseEventType::MouseDragAndDropDragged)
-		{
-			if(DragAndDropManager::instance().isDragInProgress())
-			{
-				if(DragAndDropManager::instance().getDragTypeId() == mDragType)
-				{
-					if(!_isOn())
-						_setOn(true);
-				}
-				else
-				{
-					if(_isOn())
-						_setOn(false);
-				}
-			}
-			else
-			{
-				if(_isOn())
-					_setOn(false);
-			}
-
-			processed = true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDragAndDropDropped)
-		{
-			if(_isOn())
-				_setOn(false);
-
-			if(DragAndDropManager::instance().isDragInProgress() && DragAndDropManager::instance().getDragTypeId() == mDragType)
-			{
-				if(!onDataDropped.empty())
-					onDataDropped(DragAndDropManager::instance().getDragData());
-			}
-		}
-
-		return processed;
-	}
-}

+ 0 - 34
BansheeEditor/Source/BsGUIFieldBase.cpp

@@ -1,34 +0,0 @@
-#include "BsGUIFieldBase.h"
-#include "BsGUILabel.h"
-#include "BsGUILayout.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUIFieldBase::DEFAULT_LABEL_WIDTH = 100;
-
-	GUIFieldBase::GUIFieldBase(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& labelStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:GUIElementContainer(layoutOptions)
-	{
-		mLayout = &addLayoutXInternal(this);
-
-		if(withLabel)
-		{
-			mLabel = GUILabel::create(labelContent, GUIOptions(GUIOption::fixedWidth(labelWidth)), labelStyle);
-			mLayout->addElement(mLabel);
-		}
-	}
-
-	void GUIFieldBase::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		mLayout->_updateLayoutInternal(x, y, width, height, clipRect, widgetDepth, areaDepth);
-	}
-
-	Vector2I GUIFieldBase::_getOptimalSize() const
-	{
-		return mLayout->_getOptimalSize();
-	}
-}

+ 0 - 143
BansheeEditor/Source/BsGUIFloatField.cpp

@@ -1,143 +0,0 @@
-#include "BsGUIFloatField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIInputBox.h"
-#include "BsGUISpace.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsCursor.h"
-#include "BsGUIWidget.h"
-#include "BsViewport.h"
-#include <regex>
-
-namespace BansheeEngine
-{
-	const float GUIFloatField::DRAG_SPEED = 0.05f;
-
-	GUIFloatField::GUIFloatField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth, 
-		const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mInputBox(nullptr), mIsDragging(false),
-		mLastDragPos(0)
-	{
-		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), inputBoxStyle);
-		mInputBox->setFilter(&GUIFloatField::floatFilter);
-
-		mLayout->addElement(mInputBox);
-
-		setValue(0);
-	}
-
-	GUIFloatField::~GUIFloatField()
-	{
-
-	}
-
-	bool GUIFloatField::_hasCustomCursor(const Vector2I position, CursorType& type) const
-	{
-		RectI draggableArea;
-
-		if(mLabel != nullptr)
-			draggableArea = mLabel->getBounds();
-
-		if(draggableArea.contains(position))
-		{
-			type = CursorType::ArrowLeftRight;
-			return true;
-		}
-
-		return false;
-	}
-
-	bool GUIFloatField::mouseEvent(const GUIMouseEvent& event)
-	{
-		GUIElementContainer::mouseEvent(event);
-
-		RectI draggableArea;
-
-		if(mLabel != nullptr)
-			draggableArea = mLabel->getBounds();
-
-		if(event.getType() == GUIMouseEventType::MouseDragStart)
-		{
-			if(draggableArea.contains(event.getPosition()))
-			{
-				mLastDragPos = event.getPosition().x;
-				mIsDragging = true;
-			}
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDrag)
-		{
-			if(mIsDragging)
-			{
-				INT32 xDiff = event.getPosition().x - mLastDragPos;
-
-				INT32 jumpAmount = 0;
-				if(event.getPosition().x < 0)
-				{
-					Vector2I cursorScreenPos = Cursor::instance().getScreenPosition();
-					cursorScreenPos.x += _getParentWidget()->getTarget()->getWidth();
-					jumpAmount = _getParentWidget()->getTarget()->getWidth();
-
-					Cursor::instance().setScreenPosition(cursorScreenPos);
-				}
-				else if(event.getPosition().x >= _getParentWidget()->getTarget()->getWidth())
-				{
-					Vector2I cursorScreenPos = Cursor::instance().getScreenPosition();
-					cursorScreenPos.x -= _getParentWidget()->getTarget()->getWidth();
-					jumpAmount = -_getParentWidget()->getTarget()->getWidth();
-
-					Cursor::instance().setScreenPosition(cursorScreenPos);
-				}
-
-				float oldValue = getValue();
-				float newValue = oldValue + xDiff * DRAG_SPEED;
-
-				mLastDragPos = event.getPosition().x + jumpAmount;
-
-				if(oldValue != newValue)
-					setValue(newValue);
-			}
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragEnd)
-		{
-			mIsDragging = false;
-
-			return true;
-		}
-
-		return false;
-	}
-
-	float GUIFloatField::getValue() const
-	{
-		return parseFloat(mInputBox->getText());
-	}
-
-	void GUIFloatField::setValue(float value)
-	{
-		mInputBox->setText(toWString(value));
-	}
-
-	void GUIFloatField::updateClippedBounds()
-	{
-		Vector2I offset = _getOffset();
-		mClippedBounds = RectI(offset.x, offset.y, _getWidth(), _getHeight());
-	}
-
-	const String& GUIFloatField::getGUITypeName()
-	{
-		static String typeName = "GUIFloatField";
-		return typeName;
-	}
-
-	bool GUIFloatField::floatFilter(const WString& str)
-	{
-		return std::regex_match(str, std::wregex(L"-?(\\d+(\\.\\d*)?)?"));
-	}
-}

+ 0 - 132
BansheeEditor/Source/BsGUIFoldout.cpp

@@ -1,132 +0,0 @@
-#include "BsGUIFoldout.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUIToggle.h"
-#include "BsGUITexture.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	const String GUIFoldout::FOLDOUT_BUTTON_STYLE = "FoldoutButton";
-	const String GUIFoldout::FOLDOUT_BG_STYLE = "FoldoutBackground";
-
-	GUIFoldout::GUIFoldout(const PrivatelyConstruct& dummy, const String& toggleStyle, 
-		const String& backgroundStyle, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mToggle(nullptr), mBackground(nullptr), mIsExpanded(false)
-	{
-		mToggle = GUIToggle::create(HString(L""), toggleStyle);
-		mBackground = GUITexture::create(backgroundStyle);
-
-		_registerChildElement(mToggle);
-		_registerChildElement(mBackground);
-	}
-
-	GUIFoldout::~GUIFoldout()
-	{
-
-	}
-
-	GUIFoldout* GUIFoldout::create(const GUIOptions& layoutOptions, 
-		const String& toggleStyle, const String& backgroundStyle)
-	{
-		const String* curToggleStyle = &toggleStyle;
-		if(*curToggleStyle == StringUtil::BLANK)
-			curToggleStyle = &FOLDOUT_BUTTON_STYLE;
-
-		const String* curBackgroundStyle = &backgroundStyle;
-		if(*curBackgroundStyle == StringUtil::BLANK)
-			curBackgroundStyle = &FOLDOUT_BG_STYLE;
-
-		return bs_new<GUIFoldout>(PrivatelyConstruct(), *curToggleStyle, *curBackgroundStyle, 
-			GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUIFoldout* GUIFoldout::create(const String& toggleStyle, 
-		const String& backgroundStyle)
-	{
-		const String* curToggleStyle = &toggleStyle;
-		if(*curToggleStyle == StringUtil::BLANK)
-			curToggleStyle = &FOLDOUT_BUTTON_STYLE;
-
-		const String* curBackgroundStyle = &backgroundStyle;
-		if(*curBackgroundStyle == StringUtil::BLANK)
-			curBackgroundStyle = &FOLDOUT_BG_STYLE;
-
-		return bs_new<GUIFoldout>(PrivatelyConstruct(), *curToggleStyle, *curBackgroundStyle, 
-			GUILayoutOptions::create());
-	}
-
-	void GUIFoldout::setExpanded(bool expanded)
-	{
-		if(mIsExpanded != expanded)
-		{
-			mIsExpanded = expanded;
-
-			if(mIsExpanded)
-				mToggle->toggleOn();
-			else
-				mToggle->toggleOff();
-
-			markContentAsDirty();
-
-			if(!onStateChanged.empty())
-				onStateChanged(mIsExpanded);
-		}
-	}
-
-	void GUIFoldout::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		{
-			Vector2I optimalSize = mToggle->_getOptimalSize();
-			INT32 yOffset = Math::roundToInt((height - optimalSize.y) * 0.5f);
-
-			Vector2I offset(x, y + yOffset);
-			mToggle->_setOffset(offset);
-			mToggle->_setWidth(optimalSize.x);
-			mToggle->_setHeight(optimalSize.y);
-			mToggle->_setAreaDepth(areaDepth);
-			mToggle->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mToggle->_setClipRect(elemClipRect);
-		}
-
-		{
-			Vector2I optimalSize = mToggle->_getOptimalSize();
-			INT32 yOffset = Math::roundToInt((height - optimalSize.y) * 0.5f);
-
-			Vector2I offset(x, y + yOffset);
-			mBackground->_setOffset(offset);
-			mBackground->_setWidth(mWidth);
-			mBackground->_setHeight(optimalSize.y);
-			mBackground->_setAreaDepth(areaDepth + 1);
-			mBackground->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mBackground->_setClipRect(elemClipRect);
-		}
-	}
-
-	Vector2I GUIFoldout::_getOptimalSize() const
-	{
-		Vector2I optimalsize = mToggle->_getOptimalSize();
-
-		if(mBackground != nullptr)
-		{
-			optimalsize.x = std::max(optimalsize.x, mBackground->_getOptimalSize().x);
-			optimalsize.y = std::max(optimalsize.y, mBackground->_getOptimalSize().y);
-		}
-
-		return optimalsize;
-	}
-
-	const String& GUIFoldout::getGUITypeName()
-	{
-		static String typeName = "GUIFoldout";
-		return typeName;
-	}
-}

+ 0 - 173
BansheeEditor/Source/BsGUIGameObjectField.cpp

@@ -1,173 +0,0 @@
-#include "BsGUIGameObjectField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIDropButton.h"
-#include "BsGUIButton.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUISceneTreeView.h"
-#include "BsGUIWidget.h"
-#include "BsGameObjectManager.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const UINT32 GUIGameObjectField::DEFAULT_LABEL_WIDTH = 100;
-	const String GUIGameObjectField::DROP_BUTTON_STYLE = "DropButton";
-	const String GUIGameObjectField::CLEAR_BUTTON_STYLE = "ObjectClearButton";
-
-	GUIGameObjectField::GUIGameObjectField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:GUIElementContainer(layoutOptions), mLabel(nullptr), mClearButton(nullptr), mDropButton(nullptr), mInstanceId(0)
-	{
-		mLayout = &addLayoutXInternal(this);
-
-		if(withLabel)
-		{
-			mLabel = GUILabel::create(labelContent, GUIOptions(GUIOption::fixedWidth(labelWidth)), labelStyle);
-			mLayout->addElement(mLabel);
-		}
-
-		const String* curDropButtonStyle = &dropButtonStyle;
-		const String* curClearButtonStyle = &clearButtonStyle;
-
-		if(*curDropButtonStyle == StringUtil::BLANK)
-			curDropButtonStyle = &DROP_BUTTON_STYLE;
-
-		if(*curClearButtonStyle == StringUtil::BLANK)
-			curClearButtonStyle = &CLEAR_BUTTON_STYLE;
-
-		mDropButton = GUIDropButton::create((UINT32)DragAndDropType::SceneObject, GUIOptions(GUIOption::flexibleWidth()), *curDropButtonStyle);
-		mClearButton = GUIButton::create(HString(L""), *curClearButtonStyle);
-
-		mLayout->addElement(mDropButton);
-		mLayout->addElement(mClearButton);
-
-		mDropButton->onDataDropped.connect(std::bind(&GUIGameObjectField::dataDropped, this, _1));
-	}
-
-	GUIGameObjectField::~GUIGameObjectField()
-	{
-
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const GUIContent& labelContent, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), labelContent, labelWidth, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(layoutOptions), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const GUIContent& labelContent, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), labelContent, DEFAULT_LABEL_WIDTH, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(layoutOptions), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const HString& labelText, UINT32 labelWidth, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(labelText), labelWidth, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(layoutOptions), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const HString& labelText, const GUIOptions& layoutOptions, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(labelText), DEFAULT_LABEL_WIDTH, labelStyle, dropButtonStyle, clearButtonStyle, 
-			GUILayoutOptions::create(layoutOptions), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const GUIOptions& layoutOptions, const String& dropButtonStyle,
-		const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(), 0, nullptr, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(layoutOptions), false);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const GUIContent& labelContent, UINT32 labelWidth, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), labelContent, labelWidth, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const GUIContent& labelContent, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), labelContent, DEFAULT_LABEL_WIDTH, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const HString& labelText, UINT32 labelWidth, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(labelText), labelWidth, labelStyle, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const HString& labelText, 
-		const String& labelStyle, const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(labelText), DEFAULT_LABEL_WIDTH, labelStyle, dropButtonStyle, clearButtonStyle, 
-			GUILayoutOptions::create(), true);
-	}
-
-	GUIGameObjectField* GUIGameObjectField::create(const String& dropButtonStyle, const String& clearButtonStyle)
-	{
-		return bs_new<GUIGameObjectField>(PrivatelyConstruct(), GUIContent(), 0, nullptr, dropButtonStyle, clearButtonStyle,
-			GUILayoutOptions::create(), false);
-	}
-
-	HGameObject GUIGameObjectField::getValue() const
-	{
-		HGameObject obj;
-
-		if(mInstanceId != 0)
-			GameObjectManager::instance().tryGetObject(mInstanceId, obj);
-
-		return obj;
-	}
-
-	void GUIGameObjectField::setValue(const HGameObject& value)
-	{
-		if(value)
-		{
-			mInstanceId = value->getInstanceId();
-			mDropButton->setContent(GUIContent(HString(toWString(value->getName()))));
-		}
-		else
-		{
-			mInstanceId = 0;
-			mDropButton->setContent(GUIContent(HString(L"None")));
-		}		
-	}
-
-	void GUIGameObjectField::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		mLayout->_updateLayoutInternal(x, y, width, height, clipRect, widgetDepth, areaDepth);
-	}
-
-	Vector2I GUIGameObjectField::_getOptimalSize() const
-	{
-		return mLayout->_getOptimalSize();
-	}
-
-	void GUIGameObjectField::dataDropped(void* data)
-	{
-		DraggedSceneObjects* draggedSceneObjects = reinterpret_cast<DraggedSceneObjects*>(data);
-
-		// TODO
-	}
-
-	const String& GUIGameObjectField::getGUITypeName()
-	{
-		static String typeName = "GUIGameObjectField";
-		return typeName;
-	}
-}

+ 0 - 184
BansheeEditor/Source/BsGUIIntField.cpp

@@ -1,184 +0,0 @@
-#include "BsGUIIntField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIInputBox.h"
-#include "BsGUISpace.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-#include "BsCursor.h"
-#include "BsUndoRedo.h"
-#include "BsViewport.h"
-#include "BsCmdInputFieldValueChange.h"
-#include <regex>
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const INT32 GUIIntField::DRAG_SPEED = 5;
-
-	GUIIntField::GUIIntField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth,
-		const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mInputBox(nullptr), mIsDragging(false),
-		mLastDragPos(0), mIsDragCursorSet(false)
-	{
-		mInputBox = GUIInputBox::create(false, GUIOptions(GUIOption::flexibleWidth()), inputBoxStyle);
-		mInputBox->setFilter(&GUIIntField::intFilter);
-
-		mInputBox->onValueChanged.connect(std::bind(&GUIIntField::valueChanged, this, _1));
-		mInputBox->onFocusGained.connect(std::bind(&GUIIntField::focusGained, this));
-		mInputBox->onFocusLost.connect(std::bind(&GUIIntField::focusLost, this));
-
-		mLayout->addElement(mInputBox);
-
-		setValue(0);
-	}
-
-	GUIIntField::~GUIIntField()
-	{
-
-	}
-
-	bool GUIIntField::_hasCustomCursor(const Vector2I position, CursorType& type) const
-	{
-		RectI draggableArea;
-
-		if(mLabel != nullptr)
-			draggableArea = mLabel->getBounds();
-
-		if(draggableArea.contains(position))
-		{
-			type = CursorType::ArrowLeftRight;
-			return true;
-		}
-
-		return false;
-	}
-
-	bool GUIIntField::mouseEvent(const GUIMouseEvent& event)
-	{
-		GUIElementContainer::mouseEvent(event);
-
-		RectI draggableArea;
-
-		if(mLabel != nullptr)
-			draggableArea = mLabel->getBounds();
-
-		if(event.getType() == GUIMouseEventType::MouseDragStart)
-		{
-			if(draggableArea.contains(event.getPosition()))
-			{
-				mLastDragPos = event.getPosition().x;
-				mIsDragging = true;
-			}
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDrag)
-		{
-			if(mIsDragging)
-			{
-				INT32 xDiff = event.getPosition().x - mLastDragPos;
-
-				INT32 jumpAmount = 0;
-				if(event.getPosition().x < 0)
-				{
-					Vector2I cursorScreenPos = Cursor::instance().getScreenPosition();
-					cursorScreenPos.x += _getParentWidget()->getTarget()->getWidth();
-					jumpAmount = _getParentWidget()->getTarget()->getWidth();
-
-					Cursor::instance().setScreenPosition(cursorScreenPos);
-				}
-				else if(event.getPosition().x >= _getParentWidget()->getTarget()->getWidth())
-				{
-					Vector2I cursorScreenPos = Cursor::instance().getScreenPosition();
-					cursorScreenPos.x -= _getParentWidget()->getTarget()->getWidth();
-					jumpAmount = -_getParentWidget()->getTarget()->getWidth();
-
-					Cursor::instance().setScreenPosition(cursorScreenPos);
-				}
-
-				INT32 oldValue = getValue();
-				INT32 newValue = oldValue;
-
-				if(xDiff >= DRAG_SPEED)
-				{
-					while(xDiff >= DRAG_SPEED)
-					{
-						newValue++;
-						xDiff -= DRAG_SPEED;
-					}
-				}
-				else if(xDiff <= -DRAG_SPEED)
-				{
-					while(xDiff <= -DRAG_SPEED)
-					{
-						newValue--;
-						xDiff += DRAG_SPEED;
-					}
-				}
-
-				mLastDragPos += (newValue - oldValue) * DRAG_SPEED + jumpAmount;
-
-				if(oldValue != newValue)
-					setValue(newValue);
-			}
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragEnd)
-		{
-			mIsDragging = false;
-
-			return true;
-		}
-
-		return false;
-	}
-
-	void GUIIntField::setValue(INT32 value)
-	{
-		mValue = value;
-		mInputBox->setText(toWString(value));
-	}
-
-	void GUIIntField::updateClippedBounds()
-	{
-		Vector2I offset = _getOffset();
-		mClippedBounds = RectI(offset.x, offset.y, _getWidth(), _getHeight());
-	}
-
-	const String& GUIIntField::getGUITypeName()
-	{
-		static String typeName = "GUIIntField";
-		return typeName;
-	}
-
-	void GUIIntField::valueChanged(const WString& newValue)
-	{
-		INT32 newIntValue = parseInt(newValue);
-
-		CmdInputFieldValueChange<GUIIntField, INT32>::execute(this, newIntValue);
-
-		if(!onValueChanged.empty())
-			onValueChanged(newIntValue);
-	}
-
-	void GUIIntField::focusGained()
-	{
-		UndoRedo::instance().pushGroup("InputBox");
-	}
-
-	void GUIIntField::focusLost()
-	{
-		UndoRedo::instance().popGroup("InputBox");
-	}
-
-	bool GUIIntField::intFilter(const WString& str)
-	{
-		return std::regex_match(str, std::wregex(L"-?(\\d+)?"));
-	}
-}

+ 0 - 329
BansheeEditor/Source/BsGUIMenuBar.cpp

@@ -1,329 +0,0 @@
-#include "BsGUIMenuBar.h"
-#include "BsGUIArea.h"
-#include "BsGUIElement.h"
-#include "BsGUIButton.h"
-#include "BsGUITexture.h"
-#include "BsGUILayout.h"
-#include "BsGUISpace.h"
-#include "BsGUIMenu.h"
-#include "BsGUIManager.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIDropDownBoxManager.h"
-#include "BsSceneObject.h"
-#include "BsPlatform.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUIMenuBar::NUM_ELEMENTS_AFTER_CONTENT = 8;
-
-	GUIMenuBar::GUIMenuBar(GUIWidget* parent, RenderWindow* parentWindow)
-		:mParentWidget(parent), mParentWindow(parentWindow), mMainArea(nullptr), mBackgroundArea(nullptr), 
-		mBgTexture(nullptr), mLogoTexture(nullptr), mSubMenuOpen(false), mSubMenuButton(nullptr)
-	{
-		mBackgroundArea = GUIArea::create(*parent, 0, 0, 1, 13, 9900);
-		mMainArea = GUIArea::create(*parent, 0, 0, 1, 13, 9899);
-
-		mBgTexture = GUITexture::create(GUIImageScaleMode::StretchToFit, GUIOptions(GUIOption::flexibleWidth(), GUIOption::flexibleHeight()), "MenuBarBg");
-		mBackgroundArea->getLayout().addElement(mBgTexture);
-
-		mLogoTexture = GUITexture::create(GUIImageScaleMode::StretchToFit, "MenuBarBansheeLogo");
-		GUILayout& mainLayout = mMainArea->getLayout();
-
-		mainLayout.addElement(mLogoTexture);
-		mainLayout.addSpace(5);
-		mainLayout.addFlexibleSpace();
-
-		mMinBtn = GUIButton::create(HString(L""), "WinMinimizeBtn");
-		mMaxBtn = GUIButton::create(HString(L""), "WinMaximizeBtn");
-		mCloseBtn = GUIButton::create(HString(L""), "WinCloseBtn");
-
-		mainLayout.addSpace(3);
-		mainLayout.addElement(mMinBtn);
-		mainLayout.addSpace(3);
-		mainLayout.addElement(mMaxBtn);
-		mainLayout.addSpace(3);
-		mainLayout.addElement(mCloseBtn);
-		mainLayout.addSpace(3);
-
-		mMinBtn->onClick.connect(std::bind(&GUIMenuBar::onMinimizeClicked, this));
-		mMaxBtn->onClick.connect(std::bind(&GUIMenuBar::onMaximizeClicked, this));
-		mCloseBtn->onClick.connect(std::bind(&GUIMenuBar::onCloseClicked, this));
-
-		refreshNonClientAreas();
-	}
-
-	GUIMenuBar::~GUIMenuBar()
-	{
-		closeSubMenu();
-
-		for(auto& menu : mChildMenus)
-		{
-			bs_delete<PoolAlloc>(menu.menu);
-			GUIElement::destroy(menu.button);
-		}
-
-		GUIElement::destroy(mMinBtn);
-		GUIElement::destroy(mMaxBtn);
-		GUIElement::destroy(mCloseBtn);
-
-		GUIElement::destroy(mBgTexture);
-		GUIElement::destroy(mLogoTexture);
-
-		GUIArea::destroy(mMainArea);
-		GUIArea::destroy(mBackgroundArea);
-	}
-
-	void GUIMenuBar::setArea(INT32 x, INT32 y, UINT32 width, UINT32 height)
-	{
-		mMainArea->setPosition(x, y);
-		mBackgroundArea->setPosition(x, y);
-
-		mMainArea->setSize(width, height);
-		mBackgroundArea->setSize(width, height);
-
-		refreshNonClientAreas();
-	}
-
-	const GUIMenuItem* GUIMenuBar::addMenuItem(const WString& path, std::function<void()> callback)
-	{
-		WString strippedPath = path;
-		WString rootName;
-
-		if(!stripPath(strippedPath, rootName))
-			return nullptr;
-
-		const GUIMenuBarData* subMenu = getSubMenu(rootName);
-		if(subMenu == nullptr)
-		{
-			subMenu = addNewButton(rootName);
-
-			refreshNonClientAreas();
-		}
-
-		return subMenu->menu->addMenuItem(strippedPath, callback);
-	}
-
-	const GUIMenuItem* GUIMenuBar::addSeparator(const WString& path)
-	{
-		WString strippedPath = path;
-		WString rootName;
-
-		if(!stripPath(strippedPath, rootName))
-			return nullptr;
-
-		const GUIMenuBarData* subMenu = getSubMenu(rootName);
-		if(subMenu == nullptr)
-		{
-			subMenu = addNewButton(rootName);
-
-			refreshNonClientAreas();
-		}
-
-		return subMenu->menu->addSeparator(strippedPath);
-	}
-
-	GUIMenuBar::GUIMenuBarData* GUIMenuBar::addNewButton(const WString& name)
-	{
-		mChildMenus.push_back(GUIMenuBarData());
-
-		GUIMenuBarData& newSubMenu = mChildMenus.back();
-		newSubMenu.name = name;
-		newSubMenu.menu = bs_new<GUIMenu>();
-
-		GUIButton* newButton = GUIButton::create(HString(name), "MenuBarBtn");
-		newButton->onClick.connect(std::bind(&GUIMenuBar::openSubMenu, this, name));
-		newButton->onHover.connect(std::bind(&GUIMenuBar::onSubMenuHover, this, name));
-		mMainArea->getLayout().insertElement(mMainArea->getLayout().getNumChildren() - NUM_ELEMENTS_AFTER_CONTENT, newButton);
-
-		newSubMenu.button = newButton;
-
-		return &newSubMenu;
-	}
-
-	const GUIMenuItem* GUIMenuBar::getMenuItem(const WString& path) const
-	{
-		WString strippedPath = path;
-		WString rootName;
-
-		if(!stripPath(strippedPath, rootName))
-			return nullptr;
-
-		const GUIMenuBarData* subMenu = getSubMenu(rootName);
-		if(subMenu == nullptr)
-			return nullptr;
-
-		return subMenu->menu->getMenuItem(strippedPath);
-	}
-
-	void GUIMenuBar::removeMenuItem(const WString& path)
-	{
-		WString strippedPath = path;
-		WString rootName;
-
-		if(!stripPath(strippedPath, rootName))
-			return;
-
-		if(strippedPath == L"")
-		{
-			UINT32 curIdx = 0;
-			GUIMenuBarData* subMenuToRemove = nullptr;
-			for(auto& subMenuData : mChildMenus)
-			{
-				if(subMenuData.name == rootName)
-				{
-					subMenuToRemove = &subMenuData;
-					break;
-				}
-
-				curIdx++;
-			}
-
-			if(subMenuToRemove == nullptr)
-				return;
-
-			mMainArea->getLayout().removeElement(subMenuToRemove->button);
-			GUIElement::destroy(subMenuToRemove->button);
-			bs_delete<PoolAlloc>(subMenuToRemove->menu);
-
-			mChildMenus.erase(mChildMenus.begin() + curIdx);
-
-			refreshNonClientAreas();
-			return;
-		}
-
-		const GUIMenuBarData* subMenu = getSubMenu(rootName);
-		if(subMenu == nullptr)
-			return;
-
-		const GUIMenuItem* item = subMenu->menu->getMenuItem(strippedPath);
-		if(item == nullptr)
-			return;
-
-		subMenu->menu->removeMenuItem(item);
-	}
-
-	const GUIMenuBar::GUIMenuBarData* GUIMenuBar::getSubMenu(const WString& name) const
-	{
-		for(auto& subMenu : mChildMenus)
-		{
-			if(subMenu.name == name)
-				return &subMenu;
-		}
-
-		return nullptr;
-	}
-
-	bool GUIMenuBar::stripPath(WString& path, WString& pathRoot) const
-	{
-		Vector<WString> pathElements = StringUtil::split(path, L"/");
-		if(pathElements.size() == 0)
-			return false;
-
-		pathRoot = pathElements[0];
-		path.erase(0, pathRoot.size());
-
-		if(path.size() > 0)
-			path.erase(0, 1); // Forward slash
-
-		return true;
-	}
-
-	void GUIMenuBar::openSubMenu(const WString& name)
-	{
-		const GUIMenuBarData* subMenu = getSubMenu(name);
-		if(subMenu == nullptr)
-			return;
-
-		if(mSubMenuOpen)
-		{
-			bool closingExisting = subMenu->button == mSubMenuButton;
-
-			closeSubMenu();
-
-			if(closingExisting)
-				return;
-		}
-
-		GUIDropDownData dropDownData = subMenu->menu->getDropDownData();
-		GUIWidget* widget = subMenu->button->_getParentWidget();
-
-		GUIDropDownAreaPlacement placement = GUIDropDownAreaPlacement::aroundBoundsHorz(subMenu->button->getBounds());
-
-		GameObjectHandle<GUIDropDownBox> dropDownBox = GUIDropDownBoxManager::instance().openDropDownBox(widget->getTarget(), 
-			placement, dropDownData, widget->getSkin(), GUIDropDownType::MenuBar, std::bind(&GUIMenuBar::onSubMenuClosed, this));
-
-		subMenu->button->_setOn(true);
-
-		mSubMenuButton = subMenu->button;
-		mSubMenuOpen = true;
-	}
-
-	void GUIMenuBar::closeSubMenu()
-	{
-		if(mSubMenuOpen)
-		{
-			GUIDropDownBoxManager::instance().closeDropDownBox();
-
-			mSubMenuButton->_setOn(false);
-			mSubMenuOpen = false;
-		}		
-	}
-
-	void GUIMenuBar::onSubMenuHover(const WString& name)
-	{
-		if(mSubMenuOpen)
-		{
-			const GUIMenuBarData* subMenu = getSubMenu(name);
-
-			if(subMenu == nullptr)
-				return;
-
-			if(mSubMenuButton != subMenu->button)
-				openSubMenu(name);
-		}
-	}
-
-	void GUIMenuBar::onSubMenuClosed()
-	{
-		mSubMenuButton->_setOn(false);
-		mSubMenuOpen = false;
-	}
-
-	void GUIMenuBar::onMinimizeClicked()
-	{
-		// TODO
-	}
-
-	void GUIMenuBar::onMaximizeClicked()
-	{
-		// TODO
-	}
-
-	void GUIMenuBar::onCloseClicked()
-	{
-		// TODO
-	}
-
-	void GUIMenuBar::refreshNonClientAreas()
-	{
-		// If the size or contents of the area changed this frame the layout won't be updated yet,
-		// so force the update right away so we get correct element bounds
-		mMainArea->_update();
-
-		Vector<RectI> nonClientAreas;
-		nonClientAreas.push_back(mLogoTexture->getBounds());
-
-		if(mChildMenus.size() > 0)
-		{
-			RectI lastButtonBounds = mChildMenus.back().button->getBounds();
-			RectI minButtonBounds = mMinBtn->getBounds();
-
-			RectI emptyArea(lastButtonBounds.x + lastButtonBounds.width, mMainArea->y(), 
-				minButtonBounds.x - (lastButtonBounds.x + lastButtonBounds.width), mMainArea->height());
-
-			nonClientAreas.push_back(emptyArea);
-		}
-
-		Platform::setCaptionNonClientAreas(*mParentWindow, nonClientAreas);
-	}
-}

+ 0 - 467
BansheeEditor/Source/BsGUIResourceTreeView.cpp

@@ -1,467 +0,0 @@
-#include "BsGUIResourceTreeView.h"
-#include "BsGUISkin.h"
-#include "BsProjectLibrary.h"
-#include "BsDragAndDropManager.h"
-#include "BsResources.h"
-#include "BsResourceManifest.h"
-#include "BsProjectLibrary.h"
-#include "BsFileSystem.h"
-#include "BsGUIWidget.h"
-#include "BsViewport.h"
-#include "BsRenderWindow.h"
-#include "BsPlatform.h"
-#include "BsPath.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	GUIResourceTreeView::InternalDraggedResources::InternalDraggedResources(UINT32 numObjects)
-		:numObjects(numObjects)
-	{
-		resourcePaths = bs_newN<Path>(numObjects);
-	}
-
-	GUIResourceTreeView::InternalDraggedResources::~InternalDraggedResources()
-	{
-		bs_deleteN(resourcePaths, numObjects);
-		resourcePaths = nullptr;
-	}
-
-	GUIResourceTreeView::GUIResourceTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions)
-		:GUITreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle,
-		dragSepHighlightStyle, layoutOptions), mDraggedResources(nullptr), mCurrentWindow(nullptr), mDropTarget(nullptr), mDropTargetDragActive(false)
-	{
-		ProjectLibrary::instance().onEntryAdded.connect(std::bind(&GUIResourceTreeView::entryAdded, this, _1));
-		ProjectLibrary::instance().onEntryRemoved.connect(std::bind(&GUIResourceTreeView::entryRemoved, this, _1));
-
-		const ProjectLibrary::LibraryEntry* rootEntry = ProjectLibrary::instance().getRootEntry();
-
-		mRootElement.mFullPath = rootEntry->path;
-		mRootElement.mElementName = mRootElement.mFullPath.getWTail();
-
-		expandElement(&mRootElement);
-
-		updateFromProjectLibraryEntry(&mRootElement, rootEntry);
-	}
-
-	GUIResourceTreeView::~GUIResourceTreeView()
-	{
-		clearDropTarget();
-	}
-
-	GUIResourceTreeView* GUIResourceTreeView::create(const String& backgroundStyle, const String& elementBtnStyle, 
-		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, const String& dragHighlightStyle, 
-		const String& dragSepHighlightStyle)
-	{
-		return new (bs_alloc<GUIResourceTreeView, PoolAlloc>()) GUIResourceTreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, 
-			selectionBackgroundStyle, editBoxStyle, dragHighlightStyle, dragSepHighlightStyle, GUILayoutOptions::create());
-	}
-
-	GUIResourceTreeView* GUIResourceTreeView::create(const GUIOptions& options, const String& backgroundStyle,
-		const String& elementBtnStyle, const String& foldoutBtnStyle, const String& selectionBackgroundStyle, 
-		const String& editBoxStyle, const String& dragHighlightStyle, const String& dragSepHighlightStyle)
-	{
-		return new (bs_alloc<GUIResourceTreeView, PoolAlloc>()) GUIResourceTreeView(backgroundStyle, elementBtnStyle, 
-			foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle, dragSepHighlightStyle, GUILayoutOptions::create(options));
-	}
-
-	void GUIResourceTreeView::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height, RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		GUITreeView::_updateLayoutInternal(x, y, width, height, clipRect, widgetDepth, areaDepth);
-
-		if(mDropTarget != nullptr)
-		{
-			mDropTarget->setArea(x, y, width, height);
-		}
-	}
-
-	void GUIResourceTreeView::updateTreeElementHierarchy()
-	{
-		// Do nothing, updates are handled via callbacks
-	}
-
-	void GUIResourceTreeView::renameTreeElement(GUITreeView::TreeElement* element, const WString& name)
-	{
-		ResourceTreeElement* resourceTreeElement = static_cast<ResourceTreeElement*>(element);
-		
-		Path oldPath = resourceTreeElement->mFullPath;
-		Path newPath = oldPath.getParent();
-		newPath.append(name);
-
-		ProjectLibrary::instance().moveEntry(oldPath, findUniquePath(newPath));
-	}
-
-	void GUIResourceTreeView::deleteTreeElement(TreeElement* element) 
-	{
-		ResourceTreeElement* resourceTreeElement = static_cast<ResourceTreeElement*>(element);
-
-		ProjectLibrary::instance().deleteEntry(resourceTreeElement->mFullPath);
-	}
-
-	void GUIResourceTreeView::updateFromProjectLibraryEntry(ResourceTreeElement* treeElement, const ProjectLibrary::LibraryEntry* libraryEntry)
-	{
-		struct StackElem
-		{
-			StackElem(const ProjectLibrary::LibraryEntry* entry, ResourceTreeElement* treeElem)
-				:entry(entry), treeElem(treeElem)
-			{ }
-
-			const ProjectLibrary::LibraryEntry* entry;
-			ResourceTreeElement* treeElem;
-		};
-
-		if(libraryEntry->type == ProjectLibrary::LibraryEntryType::Directory)
-		{
-			Stack<StackElem> todo;
-			todo.push(StackElem(libraryEntry, treeElement));
-
-			while(!todo.empty())
-			{
-				StackElem curElem = todo.top();
-				todo.pop();
-
-				const ProjectLibrary::DirectoryEntry* dirEntry = static_cast<const ProjectLibrary::DirectoryEntry*>(curElem.entry);
-
-				for(auto& child : dirEntry->mChildren)
-				{
-					ResourceTreeElement* newChild = addTreeElement(curElem.treeElem, child->path);
-
-					if(child->type == ProjectLibrary::LibraryEntryType::Directory)
-						todo.push(StackElem(child, newChild));
-				}
-
-				sortTreeElement(curElem.treeElem);
-			}
-		}
-	}
-
-	GUIResourceTreeView::ResourceTreeElement* GUIResourceTreeView::addTreeElement(ResourceTreeElement* parent, const Path& fullPath)
-	{
-		ResourceTreeElement* newChild = bs_new<ResourceTreeElement>();
-		newChild->mParent = parent;
-		newChild->mName = fullPath.getFilename();
-		newChild->mFullPath = fullPath;
-		newChild->mSortedIdx = (UINT32)parent->mChildren.size();
-		newChild->mIsVisible = parent->mIsVisible && parent->mIsExpanded;
-		newChild->mElementName = fullPath.getWTail();
-
-		parent->mChildren.push_back(newChild);
-
-		updateElementGUI(parent);
-		updateElementGUI(newChild);
-
-		return newChild;
-	}
-
-	void GUIResourceTreeView::deleteTreeElement(ResourceTreeElement* element)
-	{
-		closeTemporarilyExpandedElements(); // In case this element is one of them
-
-		if(element->mIsSelected)
-			unselectElement(element);
-
-		if(element->mParent != nullptr)
-		{
-			auto iterFind = std::find(element->mParent->mChildren.begin(), element->mParent->mChildren.end(), element);
-			if(iterFind != element->mParent->mChildren.end())
-				element->mParent->mChildren.erase(iterFind);
-
-			sortTreeElement(static_cast<ResourceTreeElement*>(element->mParent));
-			updateElementGUI(element->mParent);
-		}
-
-		if(&mRootElement != element)
-			bs_delete(element);
-	}
-
-	void GUIResourceTreeView::sortTreeElement(ResourceTreeElement* element)
-	{
-		auto cmp = [&] (const TreeElement* a, const TreeElement* b)
-		{
-			return a->mName.compare(b->mName) < 0;
-		};
-
-		std::sort(element->mChildren.begin(), element->mChildren.end(), cmp);
-
-		UINT32 idx = 0;
-		for(auto& child : element->mChildren)
-		{
-			child->mSortedIdx = idx;
-			idx++;
-		}
-	}
-
-	GUIResourceTreeView::ResourceTreeElement* GUIResourceTreeView::findTreeElement(const Path& fullPath)
-	{
-		if (!mRootElement.mFullPath.includes(fullPath))
-			return nullptr;
-
-		Path relPath = fullPath.getRelative(mRootElement.mFullPath);
-		UINT32 numElems = relPath.getNumDirectories() + (relPath.isFile() ? 1 : 0);
-		UINT32 idx = 0;
-
-		ResourceTreeElement* current = &mRootElement;
-		while (current != nullptr)
-		{
-			if (idx == numElems)
-				return current;
-
-			WString curElem;
-			if (relPath.isFile() && idx == (numElems - 1))
-				curElem = relPath.getWFilename();
-			else
-				curElem = relPath[idx];
-
-			current = nullptr;
-			for (auto& child : current->mChildren)
-			{
-				ResourceTreeElement* resourceChild = static_cast<ResourceTreeElement*>(child);
-				if (Path::comparePathElem(curElem, resourceChild->mElementName))
-				{
-					idx++;
-					current = resourceChild;
-					break;
-				}
-			}
-		}
-
-		return nullptr;
-	}
-
-	void GUIResourceTreeView::entryAdded(const Path& path)
-	{
-		Path parentPath = path.getParent();
-
-		ResourceTreeElement* parentElement = findTreeElement(parentPath);
-		assert(parentElement != nullptr);
-
-		ResourceTreeElement* newElement = addTreeElement(parentElement, path);
-		sortTreeElement(parentElement);
-
-		ProjectLibrary::LibraryEntry* libEntry = ProjectLibrary::instance().findEntry(path);
-		
-		assert(libEntry != nullptr);
-		updateFromProjectLibraryEntry(newElement, libEntry);
-
-		markContentAsDirty();
-	}
-
-	void GUIResourceTreeView::entryRemoved(const Path& path)
-	{
-		ResourceTreeElement* treeElement = findTreeElement(path);
-		
-		if(treeElement != nullptr)
-			deleteTreeElement(treeElement);
-	}
-
-	void GUIResourceTreeView::setDropTarget(RenderWindow* parentWindow, INT32 x, INT32 y, UINT32 width, UINT32 height)
-	{
-		if(mDropTarget != nullptr)
-		{
-			Platform::destroyDropTarget(*mDropTarget);
-
-			mDropTargetEnterConn.disconnect();
-			mDropTargetLeaveConn.disconnect();
-			mDropTargetMoveConn.disconnect();
-			mDropTargetDroppedConn.disconnect();
-		}
-
-		if(parentWindow != nullptr)
-		{
-			mCurrentWindow = parentWindow;
-			mDropTarget = &Platform::createDropTarget(mCurrentWindow, _getOffset().x, _getOffset().y, _getWidth(), _getHeight());
-
-			mDropTargetEnterConn = mDropTarget->onEnter.connect(std::bind(&GUIResourceTreeView::dropTargetDragMove, this, _1, _2));
-			mDropTargetMoveConn = mDropTarget->onDragOver.connect(std::bind(&GUIResourceTreeView::dropTargetDragMove, this, _1, _2));
-			mDropTargetLeaveConn = mDropTarget->onLeave.connect(std::bind(&GUIResourceTreeView::dropTargetDragLeave, this));
-			mDropTargetDroppedConn = mDropTarget->onDrop.connect(std::bind(&GUIResourceTreeView::dropTargetDragDropped, this, _1, _2));
-		}
-		else
-			mDropTarget = nullptr;
-	}
-
-	void GUIResourceTreeView::clearDropTarget()
-	{
-		setDropTarget(nullptr, 0, 0, 0, 0);
-	}
-
-	void GUIResourceTreeView::dropTargetDragMove(INT32 x, INT32 y)
-	{
-		mDragPosition = Vector2I(x, y);
-		mDragInProgress = true;
-		mDropTargetDragActive = true;
-		markContentAsDirty();
-
-		if(mBottomScrollBounds.contains(mDragPosition))
-		{
-			if(mScrollState != ScrollState::Down)
-				mScrollState = ScrollState::TransitioningDown;
-		}
-		else if(mTopScrollBounds.contains(mDragPosition))
-		{
-			if(mScrollState != ScrollState::Up)
-				mScrollState = ScrollState::TransitioningUp;
-		}
-		else
-			mScrollState = ScrollState::None;
-	}
-
-	void GUIResourceTreeView::dropTargetDragLeave()
-	{
-		mDragInProgress = false;
-		mDropTargetDragActive = false;
-		markContentAsDirty();
-	}
-
-	void GUIResourceTreeView::dropTargetDragDropped(INT32 x, INT32 y)
-	{
-		const GUITreeView::InteractableElement* element = findElementUnderCoord(Vector2I(x, y));
-
-		TreeElement* treeElement = nullptr;
-		if(element != nullptr)
-		{
-			if(element->isTreeElement())
-				treeElement = element->getTreeElement();
-			else
-				treeElement = element->parent;
-		}
-
-		if(mDropTarget->getDropType() == OSDropType::FileList)
-		{
-			Vector<WString> fileList = mDropTarget->getFileList();
-
-			mDraggedResources = bs_new<InternalDraggedResources>((UINT32)fileList.size());
-			for(UINT32 i = 0; i < (UINT32)fileList.size(); i++)
-				mDraggedResources->resourcePaths[i] = fileList[i];
-
-			dragAndDropEnded(treeElement);
-
-			bs_delete(mDraggedResources);
-			mDraggedResources = nullptr;
-
-			unselectAll();
-		}
-
-		mDragInProgress = false;
-		mDropTargetDragActive = false;
-		markContentAsDirty();
-	}
-
-	Path GUIResourceTreeView::findUniquePath(const Path& path)
-	{
-		if(FileSystem::exists(path))
-		{
-			Path newPath = path;
-			WString filename = path.getWFilename(false);
-			UINT32 cnt = 1;
-			do 
-			{
-				newPath.setBasename(filename + toWString(cnt));
-				cnt++;
-			} while (FileSystem::exists(newPath));
-
-			return newPath;
-		}
-		else
-			return path;
-	}
-
-	bool GUIResourceTreeView::acceptDragAndDrop() const
-	{
-		return mDropTargetDragActive || DragAndDropManager::instance().isDragInProgress() && DragAndDropManager::instance().getDragTypeId() == (UINT32)DragAndDropType::Resources;
-	}
-
-	void GUIResourceTreeView::dragAndDropStart()
-	{
-		assert(mDraggedResources == nullptr);
-
-		DraggedResources* draggedResources = bs_new<DraggedResources>();
-		InternalDraggedResources* internalDraggedResources = bs_new<InternalDraggedResources>((UINT32)mSelectedElements.size());
-
-		UINT32 cnt = 0;
-		for(auto& selectedElement : mSelectedElements)
-		{
-			ResourceTreeElement* resourceTreeElement = static_cast<ResourceTreeElement*>(selectedElement.element);
-			internalDraggedResources->resourcePaths[cnt] = resourceTreeElement->mFullPath; 
-
-			String uuid;
-			if(gResources().getUUIDFromFilePath(internalDraggedResources->resourcePaths[cnt], uuid))
-				draggedResources->resourceUUIDs.push_back(uuid);
-
-			cnt++;
-		}
-
-		mDraggedResources = internalDraggedResources;
-
-		DragAndDropManager::instance().startDrag((UINT32)DragAndDropType::Resources, (void*)draggedResources, 
-			std::bind(&GUIResourceTreeView::dragAndDropFinalize, this), true);
-	}
-
-	void GUIResourceTreeView::dragAndDropEnded(TreeElement* overTreeElement)
-	{
-		if(overTreeElement != nullptr && mDraggedResources != nullptr)
-		{
-			ResourceTreeElement* resourceTreeElement = static_cast<ResourceTreeElement*>(overTreeElement);
-
-			Path destDir = resourceTreeElement->mFullPath;
-			if(FileSystem::isFile(destDir))
-				destDir = destDir.getParent();
-
-			for(UINT32 i = 0; i < mDraggedResources->numObjects; i++)
-			{
-				WString filename = mDraggedResources->resourcePaths[i].getWFilename();
-				Path currentParent = mDraggedResources->resourcePaths[i].getParent();
-
-				if(currentParent != destDir)
-				{
-					Path newPath = destDir;
-					newPath.append(filename);
-
-					ProjectLibrary::instance().moveEntry(mDraggedResources->resourcePaths[i], findUniquePath(newPath));
-				}
-			}
-		}
-	}
-
-	void GUIResourceTreeView::dragAndDropFinalize()
-	{
-		mDragInProgress = false;
-		markContentAsDirty();
-
-		DraggedResources* draggedResources = reinterpret_cast<DraggedResources*>(DragAndDropManager::instance().getDragData());
-		bs_delete(draggedResources);
-
-		if(mDraggedResources != nullptr)
-		{
-			bs_delete(mDraggedResources);
-			mDraggedResources = nullptr;
-		}
-	}
-
-	void GUIResourceTreeView::_changeParentWidget(GUIWidget* widget)
-	{
-		GUITreeView::_changeParentWidget(widget);
-
-		if(widget->getTarget()->getTarget()->isWindow())
-		{
-			RenderWindow* parentWindow = static_cast<RenderWindow*>(widget->getTarget()->getTarget().get());
-			setDropTarget(parentWindow, _getOffset().x, _getOffset().y, _getWidth(), _getHeight());
-		}
-		else
-			clearDropTarget();
-	}
-
-	bool GUIResourceTreeView::_acceptDragAndDrop(const Vector2I position, UINT32 typeId) const
-	{
-		return typeId == (UINT32)DragAndDropType::Resources;
-	}
-
-	const String& GUIResourceTreeView::getGUITypeName()
-	{
-		static String typeName = "ResourceTreeView";
-		return typeName;
-	}
-}

+ 0 - 268
BansheeEditor/Source/BsGUISceneTreeView.cpp

@@ -1,268 +0,0 @@
-#include "BsGUISceneTreeView.h"
-#include "BsSceneObject.h"
-#include "BsSceneManager.h"
-#include "BsGUISkin.h"
-#include "BsCmdEditPlainFieldGO.h"
-#include "BsDragAndDropManager.h"
-#include "BsCmdReparentSO.h"
-
-namespace BansheeEngine
-{
-	DraggedSceneObjects::DraggedSceneObjects(UINT32 numObjects)
-		:numObjects(numObjects)
-	{
-		objects = bs_newN<HSceneObject>(numObjects);
-	}
-
-	DraggedSceneObjects::~DraggedSceneObjects()
-	{
-		bs_deleteN(objects, numObjects);
-		objects = nullptr;
-	}
-
-	GUISceneTreeView::GUISceneTreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions)
-		:GUITreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle,
-		dragSepHighlightStyle, layoutOptions)
-	{
-		
-	}
-
-	GUISceneTreeView::~GUISceneTreeView()
-	{
-		
-	}
-
-	GUISceneTreeView* GUISceneTreeView::create(const String& backgroundStyle, const String& elementBtnStyle, 
-		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, const String& dragHighlightStyle, 
-		const String& dragSepHighlightStyle)
-	{
-		return new (bs_alloc<GUISceneTreeView, PoolAlloc>()) GUISceneTreeView(backgroundStyle, elementBtnStyle, foldoutBtnStyle, 
-			selectionBackgroundStyle, editBoxStyle, dragHighlightStyle, dragSepHighlightStyle, GUILayoutOptions::create());
-	}
-
-	GUISceneTreeView* GUISceneTreeView::create(const GUIOptions& options, const String& backgroundStyle,
-		const String& elementBtnStyle, const String& foldoutBtnStyle, const String& selectionBackgroundStyle, 
-		const String& editBoxStyle, const String& dragHighlightStyle, const String& dragSepHighlightStyle)
-	{
-		return new (bs_alloc<GUISceneTreeView, PoolAlloc>()) GUISceneTreeView(backgroundStyle, elementBtnStyle, 
-			foldoutBtnStyle, selectionBackgroundStyle, editBoxStyle, dragHighlightStyle, dragSepHighlightStyle, GUILayoutOptions::create(options));
-	}
-
-	void GUISceneTreeView::updateTreeElement(SceneTreeElement* element)
-	{
-		HSceneObject currentSO = element->mSceneObject;
-
-		// Check if SceneObject has changed in any way and update the tree element
-
-		bool completeMatch = (UINT32)element->mChildren.size() == currentSO->getNumChildren();
-
-		// Early exit case - Most commonly there will be no changes between active and cached data so 
-		// we first do a quick check in order to avoid expensive comparison later
-		if(completeMatch)
-		{
-			for(UINT32 i = 0; i < currentSO->getNumChildren(); i++)
-			{
-				SceneTreeElement* currentChild = static_cast<SceneTreeElement*>(element->mChildren[i]);
-
-				UINT64 curId = currentSO->getChild(i)->getInstanceId();
-				if(curId != currentChild->mId)
-				{
-					completeMatch = false;
-					break;
-				}
-			}
-		}
-
-		// Not a complete match, compare everything and insert/delete elements as needed
-		bool needsUpdate = false;
-		if(!completeMatch)
-		{
-			Vector<TreeElement*> newChildren;
-
-			bool* tempToDelete = (bool*)stackAlloc(sizeof(bool) * (UINT32)element->mChildren.size());
-			for(UINT32 i = 0; i < (UINT32)element->mChildren.size(); i++)
-				tempToDelete[i] = true;
-
-			for(UINT32 i = 0; i < currentSO->getNumChildren(); i++)
-			{
-				HSceneObject currentSOChild = currentSO->getChild(i);
-				UINT64 curId = currentSOChild->getInstanceId();
-				bool found = false;
-				for(UINT32 j = 0; j < element->mChildren.size(); j++)
-				{
-					SceneTreeElement* currentChild = static_cast<SceneTreeElement*>(element->mChildren[j]);
-
-					if(curId == currentChild->mId)
-					{
-						tempToDelete[j] = false;
-						currentChild->mSortedIdx = (UINT32)newChildren.size();
-						newChildren.push_back(currentChild);
-
-						found = true;
-						break;
-					}
-				}
-
-				if(!found)
-				{
-					SceneTreeElement* newChild = bs_new<SceneTreeElement>();
-					newChild->mParent = element;
-					newChild->mSceneObject = currentSOChild;
-					newChild->mId = currentSOChild->getInstanceId();
-					newChild->mName = currentSOChild->getName();
-					newChild->mSortedIdx = (UINT32)newChildren.size();
-					newChild->mIsVisible = element->mIsVisible && element->mIsExpanded;
-
-					newChildren.push_back(newChild);
-
-					updateElementGUI(newChild);
-				}
-			}
-
-			for(UINT32 i = 0; i < element->mChildren.size(); i++)
-			{
-				if(!tempToDelete[i])
-					continue;
-
-				deleteTreeElementInternal(element->mChildren[i]);
-			}
-
-			stackDeallocLast(tempToDelete);
-
-			element->mChildren = newChildren;
-			needsUpdate = true;
-		}
-
-		// Check if name needs updating
-		const String& name = element->mSceneObject->getName();
-		if(element->mName != name)
-		{
-			element->mName = name;
-			needsUpdate = true;	
-		}
-
-		if(needsUpdate)
-			updateElementGUI(element);
-
-		// Calculate the sorted index of the element based on its name
-		TreeElement* parent = element->mParent;
-		if(parent != nullptr)
-		{
-			for(UINT32 i = 0; i < (UINT32)parent->mChildren.size(); i++)
-			{
-				INT32 stringCompare = element->mName.compare(parent->mChildren[i]->mName);
-				if(stringCompare > 0)
-				{
-					if(element->mSortedIdx < parent->mChildren[i]->mSortedIdx)
-						std::swap(element->mSortedIdx, parent->mChildren[i]->mSortedIdx);
-				}
-				else if(stringCompare < 0)
-				{
-					if(element->mSortedIdx > parent->mChildren[i]->mSortedIdx)
-						std::swap(element->mSortedIdx, parent->mChildren[i]->mSortedIdx);
-				}
-			}
-		}
-
-		for(UINT32 i = 0; i < (UINT32)element->mChildren.size(); i++)
-		{
-			SceneTreeElement* sceneElement = static_cast<SceneTreeElement*>(element->mChildren[i]);
-			updateTreeElement(sceneElement);
-		}
-	}
-
-	void GUISceneTreeView::updateTreeElementHierarchy()
-	{
-		HSceneObject root = gSceneManager().getRootNode();
-		mRootElement.mSceneObject = root;
-		mRootElement.mId = root->getInstanceId();
-		mRootElement.mSortedIdx = 0;
-		mRootElement.mIsExpanded = true;
-
-		updateTreeElement(&mRootElement);
-	}
-
-	void GUISceneTreeView::renameTreeElement(GUITreeView::TreeElement* element, const WString& name)
-	{
-		SceneTreeElement* sceneTreeElement = static_cast<SceneTreeElement*>(element);
-		CmdEditPlainFieldGO<String>::execute(sceneTreeElement->mSceneObject, "mName", toString(name));
-	}
-
-	void GUISceneTreeView::deleteTreeElement(TreeElement* element)
-	{
-		// TODO - Actually delete the scene object
-	}
-
-	void GUISceneTreeView::deleteTreeElementInternal(GUITreeView::TreeElement* element)
-	{
-		closeTemporarilyExpandedElements(); // In case this element is one of them
-
-		if(element->mIsSelected)
-			unselectElement(element);
-
-		bs_delete(element);
-	}
-
-	bool GUISceneTreeView::acceptDragAndDrop() const
-	{
-		return DragAndDropManager::instance().isDragInProgress() && DragAndDropManager::instance().getDragTypeId() == (UINT32)DragAndDropType::SceneObject;
-	}
-
-	void GUISceneTreeView::dragAndDropStart()
-	{
-		DraggedSceneObjects* draggedSceneObjects = bs_new<DraggedSceneObjects>((UINT32)mSelectedElements.size());
-
-		UINT32 cnt = 0;
-		for(auto& selectedElement : mSelectedElements)
-		{
-			SceneTreeElement* sceneTreeElement = static_cast<SceneTreeElement*>(selectedElement.element);
-			draggedSceneObjects->objects[cnt] = sceneTreeElement->mSceneObject;
-			cnt++;
-		}
-
-		DragAndDropManager::instance().startDrag((UINT32)DragAndDropType::SceneObject, (void*)draggedSceneObjects, 
-			std::bind(&GUISceneTreeView::dragAndDropFinalize, this), true);
-	}
-
-	void GUISceneTreeView::dragAndDropEnded(TreeElement* overTreeElement)
-	{
-		if(overTreeElement != nullptr)
-		{
-			DraggedSceneObjects* draggedSceneObjects = reinterpret_cast<DraggedSceneObjects*>(DragAndDropManager::instance().getDragData());
-
-			Vector<HSceneObject> sceneObjects;
-			SceneTreeElement* sceneTreeElement = static_cast<SceneTreeElement*>(overTreeElement);
-			HSceneObject newParent = sceneTreeElement->mSceneObject;
-
-			for(UINT32 i = 0; i < draggedSceneObjects->numObjects; i++)
-			{
-				if(draggedSceneObjects->objects[i] != newParent)
-					sceneObjects.push_back(draggedSceneObjects->objects[i]);
-			}
-
-			CmdReparentSO::execute(sceneObjects, newParent);
-		}
-	}
-
-	void GUISceneTreeView::dragAndDropFinalize()
-	{
-		mDragInProgress = false;
-		markContentAsDirty();
-
-		DraggedSceneObjects* draggedSceneObjects = reinterpret_cast<DraggedSceneObjects*>(DragAndDropManager::instance().getDragData());
-		bs_delete(draggedSceneObjects);
-	}
-
-	bool GUISceneTreeView::_acceptDragAndDrop(const Vector2I position, UINT32 typeId) const
-	{
-		return typeId == (UINT32)DragAndDropType::SceneObject;
-	}
-
-	const String& GUISceneTreeView::getGUITypeName()
-	{
-		static String typeName = "SceneTreeView";
-		return typeName;
-	}
-}

+ 0 - 163
BansheeEditor/Source/BsGUITabButton.cpp

@@ -1,163 +0,0 @@
-#include "BsGUITabButton.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUITabbedTitleBar.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUITabButton::DRAG_MIN_DISTANCE = 3;
-
-	const String& GUITabButton::getGUITypeName()
-	{
-		static String name = "TabButton";
-		return name;
-	}
-
-	GUITabButton::GUITabButton(const String& styleName, const GUIToggleGroupPtr& toggleGroup, 
-		UINT32 index, const GUIContent& content, const GUILayoutOptions& layoutOptions)
-		:GUIToggle(styleName, content, toggleGroup, layoutOptions), mIndex(index), mDraggedState(false)
-	{
-
-	}
-
-	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const HString& text, const String& styleName)
-	{
-		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, GUIContent(text), GUILayoutOptions::create());
-	}
-
-	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const HString& text, const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, GUIContent(text), GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const GUIContent& content, const String& styleName)
-	{
-		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, content, GUILayoutOptions::create());
-	}
-
-	GUITabButton* GUITabButton::create(const GUIToggleGroupPtr& toggleGroup, UINT32 index, 
-		const GUIContent& content, const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUITabButton, PoolAlloc>()) GUITabButton(
-			getStyleName<GUITabButton>(styleName), toggleGroup, index, content, GUILayoutOptions::create(layoutOptions));
-	}
-
-	void GUITabButton::_setDraggedState(bool active) 
-	{
-		if(mDraggedState == active)
-			return;
-
-		mDraggedState = active; 
-
-		if(mDraggedState)
-		{
-			mInactiveState = getState();
-
-			if(mInactiveState != GUIButtonState::Normal)
-				setState(GUIButtonState::Normal);
-		}
-		else
-		{
-			if(getState() != mInactiveState)
-				setState(mInactiveState);
-		}
-	}
-
-	bool GUITabButton::mouseEvent(const GUIMouseEvent& ev)
-	{	
-		if(ev.getType() == GUIMouseEventType::MouseOver)
-		{
-			GUIButtonState state = _isOn() ? GUIButtonState::HoverOn : GUIButtonState::Hover;
-
-			if(!mDraggedState)
-			{
-				setState(state);
-
-				if(!onHover.empty())
-					onHover();
-			}
-			else
-				mInactiveState = state;
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseOut)
-		{
-			GUIButtonState state = _isOn() ? GUIButtonState::NormalOn : GUIButtonState::Normal;
-
-			if(!mDraggedState)
-			{
-				setState(state);
-
-				if(!onOut.empty())
-					onOut();
-			}
-			else
-				mInactiveState = state;
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDown)
-		{
-			if(!mDraggedState)
-				setState(_isOn() ? GUIButtonState::ActiveOn : GUIButtonState::Active);
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseUp)
-		{
-			if(!mDraggedState)
-			{
-				setState(_isOn() ? GUIButtonState::HoverOn : GUIButtonState::Hover);
-
-				if(!onClick.empty())
-					onClick();
-
-				if(!mIsToggled)
-					toggleOn();
-			}
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDragStart)
-		{
-			mDragStartPosition = ev.getPosition();
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDrag)
-		{
-			UINT32 dist = mDragStartPosition.manhattanDist(ev.getPosition());
-
-			if(dist > DRAG_MIN_DISTANCE)
-			{
-				if(!onDragged.empty())
-					onDragged(mIndex, ev.getPosition());
-			}
-
-			return true;
-		}
-		else if(ev.getType() == GUIMouseEventType::MouseDragEnd)
-		{
-			UINT32 dist = mDragStartPosition.manhattanDist(ev.getPosition());
-
-			if(dist > DRAG_MIN_DISTANCE)
-			{
-				if(!onDragEnd.empty())
-					onDragEnd(mIndex, ev.getPosition());
-			}
-
-			return true;
-		}
-
-		return false;
-	}
-}

+ 0 - 483
BansheeEditor/Source/BsGUITabbedTitleBar.cpp

@@ -1,483 +0,0 @@
-#include "BsGUITabbedTitleBar.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUITexture.h"
-#include "BsGUIButton.h"
-#include "BsGUITabButton.h"
-#include "BsGUISpace.h"
-#include "BsGUIWindowDropArea.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsDragAndDropManager.h"
-#include "BsEditorWidget.h"
-#include "BsMath.h"
-#include "BsPlatform.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const UINT32 GUITabbedTitleBar::TAB_SPACING = 20;
-	const UINT32 GUITabbedTitleBar::OPTION_BTN_SPACING = 3;
-
-	GUITabbedTitleBar::GUITabbedTitleBar(RenderWindow* parentWindow, const String& backgroundStyle, const String& tabBtnStyle, 
-		const String& minBtnStyle, const String& closeBtnStyle, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mParentWindow(parentWindow), mMinBtn(nullptr), 
-		mCloseBtn(nullptr), mBackgroundImage(nullptr), mUniqueTabIdx(0), mActiveTabIdx(0),
-		mDragInProgress(false), mDraggedBtn(nullptr), mDragBtnOffset(0), mInitialDragOffset(0), mBackgroundStyle(backgroundStyle),
-		mTabBtnStyle(tabBtnStyle), mMinimizeBtnStyle(minBtnStyle), mCloseBtnStyle(closeBtnStyle), mTempDraggedWidget(nullptr),
-		mTempDraggedTabIdx(0)
-	{
-		if(mBackgroundStyle == StringUtil::BLANK)
-			mBackgroundStyle = "TitleBarBackground";
-
-		if(mMinimizeBtnStyle == StringUtil::BLANK)
-			mMinimizeBtnStyle = "WinMinimizeBtn";
-
-		if(mCloseBtnStyle == StringUtil::BLANK)
-			mCloseBtnStyle = "WinCloseBtn";
-
-		if(mTabBtnStyle == StringUtil::BLANK)
-			mTabBtnStyle = "TabbedBarBtn";
-
-		mBackgroundImage = GUITexture::create(mBackgroundStyle);
-		_registerChildElement(mBackgroundImage);
-
-		mMinBtn = GUIButton::create(HString(L""), mMinimizeBtnStyle);
-		_registerChildElement(mMinBtn);
-
-		mCloseBtn = GUIButton::create(HString(L""), mCloseBtnStyle);
-		_registerChildElement(mCloseBtn);
-
-		mCloseBtn->onClick.connect(std::bind(&GUITabbedTitleBar::tabClosed, this));
-
-		mTabToggleGroup = GUIToggle::createToggleGroup();
-	}
-
-	GUITabbedTitleBar::~GUITabbedTitleBar()
-	{
-
-	}
-
-	GUITabbedTitleBar* GUITabbedTitleBar::create(RenderWindow* parentWindow, const String& backgroundStyle, 
-		const String& tabBtnStyle, const String& minBtnStyle, const String& closeBtnStyle)
-	{
-		return new (bs_alloc<GUITabbedTitleBar, PoolAlloc>()) GUITabbedTitleBar(parentWindow, backgroundStyle, tabBtnStyle, 
-			minBtnStyle, closeBtnStyle, GUILayoutOptions::create());
-	}
-
-	GUITabbedTitleBar* GUITabbedTitleBar::create(RenderWindow* parentWindow, const GUILayoutOptions& layoutOptions, 
-		const String& backgroundStyle, const String& tabBtnStyle, const String& minBtnStyle, const String& closeBtnStyle)
-	{
-		return new (bs_alloc<GUITabbedTitleBar, PoolAlloc>()) GUITabbedTitleBar(parentWindow, backgroundStyle, tabBtnStyle, 
-			minBtnStyle, closeBtnStyle, layoutOptions);
-	}
-
-	void GUITabbedTitleBar::addTab(const HString& name)
-	{
-		insertTab((UINT32)mTabButtons.size(), name);
-	}
-
-	UINT32 GUITabbedTitleBar::insertTab(UINT32 position, const HString& name)
-	{
-		GUITabButton* newTabToggle = GUITabButton::create(mTabToggleGroup, mUniqueTabIdx, name, mTabBtnStyle);
-		_registerChildElement(newTabToggle);
-
-		position = Math::clamp(position, 0U, (UINT32)mTabButtons.size());
-
-		UINT32 uniqueIdx = mUniqueTabIdx++;
-
-		newTabToggle->onToggled.connect(std::bind(&GUITabbedTitleBar::tabToggled, this, uniqueIdx, _1));
-		newTabToggle->onDragged.connect(std::bind(&GUITabbedTitleBar::tabDragged, this, _1, _2));
-		newTabToggle->onDragEnd.connect(std::bind(&GUITabbedTitleBar::tabDragEnd, this, _1, _2));
-
-		mTabButtons.insert(mTabButtons.begin() + position, newTabToggle);
-
-		return uniqueIdx;
-	}
-
-	void GUITabbedTitleBar::removeTab(UINT32 uniqueIdx)
-	{
-		INT32 idx = uniqueIdxToSeqIdx(uniqueIdx);
-		if(idx == -1)
-			return;
-
-		idx = (INT32)Math::clamp((UINT32)idx, 0U, (UINT32)mTabButtons.size() - 1);
-
-		GUIElement::destroy(mTabButtons[idx]);
-
-		mTabButtons.erase(mTabButtons.begin() + idx);
-	}
-
-	void GUITabbedTitleBar::setActive(UINT32 uniqueIdx)
-	{
-		mTabButtons[uniqueIdxToSeqIdx(uniqueIdx)]->toggleOn();
-	}
-
-	UINT32 GUITabbedTitleBar::getTabIdx(UINT32 position) const
-	{
-		return mTabButtons[position]->getIndex();
-	}
-
-	bool GUITabbedTitleBar::mouseEvent(const GUIMouseEvent& event)
-	{
-		if(event.getType() == GUIMouseEventType::MouseDragAndDropDragged)
-		{
-			if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-				return false;
-
-			EditorWidgetBase* draggedWidget = reinterpret_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-			const Vector2I& widgetRelPos = event.getPosition();
-
-			if(mTempDraggedWidget == nullptr)
-			{
-				UINT32 numTabButtons = (UINT32)mTabButtons.size();
-				for(UINT32 i = 0; i < numTabButtons; i++)
-				{
-					UINT32 width = mTabButtons[i]->_getWidth();
-					INT32 centerX = mTabButtons[i]->_getOffset().x + width / 2;
-
-					if((i + 1) == numTabButtons)
-					{
-						if(i == 0 && widgetRelPos.x <= centerX)
-						{
-							insertTab(0, draggedWidget->getDisplayName());
-							mTempDraggedTabIdx = mTabButtons[0]->getIndex();
-
-							break;
-						}
-						else if(widgetRelPos.x > centerX)
-						{
-							addTab(draggedWidget->getDisplayName());
-							mTempDraggedTabIdx = mTabButtons[i + 1]->getIndex();
-
-							break;
-						}
-					}
-					else
-					{
-						if(i == 0 && widgetRelPos.x <= centerX)
-						{
-							insertTab(0, draggedWidget->getDisplayName());
-							mTempDraggedTabIdx = mTabButtons[0]->getIndex();
-
-							break;
-						}
-						else
-						{
-							UINT32 nextWidth = mTabButtons[i + 1]->_getWidth();
-							INT32 nextCenterX = mTabButtons[i + 1]->_getOffset().x + nextWidth / 2;
-
-							if(widgetRelPos.x > centerX && widgetRelPos.x < nextCenterX)
-							{
-								insertTab(i + 1, draggedWidget->getDisplayName());
-								mTempDraggedTabIdx = mTabButtons[i + 1]->getIndex();
-
-								break;
-							}
-						}
-					}
-				}
-
-				mTempDraggedWidget = draggedWidget;
-				startDrag(uniqueIdxToSeqIdx(mTempDraggedTabIdx), Vector2I());
-				mInitialDragOffset = Math::roundToInt(mDraggedBtn->_getOptimalSize().x * 0.5f);
-			}
-
-			if(mTempDraggedWidget != nullptr)
-				tabDragged(mTempDraggedTabIdx, widgetRelPos);
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragAndDropDropped)
-		{
-			if(DragAndDropManager::instance().getDragTypeId() != (UINT32)DragAndDropType::EditorWidget)
-				return false;
-
-			EditorWidgetBase* draggedWidget = reinterpret_cast<EditorWidgetBase*>(DragAndDropManager::instance().getDragData());
-			const Vector2I& widgetRelPos = event.getPosition();
-
-			if(mTempDraggedWidget != nullptr)
-			{
-				UINT32 seqIdx = uniqueIdxToSeqIdx(mTempDraggedTabIdx);
-				removeTab(mTempDraggedTabIdx);
-
-				endDrag();
-
-				if(!onTabDraggedOn.empty())
-					onTabDraggedOn(seqIdx);
-			}
-
-			return true;
-		}
-		else if(event.getType() == GUIMouseEventType::MouseOut)
-		{
-			if(mTempDraggedWidget != nullptr)
-			{
-				removeTab(mTempDraggedTabIdx);
-
-				endDrag();
-			}
-		}
-
-		return false;
-	}
-
-	void GUITabbedTitleBar::updateClippedBounds()
-	{
-		Vector2I offset = _getOffset();
-		mClippedBounds = RectI(offset.x, offset.y, _getWidth(), _getHeight());
-	}
-
-	void GUITabbedTitleBar::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		Vector2I minBtnOptimalSize = mMinBtn->_getOptimalSize();
-		Vector2I closeBtnOptimalSize = mCloseBtn->_getOptimalSize();
-
-		UINT32 endButtonWidth = minBtnOptimalSize.x + closeBtnOptimalSize.x + OPTION_BTN_SPACING;
-
-		RectI tabClipRect = clipRect;
-		tabClipRect.width -= endButtonWidth;
-
-		{
-			Vector2I optimalSize = mBackgroundImage->_getOptimalSize();
-			Vector2I offset(x + 1, y + 1);
-			mBackgroundImage->_setOffset(offset);
-			mBackgroundImage->_setWidth(width - 2);
-			mBackgroundImage->_setHeight(optimalSize.y);
-			mBackgroundImage->_setAreaDepth(areaDepth + 2);
-			mBackgroundImage->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mBackgroundImage->_setClipRect(elemClipRect);
-		}
-
-		UINT32 curX = x + 1;
-		UINT32 curY = y;
-		UINT32 tabBtnHeight = 0;
-		for(UINT32 i = 0; i < (UINT32)mTabButtons.size(); i++)
-		{
-			GUITabButton* btn = mTabButtons[i];
-			Vector2I optimalSize = btn->_getOptimalSize();
-
-			tabBtnHeight = optimalSize.y;
-			curX += TAB_SPACING;
-
-			Vector2I offset;
-			if(!mDragInProgress || mDraggedBtn != btn)
-			{
-				offset = Vector2I(curX, curY);
-			}
-			else if(mDragInProgress && mDraggedBtn == btn)
-			{
-				offset = btn->_getOffset();
-				offset.x = mDragBtnOffset;
-			}
-
-			btn->_setOffset(offset);
-			btn->_setWidth(optimalSize.x);
-			btn->_setHeight(optimalSize.y);
-			btn->_setAreaDepth(areaDepth + 1);
-			btn->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(tabClipRect.x - offset.x, tabClipRect.y - offset.y, tabClipRect.width, tabClipRect.height);
-			btn->_setClipRect(elemClipRect);
-
-			curX += optimalSize.x;
-		}
-
-		INT32 optionBtnXPos = x + width - endButtonWidth - 1;
-		{
-			INT32 optionBtnYPos = curY + Math::floorToInt((tabBtnHeight - minBtnOptimalSize.y) * 0.5f);
-
-			Vector2I offset(optionBtnXPos, optionBtnYPos);
-			mMinBtn->_setOffset(offset);
-			mMinBtn->_setWidth(minBtnOptimalSize.x);
-			mMinBtn->_setHeight(minBtnOptimalSize.y);
-			mMinBtn->_setAreaDepth(areaDepth + 1);
-			mMinBtn->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mMinBtn->_setClipRect(elemClipRect);
-		}
-
-		optionBtnXPos += minBtnOptimalSize.x + OPTION_BTN_SPACING;
-		{
-			INT32 optionBtnYPos = curY + Math::floorToInt((tabBtnHeight - closeBtnOptimalSize.y) * 0.5f);
-
-			Vector2I offset(optionBtnXPos, optionBtnYPos);
-			mCloseBtn->_setOffset(offset);
-			mCloseBtn->_setWidth(closeBtnOptimalSize.x);
-			mCloseBtn->_setHeight(closeBtnOptimalSize.y);
-			mCloseBtn->_setAreaDepth(areaDepth + 1);
-			mCloseBtn->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mCloseBtn->_setClipRect(elemClipRect);
-		}
-	}
-
-	Vector<RectI> GUITabbedTitleBar::calcDraggableAreas(INT32 x, INT32 y, UINT32 width, UINT32 height) const
-	{
-		Vector<RectI> draggableAreas;
-
-		UINT32 curX = x + 1;
-		UINT32 curY = y;
-		for(UINT32 i = 0; i < (UINT32)mTabButtons.size(); i++)
-		{
-			GUITabButton* btn = mTabButtons[i];
-			Vector2I optimalSize = btn->_getOptimalSize();
-
-			draggableAreas.push_back(RectI(curX, curY, TAB_SPACING, height));
-
-			curX += TAB_SPACING + optimalSize.x;
-		}
-
-		Vector2I minBtnOptimalSize = mMinBtn->_getOptimalSize();
-		Vector2I closeBtnOptimalSize = mCloseBtn->_getOptimalSize();
-
-		UINT32 endButtonWidth = minBtnOptimalSize.x + closeBtnOptimalSize.x + OPTION_BTN_SPACING;
-		UINT32 remainingWidth = (UINT32)std::max(0, (INT32)(width - curX - endButtonWidth - 1));
-
-		if(remainingWidth > 0)
-			draggableAreas.push_back(RectI(curX, curY, remainingWidth, height));
-
-		return draggableAreas;
-	}
-
-	void GUITabbedTitleBar::tabToggled(UINT32 tabIdx, bool toggledOn)
-	{
-		if(!toggledOn)
-			return;
-
-		if(!onTabActivated.empty())
-			onTabActivated(tabIdx);
-
-		mActiveTabIdx = tabIdx;
-	}
-
-	void GUITabbedTitleBar::tabClosed()
-	{
-		removeTab(mActiveTabIdx);
-
-		if(!onTabClosed.empty())
-			onTabClosed(mActiveTabIdx);
-
-		if(mTabButtons.size() > 0)
-			mActiveTabIdx = mTabButtons[0]->getIndex();
-	}
-
-	void GUITabbedTitleBar::startDrag(UINT32 seqIdx, const Vector2I& startDragPos)
-	{
-		if(!mDragInProgress)
-		{
-			for(auto& btn : mTabButtons)
-				btn->_setDraggedState(true);
-
-			mDraggedBtn = mTabButtons[seqIdx];
-
-			Vector2I offset = mDraggedBtn->_getOffset();
-			mInitialDragOffset = (startDragPos.x - offset.x);
-
-			mDragInProgress = true;
-		}
-	}
-
-	void GUITabbedTitleBar::endDrag()
-	{
-		for(auto& btn : mTabButtons)
-			btn->_setDraggedState(false);
-
-		mTempDraggedWidget = nullptr;
-		mDragInProgress = false;
-		mDraggedBtn = nullptr;
-	}
-
-	void GUITabbedTitleBar::tabDragged(UINT32 tabIdx, const Vector2I& dragPos)
-	{
-		INT32 idx = uniqueIdxToSeqIdx(tabIdx);
-		if(idx != -1)
-		{
-			RectI bounds = getBounds();
-			if(bounds.contains(dragPos))
-			{
-				if(!mDragInProgress)
-					startDrag(idx, dragPos);
-
-				mDragBtnOffset = dragPos.x - mInitialDragOffset;
-
-				for(INT32 i = 0; i < idx; i++)
-				{
-					UINT32 width = mTabButtons[i]->_getWidth();
-					INT32 centerX = mTabButtons[i]->_getOffset().x + width / 2;
-
-					if(dragPos.x < centerX)
-					{
-						GUITabButton* temp = mTabButtons[i];
-						mTabButtons[i] = mTabButtons[idx];
-						mTabButtons[idx] = temp;
-
-						break;
-					}
-				}
-
-				for(UINT32 i = idx + 1; i < (UINT32)mTabButtons.size(); i++)
-				{
-					UINT32 width = mTabButtons[i]->_getWidth();
-					INT32 centerX = mTabButtons[i]->_getOffset().x + width / 2;
-
-					if(dragPos.x > centerX)
-					{
-						GUITabButton* temp = mTabButtons[i];
-						mTabButtons[i] = mTabButtons[idx];
-						mTabButtons[idx] = temp;
-
-						break;
-					}
-				}
-
-				markContentAsDirty();
-			}
-			else
-			{
-				endDrag();
-				markContentAsDirty();
-
-				if(!onTabDraggedOff.empty())
-					onTabDraggedOff(tabIdx);
-			}
-		}
-	}
-
-	void GUITabbedTitleBar::tabDragEnd(UINT32 tabIdx, const Vector2I& dragPos)
-	{
-		endDrag();
-
-		if(mActiveTabIdx != tabIdx)
-			tabToggled(tabIdx, true);
-
-		markContentAsDirty();
-	}
-
-	INT32 GUITabbedTitleBar::uniqueIdxToSeqIdx(UINT32 uniqueIdx) const
-	{
-		UINT32 idx = 0;
-		for(auto& tab : mTabButtons)
-		{
-			if(tab->getIndex() == uniqueIdx)
-				return idx;
-
-			idx++;
-		}
-
-		return -1;
-	}
-
-	const String& GUITabbedTitleBar::getGUITypeName()
-	{
-		static String typeName = "TabbedTitleBar";
-		return typeName;
-	}
-}

+ 0 - 41
BansheeEditor/Source/BsGUITextField.cpp

@@ -1,41 +0,0 @@
-#include "BsGUITextField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIInputBox.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	GUITextField::GUITextField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, UINT32 labelWidth, 
-		const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mInputBox(nullptr)
-	{
-		mInputBox = GUIInputBox::create(false, inputBoxStyle);
-		mLayout->addElement(mInputBox);
-	}
-
-	GUITextField::~GUITextField()
-	{
-
-	}
-
-	WString GUITextField::getValue() const
-	{
-		return mInputBox->getText();
-	}
-
-	void GUITextField::setValue(const WString& value)
-	{
-		mInputBox->setText(value);
-	}
-
-	const String& GUITextField::getGUITypeName()
-	{
-		static String typeName = "GUITextField";
-		return typeName;
-	}
-}

+ 0 - 39
BansheeEditor/Source/BsGUIToggleField.cpp

@@ -1,39 +0,0 @@
-#include "BsGUIToggleField.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIToggle.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	GUIToggleField::GUIToggleField(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& labelStyle, const String& toggleStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mToggle(nullptr)
-	{
-		mToggle = GUIToggle::create(HString(L""), toggleStyle);
-		mLayout->addElement(mToggle);
-	}
-
-	bool GUIToggleField::getValue() const
-	{
-		return mToggle->isToggled();
-	}
-
-	void GUIToggleField::setValue(bool value)
-	{
-		if(value) 
-			mToggle->toggleOn();
-		else
-			mToggle->toggleOff();
-	}
-
-	const String& GUIToggleField::getGUITypeName()
-	{
-		static String typeName = "GUIToggleField";
-		return typeName;
-	}
-}

+ 0 - 1204
BansheeEditor/Source/BsGUITreeView.cpp

@@ -1,1204 +0,0 @@
-#include "BsGUITreeView.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUITexture.h"
-#include "BsGUIButton.h"
-#include "BsGUILabel.h"
-#include "BsGUISpace.h"
-#include "BsGUIWidget.h"
-#include "BsGUIToggle.h"
-#include "BsGUITreeViewEditBox.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUISkin.h"
-#include "BsGUICommandEvent.h"
-#include "BsGUIVirtualButtonEvent.h"
-#include "BsGUIScrollArea.h"
-#include "BsDragAndDropManager.h"
-#include "BsTime.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const UINT32 GUITreeView::ELEMENT_EXTRA_SPACING = 3;
-	const UINT32 GUITreeView::INDENT_SIZE = 10;
-	const UINT32 GUITreeView::INITIAL_INDENT_OFFSET = 16;
-	const UINT32 GUITreeView::DRAG_MIN_DISTANCE = 3;
-	const float GUITreeView::AUTO_EXPAND_DELAY_SEC = 0.5f;
-	const float GUITreeView::SCROLL_AREA_HEIGHT_PCT = 0.1f;
-	const UINT32 GUITreeView::SCROLL_SPEED_PX_PER_SEC = 25;
-
-	VirtualButton GUITreeView::mRenameVB = VirtualButton("Rename");
-	VirtualButton GUITreeView::mDeleteVB = VirtualButton("Delete");
-
-	GUITreeView::TreeElement::TreeElement()
-		:mParent(nullptr), mFoldoutBtn(nullptr), mElement(nullptr), mIsSelected(false),
-		mIsExpanded(false), mSortedIdx(0), mIsVisible(true)
-	{ }
-
-	GUITreeView::TreeElement::~TreeElement()
-	{
-		for(auto& child : mChildren)
-			bs_delete(child);
-
-		if(mFoldoutBtn != nullptr)
-			GUIElement::destroy(mFoldoutBtn);
-
-		if(mElement != nullptr)
-			GUIElement::destroy(mElement);
-
-		mChildren.clear();
-	}
-
-	bool GUITreeView::TreeElement::isParentRec(TreeElement* element) const
-	{
-		TreeElement* curParent = mParent;
-		while(curParent != nullptr)
-		{
-			if(curParent == element)
-				return true;
-
-			curParent = curParent->mParent;
-		}
-
-		return false;
-	}
-
-	GUITreeView::TreeElement* GUITreeView::InteractableElement::getTreeElement() const
-	{
-		if(!isTreeElement())
-			return nullptr;
-
-		UINT32 sortedIdx = (index - 1) / 2;
-
-		auto findIter = std::find_if(parent->mChildren.begin(), parent->mChildren.end(),
-			[&](const TreeElement* x) { return x->mSortedIdx == sortedIdx; });
-
-		if(findIter != parent->mChildren.end())
-			return *findIter;
-
-		return nullptr;
-	}
-
-	GUITreeView::GUITreeView(const String& backgroundStyle, const String& elementBtnStyle, 
-		const String& foldoutBtnStyle, const String& selectionBackgroundStyle, const String& editBoxStyle, 
-		const String& dragHighlightStyle, const String& dragSepHighlightStyle, const GUILayoutOptions& layoutOptions)
-		:GUIElementContainer(layoutOptions), mBackgroundStyle(backgroundStyle),
-		mElementBtnStyle(elementBtnStyle), mFoldoutBtnStyle(foldoutBtnStyle), mEditBoxStyle(editBoxStyle), mEditElement(nullptr), mIsElementSelected(false),
-		mNameEditBox(nullptr), mSelectionBackgroundStyle(selectionBackgroundStyle), mDragInProgress(nullptr), mDragHighlightStyle(dragHighlightStyle),
-		mDragSepHighlightStyle(dragSepHighlightStyle), mDragHighlight(nullptr), mDragSepHighlight(nullptr), mMouseOverDragElement(nullptr), mMouseOverDragElementTime(0.0f),
-		mScrollState(ScrollState::None), mLastScrollTime(0.0f)
-	{
-		if(mBackgroundStyle == StringUtil::BLANK)
-			mBackgroundStyle = "TreeViewBackground";
-
-		if(mElementBtnStyle == StringUtil::BLANK)
-			mElementBtnStyle = "TreeViewElementBtn";
-
-		if(mFoldoutBtnStyle == StringUtil::BLANK)
-			mFoldoutBtnStyle = "TreeViewFoldoutBtn";
-
-		if(mSelectionBackgroundStyle == StringUtil::BLANK)
-			mSelectionBackgroundStyle = "TreeViewSelectionBackground";
-
-		if(mEditBoxStyle == StringUtil::BLANK)
-			mEditBoxStyle = "TreeViewEditBox";
-
-		if(mDragHighlightStyle == StringUtil::BLANK)
-			mDragHighlightStyle = "TreeViewElementHighlight";
-
-		if(mDragSepHighlightStyle == StringUtil::BLANK)
-			mDragSepHighlightStyle = "TreeViewElementSepHighlight";
-
-		mBackgroundImage = GUITexture::create(mBackgroundStyle);
-		mNameEditBox = GUITreeViewEditBox::create(mEditBoxStyle);
-		mNameEditBox->disableRecursively();
-
-		mNameEditBox->onInputConfirmed.connect(std::bind(&GUITreeView::onEditAccepted, this));
-		mNameEditBox->onInputCanceled.connect(std::bind(&GUITreeView::onEditCanceled, this));
-
-		mDragHighlight = GUITexture::create(mDragHighlightStyle);
-		mDragSepHighlight = GUITexture::create(mDragSepHighlightStyle);
-
-		mDragHighlight->disableRecursively();
-		mDragSepHighlight->disableRecursively();
-
-		_registerChildElement(mBackgroundImage);
-		_registerChildElement(mNameEditBox);
-		_registerChildElement(mDragHighlight);
-		_registerChildElement(mDragSepHighlight);
-	}
-
-	GUITreeView::~GUITreeView()
-	{
-
-	}
-
-	void GUITreeView::update()
-	{
-		// Attempt to auto-expand elements we are dragging over
-		if(acceptDragAndDrop())
-		{
-			const GUITreeView::InteractableElement* element = findElementUnderCoord(mDragPosition);
-			temporarilyExpandElement(element);
-		}
-
-		// NOTE - Instead of iterating through every visible element and comparing it with internal values,
-		// I might just want to add callbacks to SceneManager that notify me of any changes and then only perform
-		// update if anything is actually dirty
-
-		updateTreeElementHierarchy();
-
-		// Attempt to scroll if needed
-		if(mScrollState != ScrollState::None)
-		{
-			GUIScrollArea* scrollArea = findParentScrollArea();
-			if(scrollArea != nullptr)
-			{
-				float curTime = gTime().getTime();
-				float timeDiff = curTime - mLastScrollTime;
-				float secondsPerPixel = 1.0f / SCROLL_SPEED_PX_PER_SEC;
-
-				switch(mScrollState)
-				{
-				case ScrollState::TransitioningUp:
-					mScrollState = ScrollState::Up;
-					mLastScrollTime = curTime;
-					break;
-				case ScrollState::TransitioningDown:
-					mScrollState = ScrollState::Down;
-					mLastScrollTime = curTime;
-					break;
-				case ScrollState::Up:
-					{
-						UINT32 scrollAmount = (UINT32)Math::floorToInt(timeDiff / secondsPerPixel);
-						mLastScrollTime += scrollAmount * secondsPerPixel;
-
-						scrollArea->scrollUpPx(scrollAmount);
-					}
-					break;
-				case ScrollState::Down:
-					{
-						UINT32 scrollAmount = (UINT32)Math::floorToInt(timeDiff / secondsPerPixel);
-						mLastScrollTime += scrollAmount * secondsPerPixel;
-
-						scrollArea->scrollDownPx(scrollAmount);
-					}
-					break;
-				}
-			}
-		}
-	}
-
-	bool GUITreeView::mouseEvent(const GUIMouseEvent& event)
-	{
-		if(event.getType() == GUIMouseEventType::MouseUp)
-		{
-			if(DragAndDropManager::instance().isDragInProgress())
-				return false;
-
-			const GUITreeView::InteractableElement* element = findElementUnderCoord(event.getPosition());
-			TreeElement* treeElement = nullptr;
-
-			if(element != nullptr && element->isTreeElement())
-			{
-				treeElement = element->getTreeElement();
-			}
-
-			if(treeElement != nullptr && event.getPosition().x >= treeElement->mElement->getBounds().x)
-			{
-				if(event.isCtrlDown())
-				{
-					selectElement(treeElement);
-				}
-				else if(event.isShiftDown())
-				{
-					if(isSelectionActive())
-					{
-						TreeElement* selectionRoot = mSelectedElements[0].element;
-						unselectAll();
-
-						auto iterStartFind = std::find_if(mVisibleElements.begin(), mVisibleElements.end(),
-							[&] (const InteractableElement& x) { return x.parent == selectionRoot->mParent; } );
-
-						bool foundStart = false;
-						bool foundEnd = false;
-						for(; iterStartFind != mVisibleElements.end(); ++iterStartFind)
-						{
-							if(!iterStartFind->isTreeElement())
-								continue;
-
-							TreeElement* curElem = iterStartFind->getTreeElement();
-							if(curElem == selectionRoot)
-							{
-								foundStart = true;
-								break;
-							}
-						}
-
-						auto iterEndFind = std::find_if(mVisibleElements.begin(), mVisibleElements.end(),
-							[&] (const InteractableElement& x) { return &x == element; } );
-
-						if(iterEndFind != mVisibleElements.end())
-							foundEnd = true;
-
-						if(foundStart && foundEnd)
-						{
-							if(iterStartFind < iterEndFind)
-							{
-								for(;iterStartFind != (iterEndFind + 1); ++iterStartFind)
-								{
-									if(iterStartFind->isTreeElement())
-										selectElement(iterStartFind->getTreeElement());
-								}
-							}
-							else if(iterEndFind < iterStartFind)
-							{
-								for(;iterEndFind != (iterStartFind + 1); ++iterEndFind)
-								{
-									if(iterEndFind->isTreeElement())
-										selectElement(iterEndFind->getTreeElement());
-								}
-							}
-							else
-								selectElement(treeElement);
-						}
-
-						if(!foundStart || !foundEnd)
-							selectElement(treeElement);
-					}
-					else
-					{
-						selectElement(treeElement);
-					}
-				}
-				else
-				{
-					unselectAll();
-					selectElement(treeElement);
-				}
-
-				markContentAsDirty();
-
-				return true;
-			}
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragStart)
-		{
-			mDragStartPosition = event.getPosition();
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDrag)
-		{
-			UINT32 dist = mDragStartPosition.manhattanDist(event.getPosition());
-
-			if(!DragAndDropManager::instance().isDragInProgress())
-			{
-				if(dist > DRAG_MIN_DISTANCE)
-				{
-					const GUITreeView::InteractableElement* element = findElementUnderCoord(mDragStartPosition);
-					TreeElement* treeElement = nullptr;
-
-					if(element != nullptr && element->isTreeElement())
-					{
-						// If element we are trying to drag isn't selected, select it
-						TreeElement* treeElement = element->getTreeElement();
-						auto iterFind = std::find_if(mSelectedElements.begin(), mSelectedElements.end(), 
-							[&] (const SelectedElement& x) { return x.element == treeElement; });
-
-						if(iterFind == mSelectedElements.end())
-						{
-							unselectAll();
-							selectElement(element->getTreeElement());
-						}						
-					}
-
-					dragAndDropStart();
-
-					mDragPosition = event.getPosition();
-					mDragInProgress = true;
-					mScrollState = ScrollState::None;
-					markContentAsDirty();
-				}
-			}
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragAndDropDragged)
-		{
-			if(acceptDragAndDrop())
-			{
-				mDragPosition = event.getPosition();
-				mDragInProgress = true;
-				markContentAsDirty();
-
-				if(mBottomScrollBounds.contains(mDragPosition))
-				{
-					if(mScrollState != ScrollState::Down)
-						mScrollState = ScrollState::TransitioningDown;
-				}
-				else if(mTopScrollBounds.contains(mDragPosition))
-				{
-					if(mScrollState != ScrollState::Up)
-						mScrollState = ScrollState::TransitioningUp;
-				}
-				else
-					mScrollState = ScrollState::None;
-
-				return true;
-			}
-		}
-		else if(event.getType() == GUIMouseEventType::MouseDragAndDropDropped)
-		{
-			if(acceptDragAndDrop())
-			{
-				const GUITreeView::InteractableElement* element = findElementUnderCoord(event.getPosition());
-
-				TreeElement* treeElement = nullptr;
-				if(element != nullptr)
-				{
-					if(element->isTreeElement())
-						treeElement = element->getTreeElement();
-					else
-						treeElement = element->parent;
-				}
-
-				dragAndDropEnded(treeElement);
-				unselectAll();
-
-				return true;
-			}
-		}
-		else if(event.getType() == GUIMouseEventType::MouseOut)
-		{
-			mDragInProgress = false;
-			markContentAsDirty();
-		}
-
-		return false;
-	}
-
-	bool GUITreeView::commandEvent(const GUICommandEvent& ev)
-	{
-		if(ev.getType() == GUICommandEventType::MoveUp || ev.getType() == GUICommandEventType::SelectUp)
-		{
-			TreeElement* topMostElement = getTopMostSelectedElement();
-			auto topMostIter = std::find_if(mVisibleElements.begin(), mVisibleElements.end(), 
-				[&] (const InteractableElement& x) { return x.getTreeElement() == topMostElement; });
-
-			if(topMostIter != mVisibleElements.end() && topMostIter != mVisibleElements.begin())
-			{
-				do 
-				{
-					topMostIter--;
-				} while (!topMostIter->isTreeElement() && topMostIter != mVisibleElements.begin());
-
-				if(topMostIter->isTreeElement())
-				{
-					if(ev.getType() == GUICommandEventType::MoveUp)
-						unselectAll();
-
-					TreeElement* treeElement = topMostIter->getTreeElement();
-					selectElement(treeElement);
-					scrollToElement(treeElement, false);
-				}
-			}
-		}
-		else if(ev.getType() == GUICommandEventType::MoveDown || ev.getType() == GUICommandEventType::SelectDown)
-		{
-			TreeElement* bottoMostElement = getBottomMostSelectedElement();
-			auto bottomMostIter = std::find_if(mVisibleElements.begin(), mVisibleElements.end(), 
-				[&] (const InteractableElement& x) { return x.getTreeElement() == bottoMostElement; });
-
-			if(bottomMostIter != mVisibleElements.end())
-			{
-				do 
-				{
-					bottomMostIter++;
-				} while (bottomMostIter != mVisibleElements.end() && !bottomMostIter->isTreeElement());
-
-				if(bottomMostIter != mVisibleElements.end() && bottomMostIter->isTreeElement())
-				{
-					if(ev.getType() == GUICommandEventType::MoveDown)
-						unselectAll();
-
-					TreeElement* treeElement = bottomMostIter->getTreeElement();
-					selectElement(treeElement);
-					scrollToElement(treeElement, false);
-				}
-			}
-		}
-
-		return false;
-	}
-
-	bool GUITreeView::virtualButtonEvent(const GUIVirtualButtonEvent& ev)
-	{
-		if(ev.getButton() == mRenameVB)
-		{
-			if(isSelectionActive() && mEditElement == nullptr)
-			{
-				enableEdit(mSelectedElements[0].element);
-				unselectAll();
-			}
-
-			return true;
-		}
-		else if(ev.getButton() == mDeleteVB)
-		{
-			if(isSelectionActive())
-			{
-				auto isChildOf = [&] (const TreeElement* parent, const TreeElement* child)
-				{
-					const TreeElement* elem = child;
-
-					while(elem != nullptr && elem != parent)
-						elem = child->mParent;
-
-					return elem == parent;
-				};
-
-				// Ensure we don't unnecessarily try to delete children if their
-				// parent is getting deleted anyway
-				Vector<TreeElement*> elementsToDelete;
-				for(UINT32 i = 0; i < (UINT32)mSelectedElements.size(); i++)
-				{
-					bool hasDeletedParent = false;
-					for(UINT32 j = i + 1; j < (UINT32)mSelectedElements.size(); j++)
-					{
-						if(isChildOf(mSelectedElements[j].element, mSelectedElements[i].element))
-						{
-							hasDeletedParent = true;
-							break;
-						}
-					}
-
-					if(!hasDeletedParent)
-						elementsToDelete.push_back(mSelectedElements[i].element);
-				}
-
-				unselectAll();
-
-				for(auto& elem : elementsToDelete)
-					deleteTreeElement(elem);
-			}
-		}
-
-		return false;
-	}
-
-	bool GUITreeView::isSelectionActive() const
-	{
-		return mIsElementSelected && mSelectedElements.size() > 0;
-	}
-
-	void GUITreeView::selectElement(TreeElement* element)
-	{
-		auto iterFind = std::find_if(mSelectedElements.begin(), mSelectedElements.end(), 
-			[&] (const SelectedElement& x) { return x.element == element; });
-
-		if(iterFind == mSelectedElements.end())
-		{
-			GUITexture* background = GUITexture::create(mSelectionBackgroundStyle);
-			_registerChildElement(background);
-
-			element->mIsSelected = true;
-
-			mSelectedElements.push_back(SelectedElement(element, background));
-			mIsElementSelected = true;
-		}
-	}
-
-	void GUITreeView::unselectElement(TreeElement* element)
-	{
-		auto iterFind = std::find_if(mSelectedElements.begin(), mSelectedElements.end(), 
-			[&] (const SelectedElement& x) { return x.element == element; });
-
-		if(iterFind != mSelectedElements.end())
-		{
-			iterFind->element->mIsSelected = false;
-			GUIElement::destroy(iterFind->background);
-
-			mSelectedElements.erase(iterFind);
-			markContentAsDirty();
-		}
-
-		mIsElementSelected = mSelectedElements.size() > 0;
-	}
-
-	void GUITreeView::unselectAll()
-	{
-		for(auto& selectedElem : mSelectedElements)
-		{
-			selectedElem.element->mIsSelected = false;
-			GUIElement::destroy(selectedElem.background);
-		}
-
-		mSelectedElements.clear();
-		mIsElementSelected = false;
-
-		markContentAsDirty();
-	}
-
-	void GUITreeView::expandElement(TreeElement* element)
-	{
-		if(element->mIsExpanded)
-			return;
-
-		element->mIsExpanded = true;
-
-		if(element->mParent == nullptr || (element->mParent->mIsVisible && element->mParent->mIsExpanded))
-		{
-			Stack<TreeElement*> todo;
-			todo.push(element);
-
-			while(!todo.empty())
-			{
-				TreeElement* curElem = todo.top();
-				todo.pop();
-
-				curElem->mIsVisible = true;
-				updateElementGUI(curElem);
-
-				if(curElem->mIsExpanded)
-				{
-					for(auto& child : curElem->mChildren)
-						todo.push(child);
-				}
-			}
-		}
-	}
-
-	void GUITreeView::collapseElement(TreeElement* element)
-	{
-		if(!element->mIsExpanded)
-			return;
-
-		element->mIsExpanded = false;
-		updateElementGUI(element);
-
-		if(element->mParent == nullptr || (element->mParent->mIsVisible && element->mParent->mIsExpanded))
-		{
-			Stack<TreeElement*> todo;
-
-			for(auto& child : element->mChildren)
-				todo.push(child);
-
-			while(!todo.empty())
-			{
-				TreeElement* curElem = todo.top();
-				todo.pop();
-
-				curElem->mIsVisible = false;
-				if(curElem->mIsSelected)
-					unselectElement(curElem);
-
-				updateElementGUI(curElem);
-
-				if(curElem->mIsExpanded)
-				{
-					for(auto& child : curElem->mChildren)
-						todo.push(child);
-				}
-			}
-		}
-	}
-
-	void GUITreeView::updateElementGUI(TreeElement* element)
-	{
-		if(element == &getRootElement())
-			return;
-
-		if(element->mIsVisible)
-		{
-			HString name(toWString(element->mName));
-			if(element->mElement == nullptr)
-			{
-				element->mElement = GUILabel::create(name, mElementBtnStyle);
-				_registerChildElement(element->mElement);
-			}
-
-			if(element->mChildren.size() > 0)
-			{
-				if(element->mFoldoutBtn == nullptr)
-				{
-					element->mFoldoutBtn = GUIToggle::create(GUIContent(HString(L"")), mFoldoutBtnStyle);
-					_registerChildElement(element->mFoldoutBtn);
-
-					element->mFoldoutBtn->onToggled.connect(std::bind(&GUITreeView::elementToggled, this, element, _1));
-
-					if(element->mIsExpanded)
-						element->mFoldoutBtn->toggleOn();
-				}
-			}
-			else
-			{
-				if(element->mFoldoutBtn != nullptr)
-				{
-					GUIElement::destroy(element->mFoldoutBtn);
-					element->mFoldoutBtn = nullptr;
-				}
-			}
-
-			element->mElement->setContent(GUIContent(name));
-		}
-		else
-		{
-			if(element->mElement != nullptr)
-			{
-				GUIElement::destroy(element->mElement);
-				element->mElement = nullptr;
-			}
-
-			if(element->mFoldoutBtn != nullptr)
-			{
-				GUIElement::destroy(element->mFoldoutBtn);
-				element->mFoldoutBtn = nullptr;
-			}
-
-			if(element->mIsSelected && element->mIsExpanded)
-				unselectElement(element);
-		}
-
-		markContentAsDirty();
-	}
-
-	void GUITreeView::elementToggled(TreeElement* element, bool toggled)
-	{
-		if(toggled)
-			expandElement(element);
-		else
-			collapseElement(element);
-	}
-
-	void GUITreeView::onEditAccepted()
-	{
-		disableEdit(true);
-	}
-
-	void GUITreeView::onEditCanceled()
-	{
-		if(mEditElement != nullptr)
-			disableEdit(false);
-	}
-
-	void GUITreeView::enableEdit(TreeElement* element)
-	{
-		assert(mEditElement == nullptr);
-
-		mEditElement = element;
-		mNameEditBox->enableRecursively();
-		mNameEditBox->setFocus(true);
-
-		if(element->mElement != nullptr)
-			element->mElement->disableRecursively();
-	}
-
-	void GUITreeView::disableEdit(bool applyChanges)
-	{
-		assert(mEditElement != nullptr);
-
-		if(mEditElement->mElement != nullptr)
-			mEditElement->mElement->enableRecursively();
-
-		if(applyChanges)
-		{
-			WString newName = mNameEditBox->getText();
-			renameTreeElement(mEditElement, newName);
-		}
-
-		mNameEditBox->disableRecursively();
-		mEditElement = nullptr;
-	}
-
-	Vector2I GUITreeView::_getOptimalSize() const
-	{
-		struct UpdateTreeElement
-		{
-			UpdateTreeElement(const TreeElement* element, UINT32 indent)
-				:element(element), indent(indent)
-			{ }
-
-			const TreeElement* element;
-			UINT32 indent;
-		};
-
-		Vector2I optimalSize;
-
-		if(_getLayoutOptions().fixedWidth && _getLayoutOptions().fixedHeight)
-		{
-			optimalSize.x = _getLayoutOptions().width;
-			optimalSize.y = _getLayoutOptions().height;
-		}
-		else
-		{
-			Stack<UpdateTreeElement> todo;
-			todo.push(UpdateTreeElement(&getRootElementConst(), 0));
-
-			while(!todo.empty())
-			{
-				UpdateTreeElement currentUpdateElement = todo.top();
-				const TreeElement* current = currentUpdateElement.element;
-				todo.pop();
-
-				INT32 yOffset = 0;
-				if(current->mElement != nullptr)
-				{
-					Vector2I curOptimalSize = current->mElement->_getOptimalSize();
-					optimalSize.x = std::max(optimalSize.x, 
-						(INT32)(INITIAL_INDENT_OFFSET + curOptimalSize.x + currentUpdateElement.indent * INDENT_SIZE));
-					yOffset = curOptimalSize.y + ELEMENT_EXTRA_SPACING;
-				}
-
-				optimalSize.y += yOffset;
-
-				for(auto& child : current->mChildren)
-				{
-					if(!child->mIsVisible)
-						continue;
-
-					todo.push(UpdateTreeElement(child, currentUpdateElement.indent + 1));
-				}
-			}
-
-			if(_getLayoutOptions().fixedWidth)
-				optimalSize.x = _getLayoutOptions().width;
-			else
-			{
-				if(_getLayoutOptions().minWidth > 0)
-					optimalSize.x = std::max((INT32)_getLayoutOptions().minWidth, optimalSize.x);
-
-				if(_getLayoutOptions().maxWidth > 0)
-					optimalSize.x = std::min((INT32)_getLayoutOptions().maxWidth, optimalSize.x);
-			}
-
-			if(_getLayoutOptions().fixedHeight)
-				optimalSize.y = _getLayoutOptions().height;
-			else
-			{
-				if(_getLayoutOptions().minHeight > 0)
-					optimalSize.y = std::max((INT32)_getLayoutOptions().minHeight, optimalSize.y);
-
-				if(_getLayoutOptions().maxHeight > 0)
-					optimalSize.y = std::min((INT32)_getLayoutOptions().maxHeight, optimalSize.y);
-			}
-		}
-
-		return optimalSize;
-	}
-
-	void GUITreeView::updateClippedBounds()
-	{
-		Vector2I offset = _getOffset();
-		mClippedBounds = RectI(offset.x, offset.y, _getWidth(), _getHeight());
-
-		RectI localClipRect(mClipRect.x + mOffset.x, mClipRect.y + mOffset.y, mClipRect.width, mClipRect.height);
-		mClippedBounds.clip(localClipRect);
-	}
-
-	void GUITreeView::_updateLayoutInternal(INT32 x, INT32 y, UINT32 width, UINT32 height,
-		RectI clipRect, UINT8 widgetDepth, UINT16 areaDepth)
-	{
-		struct UpdateTreeElement
-		{
-			UpdateTreeElement(TreeElement* element, UINT32 indent)
-				:element(element), indent(indent)
-			{ }
-
-			TreeElement* element;
-			UINT32 indent;
-		};
-
-		mVisibleElements.clear();
-
-		Stack<UpdateTreeElement> todo;
-		todo.push(UpdateTreeElement(&getRootElement(), 0));
-
-		// NOTE - Instead of iterating through all elements, try to find those within the clip rect
-		// and only iterate through those. Others should somehow be marked in-active (similar to GUIElement::isDisabled()?)
-
-		Vector<TreeElement*> tempOrderedElements;
-
-		Vector2I offset(x, y);
-
-		while(!todo.empty())
-		{
-			UpdateTreeElement currentUpdateElement = todo.top();
-			TreeElement* current = currentUpdateElement.element;
-			UINT32 indent = currentUpdateElement.indent;
-			todo.pop();
-
-			INT32 btnHeight = 0;
-			INT32 yOffset = 0;
-			if(current->mElement != nullptr)
-			{
-				Vector2I elementSize = current->mElement->_getOptimalSize();
-				btnHeight = elementSize.y;
-
-				mVisibleElements.push_back(InteractableElement(current->mParent, current->mSortedIdx * 2 + 0, RectI(x, offset.y, width, ELEMENT_EXTRA_SPACING)));
-				mVisibleElements.push_back(InteractableElement(current->mParent, current->mSortedIdx * 2 + 1, RectI(x, offset.y + ELEMENT_EXTRA_SPACING, width, btnHeight)));
-
-				offset.x = x + INITIAL_INDENT_OFFSET + indent * INDENT_SIZE;
-				offset.y += ELEMENT_EXTRA_SPACING;
-
-				current->mElement->_setOffset(offset);
-				current->mElement->_setWidth(elementSize.x);
-				current->mElement->_setHeight(elementSize.y);
-				current->mElement->_setAreaDepth(areaDepth);
-				current->mElement->_setWidgetDepth(widgetDepth);
-
-				RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-				current->mElement->_setClipRect(elemClipRect);
-
-				yOffset = btnHeight;
-			}
-
-			if(current->mFoldoutBtn != nullptr)
-			{
-				Vector2I elementSize = current->mFoldoutBtn->_getOptimalSize();
-
-				offset.x -= std::min((INT32)INITIAL_INDENT_OFFSET, elementSize.x);
-
-				Vector2I myOffset = offset;
-				myOffset.y -= 2; // TODO: Arbitrary offset, I should adjust it based on font baseline so that the button is nicely centered on text
-
-				if(elementSize.y > btnHeight)
-				{
-					UINT32 diff = elementSize.y - btnHeight;
-					float half = diff * 0.5f;
-					myOffset.y -= Math::floorToInt(half);
-				}
-
-				current->mFoldoutBtn->_setOffset(myOffset);
-				current->mFoldoutBtn->_setWidth(elementSize.x);
-				current->mFoldoutBtn->_setHeight(elementSize.y);
-				current->mFoldoutBtn->_setAreaDepth(areaDepth);
-				current->mFoldoutBtn->_setWidgetDepth(widgetDepth);
-
-				RectI elemClipRect(clipRect.x - myOffset.x, clipRect.y - myOffset.y, clipRect.width, clipRect.height);
-				current->mFoldoutBtn->_setClipRect(elemClipRect);
-			}
-
-			offset.y += yOffset;
-
-			tempOrderedElements.resize(current->mChildren.size(), nullptr);
-			for(auto& child : current->mChildren)
-			{
-				tempOrderedElements[child->mSortedIdx] = child;
-			}
-
-			for(auto iter = tempOrderedElements.rbegin(); iter != tempOrderedElements.rend(); ++iter)
-			{
-				TreeElement* child = *iter;
-
-				if(!child->mIsVisible)
-					continue;
-
-				todo.push(UpdateTreeElement(child, indent + 1));
-			}
-		}
-
-		UINT32 remainingHeight = (UINT32)std::max(0, (INT32)height - (offset.y - y));
-
-		if(remainingHeight > 0)
-			mVisibleElements.push_back(InteractableElement(&getRootElement(), (UINT32)getRootElement().mChildren.size() * 2, RectI(x, offset.y, width, remainingHeight)));
-
-		for(auto selectedElem : mSelectedElements)
-		{
-			GUILabel* targetElement = selectedElem.element->mElement;
-
-			Vector2I offset = targetElement->_getOffset();
-			offset.x = x;
-
-			selectedElem.background->_setOffset(offset);
-			selectedElem.background->_setWidth(width);
-			selectedElem.background->_setHeight(targetElement->_getHeight());
-			selectedElem.background->_setAreaDepth(areaDepth + 1);
-			selectedElem.background->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			selectedElem.background->_setClipRect(elemClipRect);
-		}
-
-		if(mEditElement != nullptr)
-		{
-			GUILabel* targetElement = mEditElement->mElement;
-
-			Vector2I offset = targetElement->_getOffset();
-			UINT32 remainingWidth = (UINT32)std::max(0, (((INT32)width) - (offset.x - x)));
-
-			mNameEditBox->_setOffset(offset);
-			mNameEditBox->_setWidth(remainingWidth);
-			mNameEditBox->_setHeight(targetElement->_getHeight());
-			mNameEditBox->_setAreaDepth(areaDepth);
-			mNameEditBox->_setWidgetDepth(widgetDepth);
-
-			RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-			mNameEditBox->_setClipRect(elemClipRect);
-
-		}
-
-		if(mDragInProgress)
-		{
-			const InteractableElement* interactableElement = findElementUnderCoord(mDragPosition);
-
-			if(interactableElement == nullptr)
-			{
-				if(!mDragHighlight->_isDisabled())
-					mDragHighlight->disableRecursively();
-
-				if(!mDragSepHighlight->_isDisabled())
-					mDragSepHighlight->disableRecursively();
-			}
-			else
-			{
-				if(interactableElement->isTreeElement())
-				{
-					if(!mDragSepHighlight->_isDisabled())
-						mDragSepHighlight->disableRecursively();
-
-					if(mDragHighlight->_isDisabled())
-						mDragHighlight->enableRecursively();
-
-					Vector2I offset(interactableElement->bounds.x, interactableElement->bounds.y);
-					mDragHighlight->_setOffset(offset);
-					mDragHighlight->_setWidth(interactableElement->bounds.width);
-					mDragHighlight->_setHeight(interactableElement->bounds.height);
-					mDragHighlight->_setAreaDepth(areaDepth + 1);
-					mDragHighlight->_setWidgetDepth(widgetDepth);
-
-					RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-					mDragHighlight->_setClipRect(elemClipRect);
-				}
-				else
-				{
-					if(!mDragHighlight->_isDisabled())
-						mDragHighlight->disableRecursively();
-
-					if(mDragSepHighlight->_isDisabled())
-						mDragSepHighlight->enableRecursively();
-
-					Vector2I offset(interactableElement->bounds.x, interactableElement->bounds.y);
-					mDragSepHighlight->_setOffset(offset);
-					mDragSepHighlight->_setWidth(interactableElement->bounds.width);
-					mDragSepHighlight->_setHeight(interactableElement->bounds.height);
-					mDragSepHighlight->_setAreaDepth(areaDepth + 1);
-					mDragSepHighlight->_setWidgetDepth(widgetDepth);
-
-					RectI elemClipRect(clipRect.x - offset.x, clipRect.y - offset.y, clipRect.width, clipRect.height);
-					mDragSepHighlight->_setClipRect(elemClipRect);
-				}
-			}
-		}
-		else
-		{
-			if(!mDragHighlight->_isDisabled())
-				mDragHighlight->disableRecursively();
-
-			if(!mDragSepHighlight->_isDisabled())
-				mDragSepHighlight->disableRecursively();
-		}
-
-		// Update scroll bounds
-		UINT32 scrollHeight = (UINT32)Math::roundToInt(clipRect.height * SCROLL_AREA_HEIGHT_PCT);
-
-		mTopScrollBounds.x = clipRect.x;
-		mTopScrollBounds.y = clipRect.y;
-		mTopScrollBounds.width = clipRect.width;
-		mTopScrollBounds.height = scrollHeight;
-
-		mBottomScrollBounds.x = clipRect.x;
-		mBottomScrollBounds.y = clipRect.y + clipRect.height - scrollHeight;
-		mBottomScrollBounds.width = clipRect.width;
-		mBottomScrollBounds.height = scrollHeight;
-	}
-
-	const GUITreeView::InteractableElement* GUITreeView::findElementUnderCoord(const Vector2I& coord) const
-	{
-		for(auto& element : mVisibleElements)
-		{
-			if(element.bounds.contains(coord))
-			{
-				return &element;
-			}
-		}
-
-		return nullptr;
-	}
-
-	GUITreeView::TreeElement* GUITreeView::getTopMostSelectedElement() const
-	{
-		auto topMostElement = mVisibleElements.end();
-
-		for(auto& selectedElement : mSelectedElements)
-		{
-			auto iterFind = std::find_if(mVisibleElements.begin(), mVisibleElements.end(), 
-				[&] (const InteractableElement& x) { return x.getTreeElement() == selectedElement.element; });
-
-			if(iterFind != mVisibleElements.end())
-			{
-				if(topMostElement == mVisibleElements.end())
-					topMostElement = iterFind;
-				else
-				{
-					if(iterFind->bounds.y < topMostElement->bounds.y)
-						topMostElement = iterFind;
-				}
-			}
-		}
-
-		if(topMostElement != mVisibleElements.end())
-			return topMostElement->getTreeElement();
-		else
-			return nullptr;
-	}
-
-	GUITreeView::TreeElement* GUITreeView::getBottomMostSelectedElement() const
-	{
-		auto& botMostElement = mVisibleElements.end();
-
-		for(auto& selectedElement : mSelectedElements)
-		{
-			auto iterFind = std::find_if(mVisibleElements.begin(), mVisibleElements.end(), 
-				[&] (const InteractableElement& x) { return x.getTreeElement() == selectedElement.element; });
-
-			if(iterFind != mVisibleElements.end())
-			{
-				if(botMostElement == mVisibleElements.end())
-					botMostElement = iterFind;
-				else
-				{
-					if((iterFind->bounds.y + iterFind->bounds.height) > (botMostElement->bounds.y + botMostElement->bounds.height))
-						botMostElement = iterFind;
-				}
-			}
-		}
-
-		if(botMostElement != mVisibleElements.end())
-			return botMostElement->getTreeElement();
-		else
-			return nullptr;
-	}
-
-	void GUITreeView::closeTemporarilyExpandedElements()
-	{
-		temporarilyExpandElement(nullptr);
-	}
-
-	void GUITreeView::temporarilyExpandElement(const GUITreeView::InteractableElement* mouseOverElement)
-	{
-		TreeElement* treeElement = nullptr;
-		if(mouseOverElement != nullptr && mouseOverElement->isTreeElement())
-			treeElement = mouseOverElement->getTreeElement();
-
-		if(treeElement == nullptr || treeElement != mMouseOverDragElement)
-		{
-			while(!mAutoExpandedElements.empty())
-			{
-				TreeElement* autoExpandedElement = mAutoExpandedElements.top();
-
-				bool unexpandElement = false;
-				if(mouseOverElement != nullptr && mouseOverElement->parent != nullptr)
-				{
-					if(mouseOverElement->parent != autoExpandedElement && !mouseOverElement->parent->isParentRec(autoExpandedElement))
-						unexpandElement = true;
-					else
-						break;
-				}
-				else
-					unexpandElement = true;
-
-				if(unexpandElement)
-				{
-					collapseElement(autoExpandedElement);
-
-					if(autoExpandedElement->mFoldoutBtn != nullptr)
-						autoExpandedElement->mFoldoutBtn->toggleOff();
-
-					mAutoExpandedElements.pop();
-				}
-			}
-
-			mMouseOverDragElement = treeElement;
-			mMouseOverDragElementTime = gTime().getTime();
-		}
-		else
-		{
-			if(mMouseOverDragElement != nullptr && !mMouseOverDragElement->mIsExpanded)
-			{
-				float timeDiff = gTime().getTime() - mMouseOverDragElementTime;
-				if(timeDiff >= AUTO_EXPAND_DELAY_SEC)
-				{
-					mAutoExpandedElements.push(mMouseOverDragElement);
-					expandElement(mMouseOverDragElement);
-
-					if(mMouseOverDragElement->mFoldoutBtn != nullptr)
-						mMouseOverDragElement->mFoldoutBtn->toggleOn();
-				}
-			}
-		}
-	}
-
-	void GUITreeView::scrollToElement(TreeElement* element, bool center)
-	{
-		if(element->mElement == nullptr)
-			return;
-
-		GUIScrollArea* scrollArea = findParentScrollArea();
-		if(scrollArea == nullptr)
-			return;
-
-		if(center)
-		{
-			RectI myBounds = _getClippedBounds();
-			INT32 clipVertCenter = myBounds.y + (INT32)Math::roundToInt(myBounds.height * 0.5f);
-			INT32 elemVertCenter = element->mElement->_getOffset().y + (INT32)Math::roundToInt(element->mElement->_getHeight() * 0.5f);
-
-			if(elemVertCenter > clipVertCenter)
-				scrollArea->scrollUpPx(elemVertCenter - clipVertCenter);
-			else
-				scrollArea->scrollDownPx(clipVertCenter - elemVertCenter);
-		}
-		else
-		{
-			RectI myBounds = _getClippedBounds();
-			INT32 elemVertTop = element->mElement->_getOffset().y;
-			INT32 elemVertBottom = element->mElement->_getOffset().y + element->mElement->_getHeight();
-
-			INT32 top = myBounds.y;
-			INT32 bottom = myBounds.y + myBounds.height;
-
-			INT32 offset = 0;
-			if(elemVertTop < top)
-				scrollArea->scrollUpPx(top - elemVertTop);
-			else if(elemVertBottom > bottom)
-				scrollArea->scrollDownPx(elemVertBottom - bottom);
-		}
-	}
-
-	GUIScrollArea* GUITreeView::findParentScrollArea() const
-	{
-		GUIElementBase* parent = _getParent();
-		while(parent != nullptr)
-		{
-			if(parent->_getType() == GUIElementBase::Type::Element)
-			{
-				GUIElement* parentElement = static_cast<GUIElement*>(parent);
-
-				if(parentElement->getElementType() == GUIElement::ElementType::ScrollArea)
-				{
-					GUIScrollArea* scrollArea = static_cast<GUIScrollArea*>(parentElement);
-					return scrollArea;
-
-				}
-			}
-
-			parent = parent->_getParent();
-		}
-
-		return nullptr;
-	}
-
-	const String& GUITreeView::getGUITypeName()
-	{
-		static String typeName = "SceneTreeView";
-		return typeName;
-	}
-}

+ 0 - 58
BansheeEditor/Source/BsGUITreeViewEditBox.cpp

@@ -1,58 +0,0 @@
-#include "BsGUITreeViewEditBox.h"
-#include "BsGUICommandEvent.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-
-namespace BansheeEngine
-{
-	const String& GUITreeViewEditBox::getGUITypeName()
-	{
-		static String name = "TreeViewEditBox";
-		return name;
-	}
-
-	GUITreeViewEditBox* GUITreeViewEditBox::create(const String& styleName)
-	{
-		return new (bs_alloc<GUITreeViewEditBox, PoolAlloc>()) GUITreeViewEditBox(getStyleName<GUITreeViewEditBox>(styleName), GUILayoutOptions::create());
-	}
-
-	GUITreeViewEditBox* GUITreeViewEditBox::create(const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUITreeViewEditBox, PoolAlloc>()) GUITreeViewEditBox(getStyleName<GUITreeViewEditBox>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	GUITreeViewEditBox::GUITreeViewEditBox(const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUIInputBox(styleName, layoutOptions, false)
-	{
-
-	}
-
-	bool GUITreeViewEditBox::commandEvent(const GUICommandEvent& ev)
-	{
-		bool processed = GUIInputBox::commandEvent(ev);
-
-		if(ev.getType() == GUICommandEventType::Return)
-		{
-			if(!onInputConfirmed.empty())
-				onInputConfirmed();
-
-			return true;
-		}
-		else if(ev.getType() == GUICommandEventType::Escape)
-		{
-			if(!onInputCanceled.empty())
-				onInputCanceled();
-
-			return true;
-		}
-		else if(ev.getType() == GUICommandEventType::FocusLost)
-		{
-			if(!onInputCanceled.empty())
-				onInputCanceled();
-
-			return true;
-		}
-
-		return processed;
-	}
-};

+ 0 - 53
BansheeEditor/Source/BsGUIVector2Field.cpp

@@ -1,53 +0,0 @@
-#include "BsGUIVector2Field.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIFloatField.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUIVector2Field::ELEMENT_LABEL_WIDTH = 10;
-
-	GUIVector2Field::GUIVector2Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
-	{
-		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldY = GUIFloatField::create(HString(L"Y"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-
-		mLayout->removeElement(mLabel);
-
-		GUILayout* layout = &mLayout->addLayoutY();
-		layout->addElement(mLabel);
-
-		GUILayout* elementLayout = &layout->addLayoutX();
-
-		elementLayout->addElement(mFieldX);
-		elementLayout->addElement(mFieldY);
-	}
-
-	Vector2 GUIVector2Field::getValue() const
-	{
-		Vector2 value;
-		value.x = mFieldX->getValue();
-		value.y = mFieldY->getValue();
-
-		return value;
-	}
-
-	void GUIVector2Field::setValue(const Vector2& value)
-	{
-		mFieldX->setValue(value.x);
-		mFieldY->setValue(value.y);
-	}
-
-	const String& GUIVector2Field::getGUITypeName()
-	{
-		static String typeName = "GUIVector2Field";
-		return typeName;
-	}
-}

+ 0 - 57
BansheeEditor/Source/BsGUIVector3Field.cpp

@@ -1,57 +0,0 @@
-#include "BsGUIVector3Field.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIFloatField.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUIVector3Field::ELEMENT_LABEL_WIDTH = 10;
-
-	GUIVector3Field::GUIVector3Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
-	{
-		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldY = GUIFloatField::create(HString(L"Y"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldZ = GUIFloatField::create(HString(L"Z"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-
-		mLayout->removeElement(mLabel);
-
-		GUILayout* layout = &mLayout->addLayoutY();
-		layout->addElement(mLabel);
-
-		GUILayout* elementLayout = &layout->addLayoutX();
-
-		elementLayout->addElement(mFieldX);
-		elementLayout->addElement(mFieldY);
-		elementLayout->addElement(mFieldZ);
-	}
-
-	Vector3 GUIVector3Field::getValue() const
-	{
-		Vector3 value;
-		value.x = mFieldX->getValue();
-		value.y = mFieldY->getValue();
-		value.z = mFieldZ->getValue();
-
-		return value;
-	}
-
-	void GUIVector3Field::setValue(const Vector3& value)
-	{
-		mFieldX->setValue(value.x);
-		mFieldY->setValue(value.y);
-		mFieldZ->setValue(value.z);
-	}
-
-	const String& GUIVector3Field::getGUITypeName()
-	{
-		static String typeName = "GUIVector3Field";
-		return typeName;
-	}
-}

+ 0 - 61
BansheeEditor/Source/BsGUIVector4Field.cpp

@@ -1,61 +0,0 @@
-#include "BsGUIVector4Field.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUILabel.h"
-#include "BsGUIFloatField.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIWidget.h"
-#include "BsGUIMouseEvent.h"
-#include "BsGUIWidget.h"
-
-namespace BansheeEngine
-{
-	const UINT32 GUIVector4Field::ELEMENT_LABEL_WIDTH = 10;
-
-	GUIVector4Field::GUIVector4Field(const PrivatelyConstruct& dummy, const GUIContent& labelContent, 
-		UINT32 labelWidth, const String& labelStyle, const String& inputBoxStyle, const GUILayoutOptions& layoutOptions, bool withLabel)
-		:TGUIField(dummy, labelContent, labelWidth, labelStyle, layoutOptions, withLabel), mFieldX(nullptr), mFieldY(nullptr)
-	{
-		mFieldX = GUIFloatField::create(HString(L"X"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldY = GUIFloatField::create(HString(L"Y"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldZ = GUIFloatField::create(HString(L"Z"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-		mFieldW = GUIFloatField::create(HString(L"W"), ELEMENT_LABEL_WIDTH, labelStyle, inputBoxStyle);
-
-		mLayout->removeElement(mLabel);
-
-		GUILayout* layout = &mLayout->addLayoutY();
-		layout->addElement(mLabel);
-
-		GUILayout* elementLayout = &layout->addLayoutX();
-
-		elementLayout->addElement(mFieldX);
-		elementLayout->addElement(mFieldY);
-		elementLayout->addElement(mFieldZ);
-		elementLayout->addElement(mFieldW);
-	}
-
-	Vector4 GUIVector4Field::getValue() const
-	{
-		Vector4 value;
-		value.x = mFieldX->getValue();
-		value.y = mFieldY->getValue();
-		value.z = mFieldZ->getValue();
-		value.w = mFieldW->getValue();
-
-		return value;
-	}
-
-	void GUIVector4Field::setValue(const Vector4& value)
-	{
-		mFieldX->setValue(value.x);
-		mFieldY->setValue(value.y);
-		mFieldZ->setValue(value.z);
-		mFieldW->setValue(value.w);
-	}
-
-	const String& GUIVector4Field::getGUITypeName()
-	{
-		static String typeName = "GUIVector4Field";
-		return typeName;
-	}
-}

+ 0 - 59
BansheeEditor/Source/BsGUIWindowDropArea.cpp

@@ -1,59 +0,0 @@
-#include "BsGUIWindowDropArea.h"
-#include "BsCoreApplication.h"
-#include "BsTexture.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsSpriteTexture.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-
-namespace BansheeEngine
-{
-	const String& GUIWindowDropArea::getGUITypeName()
-	{
-		static String name = "WindowDropArea";
-		return name;
-	}
-
-	GUIWindowDropArea::GUIWindowDropArea(const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::ScaleToFit, layoutOptions)
-	{ }
-
-	GUIWindowDropArea::~GUIWindowDropArea()
-	{ }
-
-	GUIWindowDropArea* GUIWindowDropArea::create(const String& styleName)
-	{
-		return new (bs_alloc<GUIWindowDropArea, PoolAlloc>()) 
-			GUIWindowDropArea(getStyleName<GUIWindowDropArea>(styleName), GUILayoutOptions::create());
-	}
-
-	GUIWindowDropArea* GUIWindowDropArea::create(const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUIWindowDropArea, PoolAlloc>()) 
-			GUIWindowDropArea(getStyleName<GUIWindowDropArea>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	void GUIWindowDropArea::setFocused(bool focused)
-	{
-		if(focused)
-			mActiveTexture = _getStyle()->focused.texture;
-		else
-			mActiveTexture = _getStyle()->normal.texture;
-
-		markContentAsDirty();
-	}
-
-	bool GUIWindowDropArea::mouseEvent(const GUIMouseEvent& ev)
-	{
-		if(ev.getType() == GUIMouseEventType::MouseDragAndDropDropped)
-		{
-			if(!onDraggedItemDropped.empty())
-				onDraggedItemDropped();
-
-			return true;
-		}
-
-		return false;
-	}
-}

+ 0 - 49
BansheeEditor/Source/BsGUIWindowFrame.cpp

@@ -1,49 +0,0 @@
-#include "BsGUIWindowFrame.h"
-#include "BsImageSprite.h"
-#include "BsGUIWidget.h"
-#include "BsGUISkin.h"
-#include "BsSpriteTexture.h"
-#include "BsGUILayoutOptions.h"
-#include "BsGUIMouseEvent.h"
-#include "BsCoreApplication.h"
-#include "BsPlatform.h"
-#include "BsTexture.h"
-#include "BsRenderWindow.h"
-
-namespace BansheeEngine
-{
-	const String& GUIWindowFrame::getGUITypeName()
-	{
-		static String name = "WindowFrame";
-		return name;
-	}
-
-	GUIWindowFrame::GUIWindowFrame(const String& styleName, const GUILayoutOptions& layoutOptions)
-		:GUITexture(styleName, HSpriteTexture(), GUIImageScaleMode::StretchToFit, layoutOptions)
-	{
-
-	}
-
-	GUIWindowFrame::~GUIWindowFrame()
-	{ }
-
-	GUIWindowFrame* GUIWindowFrame::create(const String& styleName)
-	{
-		return new (bs_alloc<GUIWindowFrame, PoolAlloc>()) GUIWindowFrame(getStyleName<GUIWindowFrame>(styleName), GUILayoutOptions::create());
-	}
-
-	GUIWindowFrame* GUIWindowFrame::create(const GUIOptions& layoutOptions, const String& styleName)
-	{
-		return new (bs_alloc<GUIWindowFrame, PoolAlloc>()) GUIWindowFrame(getStyleName<GUIWindowFrame>(styleName), GUILayoutOptions::create(layoutOptions));
-	}
-
-	void GUIWindowFrame::setFocused(bool focused)
-	{
-		if(focused)
-			mActiveTexture = _getStyle()->focused.texture;
-		else
-			mActiveTexture = _getStyle()->normal.texture;
-
-		markContentAsDirty();
-	}
-}

+ 0 - 106
BansheeEditor/Source/BsGUIWindowFrameWidget.cpp

@@ -1,106 +0,0 @@
-#include "BsGUIWindowFrameWidget.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-#include "BsGUITexture.h"
-#include "BsGUIWindowFrame.h"
-#include "BsBuiltinResources.h"
-#include "BsGUIMouseEvent.h"
-#include "BsRenderWindow.h"
-#include "BsMath.h"
-#include "BsPlatform.h"
-
-namespace BansheeEngine
-{
-	const UINT32 WindowFrameWidget::RESIZE_BORDER_WIDTH = 3;
-
-	WindowFrameWidget::WindowFrameWidget(const HSceneObject& parent, Viewport* target, RenderWindow* parentWindow, const GUISkin& skin)
-		:GUIWidget(parent, target), mWindowFrameArea(nullptr), mParentWindow(parentWindow)
-	{
-		setSkin(skin);
-
-		GUIArea* backgroundArea = GUIArea::createStretchedXY(*this, 0, 0, 0, 0, 500);
-		backgroundArea->getLayout().addElement(GUITexture::create(GUIImageScaleMode::RepeatToFit, 
-			GUIOptions(GUIOption::flexibleWidth(), GUIOption::flexibleHeight()), "WindowBackground"));
-
-		mWindowFrameArea = GUIArea::createStretchedXY(*this, 0, 0, 0, 0, 499);
-
-		mWindowFrame = GUIWindowFrame::create("WindowFrame");
-		mWindowFrameArea->getLayout().addElement(mWindowFrame);
-
-		refreshNonClientAreas();
-	}
-
-	WindowFrameWidget::~WindowFrameWidget()
-	{
-
-	}
-
-	void WindowFrameWidget::update()
-	{
-
-	}
-
-	bool WindowFrameWidget::_mouseEvent(GUIElement* element, const GUIMouseEvent& ev)
-	{
-		return GUIWidget::_mouseEvent(element, ev);
-	}
-
-	void WindowFrameWidget::ownerWindowFocusChanged()
-	{
-		mWindowFrame->setFocused(mParentWindow->hasFocus());
-
-		GUIWidget::ownerWindowFocusChanged();
-	}
-
-	void WindowFrameWidget::ownerTargetResized()
-	{
-		GUIWidget::ownerTargetResized();
-
-		refreshNonClientAreas();
-	}
-
-	void WindowFrameWidget::refreshNonClientAreas() const
-	{
-		INT32 x = mWindowFrameArea->x();
-		INT32 y = mWindowFrameArea->y();
-
-		UINT32 width = mWindowFrameArea->width();
-		UINT32 height = mWindowFrameArea->height();
-
-		Vector<NonClientResizeArea> nonClientAreas(8);
-
-		nonClientAreas[0].type = NonClientAreaBorderType::TopLeft;
-		nonClientAreas[0].area = RectI(x, y, 
-			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[1].type = NonClientAreaBorderType::Top;
-		nonClientAreas[1].area = RectI(x + RESIZE_BORDER_WIDTH, y, 
-			width - 2 * RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[2].type = NonClientAreaBorderType::TopRight;
-		nonClientAreas[2].area = RectI(x + width - RESIZE_BORDER_WIDTH, y, 
-			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[3].type = NonClientAreaBorderType::Left;
-		nonClientAreas[3].area = RectI(x, y + RESIZE_BORDER_WIDTH, 
-			RESIZE_BORDER_WIDTH, height - 2 * RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[4].type = NonClientAreaBorderType::Right;
-		nonClientAreas[4].area = RectI(x + width - RESIZE_BORDER_WIDTH, y + RESIZE_BORDER_WIDTH, 
-			RESIZE_BORDER_WIDTH, height - 2 * RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[5].type = NonClientAreaBorderType::BottomLeft;
-		nonClientAreas[5].area = RectI(x, y + height - RESIZE_BORDER_WIDTH, 
-			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[6].type = NonClientAreaBorderType::Bottom;
-		nonClientAreas[6].area = RectI(x + RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
-			width - 2 * RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		nonClientAreas[7].type = NonClientAreaBorderType::BottomRight;
-		nonClientAreas[7].area = RectI(x + width - RESIZE_BORDER_WIDTH, y + height - RESIZE_BORDER_WIDTH, 
-			RESIZE_BORDER_WIDTH, RESIZE_BORDER_WIDTH);
-
-		Platform::setResizeNonClientAreas(*mParentWindow, nonClientAreas);
-	}
-}

+ 0 - 113
BansheeEditor/Source/BsMainEditorWindow.cpp

@@ -1,113 +0,0 @@
-#include "BsMainEditorWindow.h"
-#include "BsEditorWindowManager.h"
-#include "BsDockManager.h"
-#include "BsGUIMenuBar.h"
-#include "BsCamera.h"
-#include "BsSceneObject.h"
-#include "BsRenderTexture.h"
-#include "BsApplication.h"
-#include "BsProfilingManager.h"
-#include "BsGUIArea.h"
-#include "BsGUILayout.h"
-
-// DEBUG ONLY
-#include "BsTestTextSprite.h"
-#include "BsDebugCamera.h"
-#include "BsDrawHelper2D.h"
-#include "BsDrawHelper3D.h"
-#include "BsRectF.h"
-#include "BsProfilerOverlay.h"
-#include "BsPlatform.h"
-
-namespace BansheeEngine
-{
-	MainEditorWindow* MainEditorWindow::create(const RenderWindowPtr& renderWindow)
-	{
-		return EditorWindowManager::instance().createMain(renderWindow);
-	}
-
-	MainEditorWindow::MainEditorWindow(const RenderWindowPtr& renderWindow)
-		:EditorWindowBase(renderWindow), mDockManager(nullptr), 
-		mMenuBar(bs_new<GUIMenuBar>(mGUI.get(), mRenderWindow.get()))
-	{
-		mDockManager = DockManager::create(mRenderWindow.get());
-
-		GUIArea* dockArea = GUIArea::createStretchedXY(*mGUI.get(), 0, 0, 0, 0);
-		dockArea->getLayout().addElement(mDockManager);
-
-		updateAreas();
-
-		mMenuBar->addMenuItem(L"File/New project", nullptr);
-		mMenuBar->addMenuItem(L"File/Open project", nullptr);
-		mMenuBar->addSeparator(L"File");
-		mMenuBar->addMenuItem(L"File/Recent projects/Project A", nullptr);
-		mMenuBar->addMenuItem(L"File/Recent projects/Project B", nullptr);
-		mMenuBar->addMenuItem(L"File/Recent projects/Project C", nullptr);
-		mMenuBar->addSeparator(L"File");
-		mMenuBar->addMenuItem(L"File/Exit", nullptr);
-		mMenuBar->addMenuItem(L"Window/Scene", nullptr);
-
-		// DEBUG ONLY
-
-		RenderTexturePtr sceneRenderTarget = RenderTexture::create(TEX_TYPE_2D, 800, 600);
-		sceneRenderTarget->setPriority(1);
-
-		HSceneObject sceneCameraGO = SceneObject::create("SceneCamera");
-		HCamera sceneCamera = sceneCameraGO->addComponent<Camera>(sceneRenderTarget, 0.0f, 0.0f, 1.0f, 1.0f);
-
-		sceneCamera->setPriority(1);
-		sceneCameraGO->setPosition(Vector3(0,50,1240));
-		sceneCameraGO->lookAt(Vector3(0,50,-300));
-		sceneCamera->setNearClipDistance(5);
-		sceneCamera->setAspectRatio(800.0f / 600.0f);
-
-		GameObjectHandle<DebugCamera> debugCamera = sceneCameraGO->addComponent<DebugCamera>();
-
-		GameObjectHandle<TestTextSprite> textSprite = mSceneObject->addComponent<TestTextSprite>(mCamera->getViewport().get());
-
-		textSprite->init(sceneCamera, "Testing in a new row, does this work?", sceneRenderTarget);
-
-		//DrawHelper2D::instance().drawQuad(sceneCamera, FRect(0.0f, 0.2f, 0.75f, 0.5f), Color::White, DebugDrawCoordType::Normalized, 250.0f);
-		//DrawHelper2D::instance().drawQuad(sceneCamera, FRect(50.0f, 50.0f, 100.0f, 50.0f), Color::Blue, DebugDrawCoordType::Pixel, 250.0f);
-
-		//DrawHelper2D::instance().drawLine_Pixel(sceneCamera, Vector2(0, 0), Vector2(20, 20), Color::Blue, DebugDrawCoordType::Pixel, 250.0f);
-
-		//DrawHelper2D::instance().drawLine_AA(sceneCamera, Vector2(100, 10), Vector2(120, 40), 1.0f, 1.0f, Color::Blue, DebugDrawCoordType::Pixel, 250.0f);
-
-		AABox dbgBox(Vector3(-300, -200, 1000), Vector3(300, 300, 1500));
-		//DrawHelper3D::instance().drawAABox(sceneCamera, dbgBox, Color::Green, 250.0f);
-
-		mProfilerOverlay = mSceneObject->addComponent<ProfilerOverlay>(sceneCamera->getViewport());
-		mProfilerOverlay->show(ProfilerOverlayType::CPUSamples);
-	}
-
-	MainEditorWindow::~MainEditorWindow()
-	{
-		GUIElement::destroy(mDockManager);
-		bs_delete(mMenuBar);
-	}
-
-	void MainEditorWindow::resized()
-	{
-		EditorWindowBase::resized();
-
-		updateAreas();
-	}
-
-	void MainEditorWindow::updateAreas()
-	{
-		UINT32 widgetWidth = (UINT32)std::max(0, (INT32)getWidth() - 2);
-		UINT32 widgetHeight = (UINT32)std::max(0, (INT32)getHeight() - 2);
-
-		UINT32 menuBarHeight = 15;
-		mMenuBar->setArea(1, 1, widgetWidth, menuBarHeight);
-
-		UINT32 dockHeight = (UINT32)std::max(0, (INT32)widgetHeight - (INT32)menuBarHeight);
-		mDockManager->setArea(1, menuBarHeight + 1, widgetWidth, dockHeight);
-	}
-
-	void MainEditorWindow::update()
-	{
-		mDockManager->update();
-	}
-}

+ 0 - 739
BansheeEditor/Source/BsProjectLibrary.cpp

@@ -1,739 +0,0 @@
-#include "BsProjectLibrary.h"
-#include "BsPath.h"
-#include "BsFileSystem.h"
-#include "BsException.h"
-#include "BsResources.h"
-#include "BsResourceManifest.h"
-#include "BsImporter.h"
-#include "BsResourceMeta.h"
-#include "BsResources.h"
-#include "BsImporter.h"
-#include "BsImportOptions.h"
-#include "BsFileSerializer.h"
-#include "BsFolderMonitor.h"
-#include "BsDebug.h"
-#include "BsProjectLibraryEntries.h"
-
-using namespace std::placeholders;
-
-namespace BansheeEngine
-{
-	const Path ProjectLibrary::RESOURCES_DIR = L"Resources\\";
-	const Path ProjectLibrary::INTERNAL_RESOURCES_DIR = L"Internal\\Resources\\";
-	const WString ProjectLibrary::LIBRARY_ENTRIES_FILENAME = L"ProjectLibrary.asset";
-	const WString ProjectLibrary::RESOURCE_MANIFEST_FILENAME = L"ResourceManifest.asset";
-
-	ProjectLibrary::LibraryEntry::LibraryEntry()
-		:parent(nullptr), type(LibraryEntryType::Directory)
-	{ }
-
-	ProjectLibrary::LibraryEntry::LibraryEntry(const Path& path, const WString& name, DirectoryEntry* parent, LibraryEntryType type)
-		:path(path), parent(parent), type(type), elementName(name)
-	{ }
-
-	ProjectLibrary::ResourceEntry::ResourceEntry()
-		:lastUpdateTime(0)
-	{ }
-
-	ProjectLibrary::ResourceEntry::ResourceEntry(const Path& path, const WString& name, DirectoryEntry* parent)
-		:LibraryEntry(path, name, parent, LibraryEntryType::File), lastUpdateTime(0)
-	{ }
-
-	ProjectLibrary::DirectoryEntry::DirectoryEntry()
-	{ }
-
-	ProjectLibrary::DirectoryEntry::DirectoryEntry(const Path& path, const WString& name, DirectoryEntry* parent)
-		:LibraryEntry(path, name, parent, LibraryEntryType::Directory)
-	{ }
-
-	ProjectLibrary::ProjectLibrary(const Path& projectFolder)
-		:mRootEntry(nullptr), mProjectFolder(projectFolder)
-	{
-		mResourcesFolder = mProjectFolder;
-		mResourcesFolder.append(RESOURCES_DIR);
-		mMonitor = bs_new<FolderMonitor>();
-
-		FolderChange folderChanges = (FolderChange)((UINT32)FolderChange::FileName | (UINT32)FolderChange::DirName | 
-				(UINT32)FolderChange::Creation | (UINT32)FolderChange::LastWrite);
-		mMonitor->startMonitor(mResourcesFolder, true, folderChanges);
-
-		mMonitor->onAdded.connect(std::bind(&ProjectLibrary::onMonitorFileModified, this, _1));
-		mMonitor->onRemoved.connect(std::bind(&ProjectLibrary::onMonitorFileModified, this, _1));
-		mMonitor->onModified.connect(std::bind(&ProjectLibrary::onMonitorFileModified, this, _1));
-
-		load();
-
-		if(mResourceManifest == nullptr)
-			mResourceManifest = ResourceManifest::create("ProjectLibrary");
-
-		gResources().registerResourceManifest(mResourceManifest);
-
-		checkForModifications(mResourcesFolder);
-	}
-
-	ProjectLibrary::~ProjectLibrary()
-	{
-		save();
-
-		mMonitor->stopMonitorAll();
-		bs_delete(mMonitor);
-
-		if(mRootEntry != nullptr)
-			deleteDirectoryInternal(mRootEntry);
-	}
-
-	void ProjectLibrary::update()
-	{
-		mMonitor->_update();
-	}
-
-	void ProjectLibrary::checkForModifications(const Path& fullPath)
-	{
-		if (!mResourcesFolder.includes(fullPath))
-			return; // Folder not part of our resources path, so no modifications
-
-		if(mRootEntry == nullptr)
-		{
-			mRootEntry = bs_new<DirectoryEntry>(mResourcesFolder, mResourcesFolder.getWTail(), nullptr);
-		}
-
-		Path pathToSearch = fullPath;
-		LibraryEntry* entry = findEntry(pathToSearch);
-		if(entry == nullptr) // File could be new, try to find parent directory entry
-		{
-			Path parentDirPath = pathToSearch.getParent();
-			entry = findEntry(parentDirPath);
-
-			// Cannot find parent directory. Create the needed hierarchy.
-			DirectoryEntry* entryParent = nullptr;
-			DirectoryEntry* newHierarchyParent = nullptr;
-			if(entry == nullptr) 
-				createInternalParentHierarchy(pathToSearch, &newHierarchyParent, &entryParent);
-			else
-				entryParent = static_cast<DirectoryEntry*>(entry);
-
-			if(FileSystem::isFile(pathToSearch))
-			{
-				addResourceInternal(entryParent, pathToSearch);
-			}
-			else if(FileSystem::isDirectory(pathToSearch))
-			{
-				addDirectoryInternal(entryParent, pathToSearch);
-
-				if(newHierarchyParent == nullptr)
-					checkForModifications(pathToSearch);
-			}
-
-			if(newHierarchyParent != nullptr)
-				checkForModifications(newHierarchyParent->path);
-		}
-		else if(entry->type == LibraryEntryType::File)
-		{
-			if(FileSystem::isFile(entry->path))
-			{
-				reimportResourceInternal(static_cast<ResourceEntry*>(entry));
-			}
-			else
-			{
-				deleteResourceInternal(static_cast<ResourceEntry*>(entry));
-			}
-		}
-		else if(entry->type == LibraryEntryType::Directory) // Check folder and all subfolders for modifications
-		{
-			if(!FileSystem::isDirectory(entry->path))
-			{
-				deleteDirectoryInternal(static_cast<DirectoryEntry*>(entry));
-			}
-			else
-			{
-				Stack<DirectoryEntry*> todo;
-				todo.push(static_cast<DirectoryEntry*>(entry));
-
-				Vector<Path> childFiles;
-				Vector<Path> childDirectories;
-				Vector<bool> existingEntries;
-				Vector<LibraryEntry*> toDelete;
-
-				while(!todo.empty())
-				{
-					DirectoryEntry* currentDir = todo.top();
-					todo.pop();
-
-					existingEntries.clear();
-					existingEntries.resize(currentDir->mChildren.size());
-					for(UINT32 i = 0; i < (UINT32)currentDir->mChildren.size(); i++)
-						existingEntries[i] = false;
-
-					childFiles.clear();
-					childDirectories.clear();
-
-					FileSystem::getChildren(currentDir->path, childFiles, childDirectories);
-			
-					for(auto& filePath : childFiles)
-					{
-						if(isMeta(filePath))
-						{
-							Path sourceFilePath = filePath;
-							sourceFilePath.setExtension(L"");
-
-							if(!FileSystem::isFile(sourceFilePath))
-							{
-								LOGWRN("Found a .meta file without a corresponding resource. Deleting.");
-
-								FileSystem::remove(filePath);
-							}
-						}
-						else
-						{
-							ResourceEntry* existingEntry = nullptr;
-							UINT32 idx = 0;
-							for(auto& child : currentDir->mChildren)
-							{
-								if(child->type == LibraryEntryType::File && child->path == filePath)
-								{
-									existingEntries[idx] = true;
-									existingEntry = static_cast<ResourceEntry*>(child);
-									break;
-								}
-
-								idx++;
-							}
-
-							if(existingEntry != nullptr)
-							{
-								reimportResourceInternal(existingEntry);
-							}
-							else
-							{
-								addResourceInternal(currentDir, filePath);
-							}
-						}
-					}
-
-					for(auto& dirPath : childDirectories)
-					{
-						DirectoryEntry* existingEntry = nullptr;
-						UINT32 idx = 0;
-						for(auto& child : currentDir->mChildren)
-						{
-							if(child->type == LibraryEntryType::Directory && child->path == dirPath)
-							{
-								existingEntries[idx] = true;
-								existingEntry = static_cast<DirectoryEntry*>(child);
-								break;
-							}
-
-							idx++;
-						}
-
-						if(existingEntry == nullptr)
-							addDirectoryInternal(currentDir, dirPath);
-					}
-
-					{
-						for(UINT32 i = 0; i < (UINT32)existingEntries.size(); i++)
-						{
-							if(existingEntries[i])
-								continue;
-
-							toDelete.push_back(currentDir->mChildren[i]);
-						}
-
-						for(auto& child : toDelete)
-						{
-							if(child->type == LibraryEntryType::Directory)
-								deleteDirectoryInternal(static_cast<DirectoryEntry*>(child));
-							else if(child->type == LibraryEntryType::File)
-								deleteResourceInternal(static_cast<ResourceEntry*>(child));
-						}
-					}
-
-					for(auto& child : currentDir->mChildren)
-					{
-						if(child->type == LibraryEntryType::Directory)
-							todo.push(static_cast<DirectoryEntry*>(child));
-					}
-				}
-			}
-		}
-	}
-
-	ProjectLibrary::ResourceEntry* ProjectLibrary::addResourceInternal(DirectoryEntry* parent, const Path& filePath)
-	{
-		ResourceEntry* newResource = bs_new<ResourceEntry>(filePath, filePath.getWTail(), parent);
-		parent->mChildren.push_back(newResource);
-
-		reimportResourceInternal(newResource);
-
-		if(!onEntryAdded.empty())
-			onEntryAdded(filePath);
-
-		return newResource;
-	}
-
-	ProjectLibrary::DirectoryEntry* ProjectLibrary::addDirectoryInternal(DirectoryEntry* parent, const Path& dirPath)
-	{
-		DirectoryEntry* newEntry = bs_new<DirectoryEntry>(dirPath, dirPath.getWTail(), parent);
-		parent->mChildren.push_back(newEntry);
-
-		if(!onEntryAdded.empty())
-			onEntryAdded(dirPath);
-
-		return newEntry;
-	}
-
-	void ProjectLibrary::deleteResourceInternal(ResourceEntry* resource)
-	{
-		if(resource->meta != nullptr)
-		{
-			Path path;
-			if(mResourceManifest->uuidToFilePath(resource->meta->getUUID(), path))
-			{
-				if(FileSystem::isFile(path))
-					FileSystem::remove(path);
-
-				mResourceManifest->unregisterResource(resource->meta->getUUID());
-			}
-		}
-
-		DirectoryEntry* parent = resource->parent;
-		auto findIter = std::find_if(parent->mChildren.begin(), parent->mChildren.end(), 
-			[&] (const LibraryEntry* entry) { return entry == resource; });
-
-		parent->mChildren.erase(findIter);
-
-		if(!onEntryRemoved.empty())
-			onEntryRemoved(resource->path);
-
-		bs_delete(resource);
-	}
-
-	void ProjectLibrary::deleteDirectoryInternal(DirectoryEntry* directory)
-	{
-		if(directory == mRootEntry)
-			mRootEntry = nullptr;
-
-		Vector<LibraryEntry*> childrenToDestroy = directory->mChildren;
-		for(auto& child : childrenToDestroy)
-		{
-			if(child->type == LibraryEntryType::Directory)
-				deleteDirectoryInternal(static_cast<DirectoryEntry*>(child));
-			else
-				deleteResourceInternal(static_cast<ResourceEntry*>(child));
-		}
-
-		DirectoryEntry* parent = directory->parent;
-		if(parent != nullptr)
-		{
-			auto findIter = std::find_if(parent->mChildren.begin(), parent->mChildren.end(), 
-				[&] (const LibraryEntry* entry) { return entry == directory; });
-
-			parent->mChildren.erase(findIter);
-		}
-
-		if(!onEntryRemoved.empty())
-			onEntryRemoved(directory->path);
-
-		bs_delete(directory);
-	}
-
-	void ProjectLibrary::reimportResourceInternal(ResourceEntry* resource)
-	{
-		WString ext = resource->path.getWExtension();
-		Path metaPath = resource->path;
-		metaPath.setFilename(metaPath.getWFilename() + L".meta");
-
-		ext = ext.substr(1, ext.size() - 1); // Remove the .
-		if(!Importer::instance().supportsFileType(ext))
-			return;
-
-		if(resource->meta == nullptr)
-		{
-			FileSerializer fs;
-			if(FileSystem::isFile(metaPath))
-			{
-				std::shared_ptr<IReflectable> loadedMeta = fs.decode(metaPath);
-
-				if(loadedMeta != nullptr && loadedMeta->isDerivedFrom(ResourceMeta::getRTTIStatic()))
-				{
-					ResourceMetaPtr resourceMeta = std::static_pointer_cast<ResourceMeta>(loadedMeta);
-					resource->meta = resourceMeta;
-				}
-			}
-		}
-
-		if(!isUpToDate(resource))
-		{
-			ImportOptionsPtr importOptions = nullptr;
-
-			if(resource->meta != nullptr)
-				importOptions = resource->meta->getImportOptions();
-			else
-				importOptions = Importer::instance().createImportOptions(resource->path);
-
-			HResource importedResource;
-
-			if(resource->meta == nullptr)
-			{
-				importedResource = Importer::instance().import(resource->path, importOptions);
-
-				resource->meta = ResourceMeta::create(importedResource.getUUID(), importOptions);
-				FileSerializer fs;
-				fs.encode(resource->meta.get(), metaPath);
-			}
-			else
-			{
-				importedResource = HResource(resource->meta->getUUID());
-				Importer::instance().reimport(importedResource, resource->path, importOptions);
-			}
-
-			Path internalResourcesPath = mProjectFolder;
-			internalResourcesPath.append(INTERNAL_RESOURCES_DIR);
-
-			if(!FileSystem::isDirectory(internalResourcesPath))
-				FileSystem::createDir(internalResourcesPath);
-
-			internalResourcesPath.setFilename(toWString(importedResource.getUUID()) + L".asset");
-
-			gResources().save(importedResource, internalResourcesPath, true);
-			gResources().unload(importedResource);
-
-			mResourceManifest->registerResource(importedResource.getUUID(), internalResourcesPath);
-
-			resource->lastUpdateTime = std::time(nullptr);
-		}
-	}
-
-	bool ProjectLibrary::isUpToDate(ResourceEntry* resource) const
-	{
-		if(resource->meta == nullptr)
-			return false;
-
-		Path path;
-		if(!mResourceManifest->uuidToFilePath(resource->meta->getUUID(), path))
-			return false;
-
-		if(!FileSystem::isFile(path))
-			return false;
-
-		std::time_t lastModifiedTime = FileSystem::getLastModifiedTime(path);
-		return lastModifiedTime <= resource->lastUpdateTime;
-	}
-
-	ProjectLibrary::LibraryEntry* ProjectLibrary::findEntry(const Path& fullPath) const
-	{
-		if (!mRootEntry->path.includes(fullPath))
-			return nullptr;
-
-		Path relPath = fullPath.getRelative(mRootEntry->path);
-		UINT32 numElems = relPath.getNumDirectories() + (relPath.isFile() ? 1 : 0);
-		UINT32 idx = 0;
-
-		LibraryEntry* current = mRootEntry;
-		while (current != nullptr)
-		{
-			if (idx == numElems)
-				return current;
-
-			WString curElem;
-			if (relPath.isFile() && idx == (numElems - 1))
-				curElem = relPath.getWFilename();
-			else
-				curElem = relPath[idx];
-
-			current = nullptr;
-			if (current->type == LibraryEntryType::Directory)
-			{
-				DirectoryEntry* dirEntry = static_cast<DirectoryEntry*>(current);
-				for (auto& child : dirEntry->mChildren)
-				{
-					if (Path::comparePathElem(curElem, child->elementName))
-					{
-						idx++;
-						current = child;
-						break;
-					}
-				}
-			}
-		}
-
-		return nullptr;
-	}
-
-	void ProjectLibrary::moveEntry(const Path& oldPath, const Path& newPath)
-	{
-		if(FileSystem::isFile(oldPath) || FileSystem::isDirectory(oldPath))
-			FileSystem::move(oldPath, newPath);
-
-		Path oldMetaPath = getMetaPath(oldPath);
-		Path newMetaPath = getMetaPath(newPath);
-
-		LibraryEntry* oldEntry = findEntry(oldPath);
-		if(oldEntry != nullptr) // Moving from the Resources folder
-		{
-			// Moved outside of Resources, delete entry & meta file
-			if (!mResourcesFolder.includes(newPath))
-			{
-				if(oldEntry->type == LibraryEntryType::File)
-				{
-					deleteResourceInternal(static_cast<ResourceEntry*>(oldEntry));
-
-					if(FileSystem::isFile(oldMetaPath))
-						FileSystem::remove(oldMetaPath);
-				}
-				else if(oldEntry->type == LibraryEntryType::Directory)
-					deleteDirectoryInternal(static_cast<DirectoryEntry*>(oldEntry));
-			}
-			else // Just moving internally
-			{
-				if(FileSystem::isFile(oldMetaPath))
-					FileSystem::move(oldMetaPath, newMetaPath);
-
-				DirectoryEntry* parent = oldEntry->parent;
-				auto findIter = std::find(parent->mChildren.begin(), parent->mChildren.end(), oldEntry);
-				if(findIter != parent->mChildren.end())
-					parent->mChildren.erase(findIter);
-
-				Path parentPath = newPath.getParent();
-
-				DirectoryEntry* newEntryParent = nullptr;
-				LibraryEntry* newEntryParentLib = findEntry(parentPath);
-				if(newEntryParentLib != nullptr)
-				{
-					assert(newEntryParentLib->type == LibraryEntryType::Directory);
-					newEntryParent = static_cast<DirectoryEntry*>(newEntryParentLib);
-				}
-
-				DirectoryEntry* newHierarchyParent = nullptr;
-				if(newEntryParent == nullptr) // New path parent doesn't exist, so we need to create the hierarchy
-					createInternalParentHierarchy(newPath, &newHierarchyParent, &newEntryParent);
-
-				newEntryParent->mChildren.push_back(oldEntry);
-				oldEntry->parent = newEntryParent;
-				oldEntry->path = newPath;
-				oldEntry->elementName = newPath.getWTail();
-
-				if(oldEntry->type == LibraryEntryType::Directory) // Update child paths
-				{
-					Stack<LibraryEntry*> todo;
-					todo.push(oldEntry);
-
-					while(!todo.empty())
-					{
-						LibraryEntry* curEntry = todo.top();
-						todo.pop();
-
-						DirectoryEntry* curDirEntry = static_cast<DirectoryEntry*>(curEntry);
-						for(auto& child : curDirEntry->mChildren)
-						{
-							child->path = child->parent->path;
-							child->path.append(child->elementName);
-
-							if(child->type == LibraryEntryType::Directory)
-								todo.push(child);
-						}
-					}
-				}
-
-				if(!onEntryRemoved.empty())
-					onEntryRemoved(oldPath);
-
-				if(!onEntryAdded.empty())
-					onEntryAdded(newPath);
-
-				if(newHierarchyParent != nullptr)
-					checkForModifications(newHierarchyParent->path);
-			}
-		}
-		else // Moving from outside of the Resources folder (likely adding a new resource)
-		{
-			checkForModifications(newPath);
-		}
-	}
-
-	void ProjectLibrary::deleteEntry(const Path& path)
-	{
-		if(FileSystem::exists(path))
-			FileSystem::remove(path);
-
-		LibraryEntry* entry = findEntry(path);
-		if(entry != nullptr)
-		{
-			if(entry->type == LibraryEntryType::File)
-			{
-				deleteResourceInternal(static_cast<ResourceEntry*>(entry));
-
-				Path metaPath = getMetaPath(path);
-				if(FileSystem::isFile(metaPath))
-					FileSystem::remove(metaPath);
-			}
-			else if(entry->type == LibraryEntryType::Directory)
-				deleteDirectoryInternal(static_cast<DirectoryEntry*>(entry));
-		}
-	}
-
-	void ProjectLibrary::createInternalParentHierarchy(const Path& fullPath, DirectoryEntry** newHierarchyRoot, DirectoryEntry** newHierarchyLeaf)
-	{
-		Path parentPath = fullPath;
-
-		DirectoryEntry* newEntryParent = nullptr;
-		Stack<Path> parentPaths;
-		do 
-		{
-			Path newParentPath = parentPath.getParent();
-
-			if(newParentPath == parentPath)
-				break;
-
-			LibraryEntry* newEntryParentLib = findEntry(newParentPath);
-			if(newEntryParentLib != nullptr)
-			{
-				assert(newEntryParentLib->type == LibraryEntryType::Directory);
-				newEntryParent = static_cast<DirectoryEntry*>(newEntryParentLib);
-
-				break;
-			}
-
-			parentPaths.push(newParentPath);
-			parentPath = newParentPath;
-
-		} while (true);
-
-		assert(newEntryParent != nullptr); // Must exist
-
-		if(newHierarchyRoot != nullptr)
-			*newHierarchyRoot = newEntryParent;
-
-		while(!parentPaths.empty())
-		{
-			Path curPath = parentPaths.top();
-			parentPaths.pop();
-
-			newEntryParent = addDirectoryInternal(newEntryParent, curPath);
-		}
-
-		if(newHierarchyLeaf != nullptr)
-			*newHierarchyLeaf = newEntryParent;
-	}
-
-	Path ProjectLibrary::getMetaPath(const Path& path) const
-	{
-		Path metaPath = path;
-		metaPath.setFilename(metaPath.getWFilename() + L".meta");
-
-		return metaPath;
-	}
-
-	bool ProjectLibrary::isMeta(const Path& fullPath) const
-	{
-		return fullPath.getWExtension() == L".meta";
-	}
-
-	void ProjectLibrary::onMonitorFileModified(const Path& path)
-	{
-		if(!isMeta(path))
-			checkForModifications(path);
-		else
-		{
-			Path resourcePath = path;
-			resourcePath.setExtension(L"");
-
-			checkForModifications(resourcePath);
-		}
-	}
-
-	void ProjectLibrary::save()
-	{
-		std::shared_ptr<ProjectLibraryEntries> libEntries = ProjectLibraryEntries::create(*mRootEntry);
-
-		Path libraryEntriesPath = mProjectFolder;
-		libraryEntriesPath.append(INTERNAL_RESOURCES_DIR);
-		libraryEntriesPath.append(LIBRARY_ENTRIES_FILENAME);
-
-		FileSerializer fs;
-		fs.encode(libEntries.get(), libraryEntriesPath);
-
-		Path resourceManifestPath = mProjectFolder;
-		resourceManifestPath.append(INTERNAL_RESOURCES_DIR);
-		resourceManifestPath.append(RESOURCE_MANIFEST_FILENAME);
-
-		ResourceManifest::save(mResourceManifest, resourceManifestPath, mProjectFolder);
-	}
-
-	void ProjectLibrary::load()
-	{
-		if(mRootEntry != nullptr)
-		{
-			deleteDirectoryInternal(mRootEntry);
-			mRootEntry = nullptr;
-		}
-
-		mRootEntry = bs_new<DirectoryEntry>(mResourcesFolder, mResourcesFolder.getWTail(), nullptr);
-
-		Path libraryEntriesPath = mProjectFolder;
-		libraryEntriesPath.append(INTERNAL_RESOURCES_DIR);
-		libraryEntriesPath.append(LIBRARY_ENTRIES_FILENAME);
-
-		if(FileSystem::exists(libraryEntriesPath))
-		{
-			FileSerializer fs;
-			std::shared_ptr<ProjectLibraryEntries> libEntries = std::static_pointer_cast<ProjectLibraryEntries>(fs.decode(libraryEntriesPath));
-
-			*mRootEntry = libEntries->getRootEntry();
-			for(auto& child : mRootEntry->mChildren)
-				child->parent = mRootEntry;
-
-			mRootEntry->parent = nullptr;
-		}
-
-		// Load all meta files
-		Stack<DirectoryEntry*> todo;
-		todo.push(mRootEntry);
-
-		while(!todo.empty())
-		{
-			DirectoryEntry* curDir = todo.top();
-			todo.pop();
-
-			for(auto& child : curDir->mChildren)
-			{
-				if(child->type == LibraryEntryType::File)
-				{
-					ResourceEntry* resEntry = static_cast<ResourceEntry*>(child);
-
-					if(resEntry->meta == nullptr)
-					{
-						Path metaPath = resEntry->path;
-						metaPath.setFilename(metaPath.getWFilename() + L".meta");
-
-						FileSerializer fs;
-						if(FileSystem::isFile(metaPath))
-						{
-							std::shared_ptr<IReflectable> loadedMeta = fs.decode(metaPath);
-
-							if(loadedMeta != nullptr && loadedMeta->isDerivedFrom(ResourceMeta::getRTTIStatic()))
-							{
-								ResourceMetaPtr resourceMeta = std::static_pointer_cast<ResourceMeta>(loadedMeta);
-								resEntry->meta = resourceMeta;
-							}
-						}
-					}
-				}
-				else if(child->type == LibraryEntryType::Directory)
-				{
-					todo.push(static_cast<DirectoryEntry*>(child));
-				}
-			}
-		}
-
-		// Load resource manifest
-		Path resourceManifestPath = mProjectFolder;
-		resourceManifestPath.append(INTERNAL_RESOURCES_DIR);
-		resourceManifestPath.append(RESOURCE_MANIFEST_FILENAME);
-
-		if(FileSystem::exists(resourceManifestPath))
-		{
-			mResourceManifest = ResourceManifest::load(resourceManifestPath, mProjectFolder);
-		}
-	}
-}

+ 0 - 32
BansheeEditor/Source/BsProjectLibraryEntries.cpp

@@ -1,32 +0,0 @@
-#include "BsProjectLibraryEntries.h"
-#include "BsProjectLibraryEntriesRTTI.h"
-
-namespace BansheeEngine
-{
-	ProjectLibraryEntries::ProjectLibraryEntries(const ProjectLibrary::DirectoryEntry& rootEntry)
-		:mRootEntry(rootEntry)
-	{ }
-
-	ProjectLibraryEntries::ProjectLibraryEntries(const ConstructPrivately& dummy)
-	{ }
-
-	std::shared_ptr<ProjectLibraryEntries> ProjectLibraryEntries::create(const ProjectLibrary::DirectoryEntry& rootEntry)
-	{
-		return bs_shared_ptr<ProjectLibraryEntries>(rootEntry);
-	}
-
-	std::shared_ptr<ProjectLibraryEntries> ProjectLibraryEntries::createEmpty()
-	{
-		return bs_shared_ptr<ProjectLibraryEntries>(ConstructPrivately());
-	}
-
-	RTTITypeBase* ProjectLibraryEntries::getRTTIStatic()
-	{
-		return ProjectLibraryEntriesRTTI::instance();
-	}
-
-	RTTITypeBase* ProjectLibraryEntries::getRTTI() const
-	{
-		return ProjectLibraryEntries::getRTTIStatic();
-	}
-}

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff