Unstable v0.19.1.0
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user