(7840e7e91) Fixed characters selecting entities when dragging and dropping items into them when the Select input is bind to Mouse1.
This commit is contained in:
@@ -68,7 +68,8 @@ namespace Barotrauma
|
|||||||
states = newInput,
|
states = newInput,
|
||||||
intAim = intAngle
|
intAim = intAngle
|
||||||
};
|
};
|
||||||
if (focusedItem != null && (!newMem.states.HasFlag(InputNetFlags.Grab) && !newMem.states.HasFlag(InputNetFlags.Health)))
|
if (focusedItem != null && !CharacterInventory.DraggingItemToWorld &&
|
||||||
|
(!newMem.states.HasFlag(InputNetFlags.Grab) && !newMem.states.HasFlag(InputNetFlags.Health)))
|
||||||
{
|
{
|
||||||
newMem.interact = focusedItem.ID;
|
newMem.interact = focusedItem.ID;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,12 +60,19 @@ namespace Barotrauma
|
|||||||
|
|
||||||
public CrewManager(XElement element, bool isSinglePlayer)
|
public CrewManager(XElement element, bool isSinglePlayer)
|
||||||
: this(isSinglePlayer)
|
: this(isSinglePlayer)
|
||||||
|
{
|
||||||
|
return characterListBox.Rect;
|
||||||
|
}
|
||||||
|
|
||||||
|
partial void InitProjectSpecific()
|
||||||
{
|
{
|
||||||
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
|
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
|
||||||
{
|
{
|
||||||
CanBeFocused = false
|
CanBeFocused = false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Point scrollButtonSize = new Point((int)(200 * GUI.Scale), (int)(30 * GUI.Scale));
|
||||||
|
|
||||||
var characterInfo = new CharacterInfo(subElement);
|
var characterInfo = new CharacterInfo(subElement);
|
||||||
characterInfos.Add(characterInfo);
|
characterInfos.Add(characterInfo);
|
||||||
foreach (XElement invElement in subElement.Elements())
|
foreach (XElement invElement in subElement.Elements())
|
||||||
@@ -125,16 +132,6 @@ namespace Barotrauma
|
|||||||
prevUIScale = GUI.Scale;
|
prevUIScale = GUI.Scale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Character list management
|
|
||||||
|
|
||||||
public Rectangle GetCharacterListArea()
|
|
||||||
{
|
|
||||||
return characterListBox.Rect;
|
|
||||||
}
|
|
||||||
|
|
||||||
partial void InitProjectSpecific()
|
partial void InitProjectSpecific()
|
||||||
{
|
{
|
||||||
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
|
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
|
||||||
|
|||||||
@@ -600,6 +600,8 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (draggingItem != null && PlayerInput.LeftButtonReleased())
|
if (draggingItem != null && PlayerInput.LeftButtonReleased())
|
||||||
{
|
{
|
||||||
|
Character.Controlled.ClearInputs();
|
||||||
|
|
||||||
if (CharacterHealth.OpenHealthWindow != null &&
|
if (CharacterHealth.OpenHealthWindow != null &&
|
||||||
CharacterHealth.OpenHealthWindow.OnItemDropped(draggingItem, false))
|
CharacterHealth.OpenHealthWindow.OnItemDropped(draggingItem, false))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1782,6 +1782,9 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
else if (focusedItem != null)
|
else if (focusedItem != null)
|
||||||
{
|
{
|
||||||
|
#if CLIENT
|
||||||
|
if (CharacterInventory.DraggingItemToWorld) { return; }
|
||||||
|
#endif
|
||||||
bool canInteract = focusedItem.TryInteract(this);
|
bool canInteract = focusedItem.TryInteract(this);
|
||||||
#if CLIENT
|
#if CLIENT
|
||||||
if (Controlled == this)
|
if (Controlled == this)
|
||||||
|
|||||||
Reference in New Issue
Block a user