Browse Source

Fixing Scene view interaction so that pointer coordinates properly map to the scene view texture

BearishSun 10 years ago
parent
commit
761e9e8511

+ 1 - 0
MBansheeEditor/MBansheeEditor.csproj

@@ -20,6 +20,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>

+ 2 - 2
MBansheeEditor/Scene/SceneWindow.cs

@@ -232,8 +232,7 @@ namespace BansheeEditor
             scenePos = screenPos;
             Vector2I windowPos = ScreenToWindowPos(screenPos);
 
-            Rect2I bounds = GUILayoutUtility.CalculateBounds(renderTextureGUI);
-
+            Rect2I bounds = GUILayoutUtility.CalculateBounds(renderTextureGUI, GUI);
             if (bounds.Contains(windowPos))
             {
                 scenePos.x = windowPos.x - bounds.x;
@@ -416,6 +415,7 @@ namespace BansheeEditor
                             bool ctrlHeld = Input.IsButtonHeld(ButtonCode.LeftControl) ||
                                             Input.IsButtonHeld(ButtonCode.RightControl);
 
+                            Debug.Log("PICK");
                             sceneViewHandler.PickObject(scenePos, ctrlHeld);
                         }
                     }

+ 1 - 0
MBansheeEngine/MBansheeEngine.csproj

@@ -23,6 +23,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <UseVSHostingProcess>false</UseVSHostingProcess>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <DebugType>none</DebugType>

+ 2 - 2
README.md

@@ -89,7 +89,7 @@ Aside from Banshee source code you will also need various third party dependenci
       * PNG, PSD, BMP, JPG, ... images
       * OTF, TTF fonts
       * HLSL9, HLSL11, GLSL shaders
-  * Powerful GUI system
+  * GUI system
     * Unicode text rendering and input
     * Easy to use layout based system
     * Many common GUI controls
@@ -98,7 +98,7 @@ Aside from Banshee source code you will also need various third party dependenci
     * Support for texture atlases
     * Localization
   * Scripting
-    * C# via Mono
+    * C# 5.0
 	* Separate high level engine API
 	* Integrated runtime for maximum performance
     * Full access to .NET framework