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
+5 -5
View File
@@ -205,10 +205,10 @@ namespace Barotrauma
if (draggingItem != null && !draggingItemSlot.Contains(PlayerInput.MousePosition) && draggingItem.Container == this.Owner)
{
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
if (PlayerInput.LeftButtonDown())
{
slotRect.X = PlayerInput.GetMouseState.X - slotRect.Width / 2;
slotRect.Y = PlayerInput.GetMouseState.Y - slotRect.Height / 2;
slotRect.X = (int)PlayerInput.MousePosition.X - slotRect.Width / 2;
slotRect.Y = (int)PlayerInput.MousePosition.Y - slotRect.Height / 2;
//GUI.DrawRectangle(spriteBatch, rect, Color.White, true);
//draggingItem.sprite.Draw(spriteBatch, new Vector2(rect.X + rect.Width / 2, rect.Y + rect.Height / 2), Color.White);
@@ -261,12 +261,12 @@ namespace Barotrauma
{
if (draggingItem == null)
{
if (PlayerInput.GetMouseState.LeftButton == ButtonState.Pressed)
if (PlayerInput.LeftButtonDown())
{
draggingItem = item;
}
}
else if (PlayerInput.GetMouseState.LeftButton == ButtonState.Released)
else if (PlayerInput.LeftButtonReleased())
{
if (PlayerInput.DoubleClicked())
{