Selecting stairs based on WorldRect in editor, disable input if window not active, disable traveling if no locations are selected
This commit is contained in:
@@ -124,7 +124,7 @@ namespace Barotrauma
|
||||
|
||||
if (placePosition == Vector2.Zero)
|
||||
{
|
||||
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
|
||||
if (PlayerInput.LeftButtonDown())
|
||||
placePosition = Submarine.MouseToWorldGrid(cam);
|
||||
|
||||
newRect.X = (int)position.X;
|
||||
@@ -140,7 +140,7 @@ namespace Barotrauma
|
||||
|
||||
newRect = Submarine.AbsRect(placePosition, placeSize);
|
||||
|
||||
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Released)
|
||||
if (PlayerInput.LeftButtonReleased())
|
||||
{
|
||||
if (Submarine.Loaded != null)
|
||||
{
|
||||
@@ -161,7 +161,7 @@ namespace Barotrauma
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle(newRect.X - GameMain.GraphicsWidth, -newRect.Y, newRect.Width + GameMain.GraphicsWidth*2, newRect.Height), Color.White);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle(newRect.X, -newRect.Y - GameMain.GraphicsHeight, newRect.Width, newRect.Height + GameMain.GraphicsHeight*2), Color.White);
|
||||
|
||||
if (PlayerInput.GetMouseState.RightButton == ButtonState.Pressed) selected = null;
|
||||
if (PlayerInput.RightButtonDown()) selected = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user