aeafa16...4d3cf73
This commit is contained in:
@@ -118,7 +118,18 @@ namespace Barotrauma
|
||||
CanBeFocused = false
|
||||
};
|
||||
|
||||
characterList = new GUIListBox(new RectTransform(new Vector2(0.9f, 0.95f), tabs[(int)Tab.Crew].RectTransform, Anchor.Center))
|
||||
var crewContent = new GUILayoutGroup(new RectTransform(new Vector2(0.9f, 0.95f), tabs[(int)Tab.Crew].RectTransform, Anchor.Center))
|
||||
{
|
||||
Stretch = true,
|
||||
RelativeSpacing = 0.02f
|
||||
};
|
||||
|
||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.1f), crewContent.RectTransform), "", font: GUI.LargeFont)
|
||||
{
|
||||
TextGetter = GetMoney
|
||||
};
|
||||
|
||||
characterList = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.9f), crewContent.RectTransform))
|
||||
{
|
||||
OnSelected = SelectCharacter
|
||||
};
|
||||
|
||||
@@ -438,6 +438,43 @@ namespace Barotrauma
|
||||
UpdateSourceRect(limb, newRect);
|
||||
}
|
||||
}
|
||||
UpdateJointCreation();
|
||||
if (PlayerInput.KeyHit(Keys.Left))
|
||||
{
|
||||
foreach (var limb in selectedLimbs)
|
||||
{
|
||||
var newRect = limb.ActiveSprite.SourceRect;
|
||||
newRect.X--;
|
||||
UpdateSourceRect(limb, newRect);
|
||||
}
|
||||
}
|
||||
if (PlayerInput.KeyHit(Keys.Right))
|
||||
{
|
||||
foreach (var limb in selectedLimbs)
|
||||
{
|
||||
var newRect = limb.ActiveSprite.SourceRect;
|
||||
newRect.X++;
|
||||
UpdateSourceRect(limb, newRect);
|
||||
}
|
||||
}
|
||||
if (PlayerInput.KeyHit(Keys.Down))
|
||||
{
|
||||
foreach (var limb in selectedLimbs)
|
||||
{
|
||||
var newRect = limb.ActiveSprite.SourceRect;
|
||||
newRect.Y++;
|
||||
UpdateSourceRect(limb, newRect);
|
||||
}
|
||||
}
|
||||
if (PlayerInput.KeyHit(Keys.Up))
|
||||
{
|
||||
foreach (var limb in selectedLimbs)
|
||||
{
|
||||
var newRect = limb.ActiveSprite.SourceRect;
|
||||
newRect.Y--;
|
||||
UpdateSourceRect(limb, newRect);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isFreezed)
|
||||
{
|
||||
|
||||
@@ -38,9 +38,18 @@ namespace Barotrauma
|
||||
#region Creation
|
||||
public MainMenuScreen(GameMain game)
|
||||
{
|
||||
new GUIImage(new RectTransform(new Vector2(0.35f, 0.2f), Frame.RectTransform, Anchor.BottomRight)
|
||||
{ RelativeOffset = new Vector2(0.05f, 0.05f), AbsoluteOffset = new Point(-5, -5) },
|
||||
style: "TitleText")
|
||||
{
|
||||
Color = Color.Black * 0.5f,
|
||||
CanBeFocused = false
|
||||
};
|
||||
new GUIImage(new RectTransform(new Vector2(0.35f, 0.2f), Frame.RectTransform, Anchor.BottomRight) { RelativeOffset = new Vector2(0.05f, 0.05f) },
|
||||
style: "TitleText");
|
||||
|
||||
buttonsParent = new GUILayoutGroup(new RectTransform(new Vector2(0.5f, 0.85f), parent: Frame.RectTransform, anchor: Anchor.BottomLeft, pivot: Pivot.BottomLeft)
|
||||
{
|
||||
RelativeOffset = new Vector2(0, 0),
|
||||
AbsoluteOffset = new Point(50, 0)
|
||||
})
|
||||
{
|
||||
@@ -66,7 +75,7 @@ namespace Barotrauma
|
||||
|
||||
var campaignButtons = new GUIFrame(new RectTransform(new Vector2(1.0f, 1.0f), parent: campaignNavigation.RectTransform), style: "MainMenuGUIFrame");
|
||||
|
||||
var campaignList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.15f), parent: campaignButtons.RectTransform))
|
||||
var campaignList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.2f), parent: campaignButtons.RectTransform))
|
||||
{
|
||||
Stretch = false,
|
||||
RelativeSpacing = 0.035f
|
||||
@@ -112,7 +121,7 @@ namespace Barotrauma
|
||||
|
||||
var multiplayerButtons = new GUIFrame(new RectTransform(new Vector2(1.0f, 1.0f), parent: multiplayerNavigation.RectTransform), style: "MainMenuGUIFrame");
|
||||
|
||||
var multiplayerList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.15f), parent: multiplayerButtons.RectTransform))
|
||||
var multiplayerList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.2f), parent: multiplayerButtons.RectTransform))
|
||||
{
|
||||
Stretch = false,
|
||||
RelativeSpacing = 0.035f
|
||||
@@ -157,7 +166,7 @@ namespace Barotrauma
|
||||
|
||||
var customizeButtons = new GUIFrame(new RectTransform(new Vector2(1.0f, 1.0f), parent: customizeNavigation.RectTransform), style: "MainMenuGUIFrame");
|
||||
|
||||
var customizeList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.15f), parent: customizeButtons.RectTransform))
|
||||
var customizeList = new GUILayoutGroup(new RectTransform(new Vector2(0.8f, 0.2f), parent: customizeButtons.RectTransform))
|
||||
{
|
||||
Stretch = false,
|
||||
RelativeSpacing = 0.035f
|
||||
@@ -673,7 +682,12 @@ namespace Barotrauma
|
||||
backgroundSprite = (LocationType.List.Where(l => l.UseInMainMenu).GetRandom()).GetPortrait(0);
|
||||
}
|
||||
|
||||
if (backgroundSprite != null) { GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite); }
|
||||
if (backgroundSprite != null)
|
||||
{
|
||||
GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite,
|
||||
blurAmount: 0.0f,
|
||||
aberrationStrength: 0.0f);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)
|
||||
|
||||
@@ -625,8 +625,7 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Item item in itemInventory.Items)
|
||||
{
|
||||
if (item == null) continue;
|
||||
item.Drop();
|
||||
item?.Drop(null);
|
||||
}
|
||||
}
|
||||
else // If current screen is not subeditor, delete anyway to avoid lingering objects
|
||||
@@ -671,8 +670,7 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Item item in itemInventory.Items)
|
||||
{
|
||||
if (item == null) continue;
|
||||
item.Drop();
|
||||
item?.Drop(null);
|
||||
}
|
||||
}
|
||||
else // If current screen is not subeditor, delete anyway to avoid lingering objects
|
||||
@@ -703,8 +701,7 @@ namespace Barotrauma
|
||||
{
|
||||
foreach (Item item in itemInventory.Items)
|
||||
{
|
||||
if (item == null) continue;
|
||||
item.Drop();
|
||||
item?.Drop(null);
|
||||
}
|
||||
}
|
||||
else // If current screen is not subeditor, delete anyway to avoid lingering objects
|
||||
@@ -1457,7 +1454,7 @@ namespace Barotrauma
|
||||
Item existingWire = dummyCharacter.SelectedItems.FirstOrDefault(i => i != null && i.Prefab == userData as ItemPrefab);
|
||||
if (existingWire != null)
|
||||
{
|
||||
existingWire.Drop();
|
||||
existingWire.Drop(null);
|
||||
existingWire.Remove();
|
||||
return false;
|
||||
}
|
||||
@@ -1470,7 +1467,7 @@ namespace Barotrauma
|
||||
existingWire = dummyCharacter.Inventory.Items[slotIndex];
|
||||
if (existingWire != null && existingWire.Prefab != userData as ItemPrefab)
|
||||
{
|
||||
existingWire.Drop();
|
||||
existingWire.Drop(null);
|
||||
existingWire.Remove();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user