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:
Regalis
2016-01-27 22:27:51 +02:00
parent 8cc12b6988
commit 7637bc441f
21 changed files with 95 additions and 77 deletions
+2 -3
View File
@@ -114,8 +114,7 @@ namespace Barotrauma
if (placePosition == Vector2.Zero)
{
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
placePosition = position;
if (PlayerInput.LeftButtonDown()) placePosition = position;
}
else
{
@@ -124,7 +123,7 @@ namespace Barotrauma
if (resizeVertical)
placeSize.Y = Math.Max(placePosition.Y - position.Y, size.Y);
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Released)
if (PlayerInput.LeftButtonReleased())
{
var item = new Item(new Rectangle((int)placePosition.X, (int)placePosition.Y, (int)placeSize.X, (int)placeSize.Y), this, Submarine.Loaded);
placePosition = Vector2.Zero;