Browse Source

Fix base class declarations when in another package, constrain mouse clicks to scene view properly, register the environment lib

Josh Engebretson 10 years ago
parent
commit
4c6bfa0d14

+ 5 - 0
Source/AtomicEditorWork/Application/AEEditorApp.cpp

@@ -17,6 +17,9 @@
 
 #include "AEEditorApp.h"
 
+// Move me
+#include <Atomic/Environment/Environment.h>
+
 using namespace ToolCore;
 
 namespace ToolCore
@@ -78,6 +81,8 @@ void AEEditorApp::Start()
 
 void AEEditorApp::Setup()
 {
+    RegisterEnvironmentLibrary(context_);
+
     FileSystem* filesystem = GetSubsystem<FileSystem>();
     ToolEnvironment* env = new ToolEnvironment(context_);
     context_->RegisterSubsystem(env);

+ 3 - 4
Source/AtomicEditorWork/Editors/SceneEditor3D/SceneView3D.cpp

@@ -218,12 +218,11 @@ bool SceneView3D::MouseInView()
     IntVector2 pos = input->GetMousePosition();
 
     IntRect rect = GetRect();
-    int x = rect.left_;
-    int y = rect.top_;
 
-    GetInternalWidget()->ConvertToRoot(x, y);
+    GetInternalWidget()->ConvertToRoot(rect.left_, rect.top_);
+    GetInternalWidget()->ConvertToRoot(rect.right_, rect.bottom_);
 
-    return rect.IsInside(IntVector2(x, y));
+    return rect.IsInside(pos);
 
 }
 

+ 15 - 2
Source/ToolCore/JSBind/JSBTypeScript.cpp

@@ -126,8 +126,21 @@ void JSBTypeScript::ExportModuleClasses(JSBModule* module)
         JSBClass* klass = classes.At(i);
 
         source_ += "   export class " + klass->GetName();
-        if (klass->GetBaseClass())
-            source_ += " extends " + klass->GetBaseClass()->GetName();
+
+        JSBClass* base = klass->GetBaseClass();
+
+        if (base)
+        {
+            if (klass->GetPackage() != base->GetPackage())
+            {
+                source_ += " extends " + base->GetPackage()->GetName() + "." + base->GetName();
+            }
+            else
+            {
+                source_ += " extends " + base->GetName();
+            }
+
+        }
 
         source_ += " {\n\n";