Unstable v0.19.1.0

This commit is contained in:
Juan Pablo Arce
2022-08-19 13:59:08 -03:00
parent 6b55adcdd9
commit 1219615d64
192 changed files with 3875 additions and 2648 deletions

View File

@@ -21,6 +21,7 @@ namespace Barotrauma
private static float keyDelay;
public static Vector2 StartMovingPos => startMovingPos;
public static Vector2 SelectionPos => selectionPos;
public event Action<Rectangle> Resized;
@@ -128,7 +129,9 @@ namespace Barotrauma
return;
}
if (GUI.MouseOn != null || !PlayerInput.MouseInsideWindow)
if (startMovingPos == Vector2.Zero
&& selectionPos == Vector2.Zero
&& (GUI.MouseOn != null || !PlayerInput.MouseInsideWindow))
{
if (highlightedListBox == null ||
(GUI.MouseOn != highlightedListBox && !highlightedListBox.IsParentOf(GUI.MouseOn)))
@@ -738,15 +741,6 @@ namespace Barotrauma
/// </summary>
public static void DrawSelecting(SpriteBatch spriteBatch, Camera cam)
{
if (Screen.Selected is SubEditorScreen subEditor)
{
if (subEditor.IsMouseOnEditorGUI()) { return; }
}
else if (GUI.MouseOn != null)
{
return;
}
Vector2 position = PlayerInput.MousePosition;
position = cam.ScreenToWorld(position);
@@ -819,7 +813,7 @@ namespace Barotrauma
selectionPos = Vector2.Zero;
}
}
if (selectionPos != null && selectionPos != Vector2.Zero)
if (selectionPos != Vector2.Zero)
{
var (sizeX, sizeY) = selectionSize;
var (posX, posY) = selectionPos;