Преглед на файлове

Able to pick non enabled UI-elements as well.

Wei Tjong Yao преди 12 години
родител
ревизия
2d8d3705d7
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      Bin/Data/Scripts/Editor/EditorView.as

+ 2 - 2
Bin/Data/Scripts/Editor/EditorView.as

@@ -388,7 +388,7 @@ void ViewRaycast(bool mouseClick)
         return;
         return;
 
 
     IntVector2 pos = ui.cursorPosition;
     IntVector2 pos = ui.cursorPosition;
-    UIElement@ elementAtPos = ui.GetElementAt(pos);
+    UIElement@ elementAtPos = ui.GetElementAt(pos, pickMode != PICK_UI_ELEMENTS);
     if (pickMode == PICK_UI_ELEMENTS)
     if (pickMode == PICK_UI_ELEMENTS)
     {
     {
         bool leftClick = mouseClick && input.mouseButtonPress[MOUSEB_LEFT];
         bool leftClick = mouseClick && input.mouseButtonPress[MOUSEB_LEFT];
@@ -397,7 +397,7 @@ void ViewRaycast(bool mouseClick)
         if (elementAtPos !is null)
         if (elementAtPos !is null)
         {
         {
             // Only interested in user-created UI elements
             // Only interested in user-created UI elements
-            if (elementAtPos.GetElementEventSender() is editorUIElement)
+            if (elementAtPos !is editorUIElement && elementAtPos.GetElementEventSender() is editorUIElement)
             {
             {
                 // \todo Debug draw the UIElement
                 // \todo Debug draw the UIElement
                 //DebugDrawUIElement();
                 //DebugDrawUIElement();