Unstable 0.1500.2.0 (Rokvach's dog edition)

This commit is contained in:
Markus Isberg
2021-09-10 04:52:34 +09:00
parent e7b7c1a748
commit 1231170fce
126 changed files with 2424 additions and 1083 deletions
@@ -125,7 +125,7 @@ namespace Barotrauma
public TabMenu()
{
if (!initialized) Initialize();
if (!initialized) { Initialize(); }
CreateInfoFrame(selectedTab);
SelectInfoFrameTab(null, selectedTab);
@@ -260,6 +260,10 @@ namespace Barotrauma
}
var talentsButton = createTabButton(InfoFrameTab.Talents, "tabmenu.talents");
talentsButton.OnAddedToGUIUpdateList += (GUIComponent component) =>
{
talentsButton.Enabled = Character.Controlled?.Info != null && GameMain.GameSession?.Campaign != null;
};
}
private bool SelectInfoFrameTab(GUIButton button, object userData)
@@ -1177,8 +1181,6 @@ namespace Barotrauma
private GUITextBlock talentPointsText;
private GUITextBlock experienceText;
private Color experienceBackgroundColor = new Color(255, 255, 255, 155);
private GUIProgressBar experienceBar;
private void CreateTalentInfo(GUIFrame infoFrame)
@@ -1186,12 +1188,13 @@ namespace Barotrauma
infoFrame.ClearChildren();
talentButtons.Clear();
Character controlledCharacter = Character.Controlled;
if (controlledCharacter == null) { return; }
GUIFrame talentFrameBackground = new GUIFrame(new RectTransform(Vector2.One, infoFrame.RectTransform, Anchor.TopCenter), style: "GUIFrameListBox");
int padding = GUI.IntScale(15);
GUIFrame talentFrameContent = new GUIFrame(new RectTransform(new Point(talentFrameBackground.Rect.Width - padding, talentFrameBackground.Rect.Height - padding), infoFrame.RectTransform, Anchor.Center), style: null);
Character controlledCharacter = Character.Controlled;
if (controlledCharacter.Info == null)
{
DebugConsole.ThrowError("No character info found for talent UI");