(3e8bdbb0a) v0.8.9.9 + merge fix

This commit is contained in:
Joonas Rikkonen
2019-04-06 17:52:51 +03:00
parent f043ac26f4
commit d15a88c619
9 changed files with 12 additions and 108 deletions
@@ -61,12 +61,9 @@ namespace Barotrauma
public CrewManager(XElement element, bool isSinglePlayer)
: this(isSinglePlayer)
{
guiFrame = new GUIFrame(new RectTransform(Vector2.One, GUICanvas.Instance), null, Color.Transparent)
foreach (XElement subElement in element.Elements())
{
CanBeFocused = false
};
Point scrollButtonSize = new Point((int)(200 * GUI.Scale), (int)(30 * GUI.Scale));
if (subElement.Name.ToString().ToLowerInvariant() != "character") continue;
var characterInfo = new CharacterInfo(subElement);
characterInfos.Add(characterInfo);
@@ -77,54 +74,6 @@ namespace Barotrauma
break;
}
}
var reports = Order.PrefabList.FindAll(o => o.TargetAllCharacters && o.SymbolSprite != null);
reportButtonFrame = new GUILayoutGroup(new RectTransform(
new Point((HUDLayoutSettings.CrewArea.Height - (int)((reports.Count - 1) * 5 * GUI.Scale)) / reports.Count, HUDLayoutSettings.CrewArea.Height), guiFrame.RectTransform))
{
AbsoluteSpacing = (int)(5 * GUI.Scale),
UserData = "reportbuttons",
CanBeFocused = false
};
//report buttons
foreach (Order order in reports)
{
if (!order.TargetAllCharacters || order.SymbolSprite == null) continue;
var btn = new GUIButton(new RectTransform(new Point(reportButtonFrame.Rect.Width), reportButtonFrame.RectTransform), style: null)
{
OnClicked = (GUIButton button, object userData) =>
{
if (Character.Controlled == null || Character.Controlled.SpeechImpediment >= 100.0f) return false;
SetCharacterOrder(null, order, null, Character.Controlled);
HumanAIController.PropagateHullSafety(Character.Controlled, Character.Controlled.CurrentHull);
return true;
},
UserData = order,
ToolTip = order.Name
};
new GUIFrame(new RectTransform(new Vector2(1.5f), btn.RectTransform, Anchor.Center), "OuterGlow")
{
Color = Color.Red * 0.8f,
HoverColor = Color.Red * 1.0f,
PressedColor = Color.Red * 0.6f,
UserData = "highlighted",
CanBeFocused = false,
Visible = false
};
var img = new GUIImage(new RectTransform(Vector2.One, btn.RectTransform), order.Prefab.SymbolSprite, scaleToFit: true)
{
Color = order.Color,
HoverColor = Color.Lerp(order.Color, Color.White, 0.5f),
ToolTip = order.Name
};
}
screenResolution = new Point(GameMain.GraphicsWidth, GameMain.GraphicsHeight);
prevUIScale = GUI.Scale;
}
partial void InitProjectSpecific()
@@ -486,22 +486,5 @@ namespace Barotrauma.Items.Components
yield return CoroutineStatus.Success;
}
partial void ParseMsg()
{
string msg = TextManager.Get(Msg, true);
if (msg != null)
{
foreach (InputType inputType in Enum.GetValues(typeof(InputType)))
{
msg = msg.Replace("[" + inputType.ToString().ToLowerInvariant() + "]", GameMain.Config.KeyBind(inputType).ToString());
}
DisplayMsg = msg;
}
else
{
DisplayMsg = Msg;
}
}
}
}
@@ -345,10 +345,6 @@ namespace Barotrauma.Items.Components
crosshairPointerSprite?.Draw(spriteBatch, crosshairPointerPos, 0, zoom);
}
crosshairSprite?.Draw(spriteBatch, crosshairPos, readyToFire ? Color.White : Color.White * 0.2f, 0, zoom);
crosshairPointerSprite?.Draw(spriteBatch, crosshairPointerPos, 0, zoom);
}
public void ClientRead(ServerNetObject type, NetBuffer msg, float sendingTime)
{
UInt16 projectileID = msg.ReadUInt16();
@@ -1104,7 +1104,7 @@ namespace Barotrauma
if (!contentPacks.Contains(contentPack.Name)) contentPacks.Add(contentPack.Name);
}
if (File.Exists(filePath))
foreach (string contentPackageName in contentPacks)
{
var cpTickBox = new GUITickBox(new RectTransform(new Vector2(0.2f, 0.2f), contentPackList.Content.RectTransform), contentPackageName, font: GUI.SmallFont)
{
@@ -1123,11 +1123,6 @@ namespace Barotrauma
}
return true;
};
msgBox.Buttons[1].OnClicked = msgBox.Close;
}
else
{
Save();
}
@@ -1168,7 +1163,6 @@ namespace Barotrauma
AbsoluteSpacing = 5,
Stretch = true
};
#endif
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), paddedSaveFrame.RectTransform),
TextManager.Get("SaveItemAssemblyDialogHeader"), font: GUI.LargeFont);
@@ -1265,15 +1259,12 @@ namespace Barotrauma
return false;
}
private bool SaveAssembly(GUIButton button, object obj)
private bool CreateLoadScreen()
{
if (CharacterMode) SetCharacterMode(false);
if (WiringMode) SetWiringMode(false);
loadFrame = new GUIButton(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker")
{
OnClicked = (btn, userdata) => { if (GUI.MouseOn == btn || GUI.MouseOn == btn.TextBlock) loadFrame = null; return true; },
};
Submarine.RefreshSavedSubs();
loadFrame = new GUIButton(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker")
{