(c1468d39d) Overhauled docking interface (WIP)

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:39:54 +03:00
parent 7eb0972d16
commit b551ae7999
101 changed files with 1249 additions and 2246 deletions
@@ -16,6 +16,9 @@ namespace Barotrauma
private GUIListBox saveList;
private GUITextBox saveNameBox, seedBox;
private GUITickBox contextualTutorialBox;
private GUILayoutGroup subPreviewContainer;
private GUILayoutGroup subPreviewContainer;
@@ -23,6 +26,14 @@ namespace Barotrauma
public Action<Submarine, string, string> StartNewGame;
public Action<string> LoadGame;
public bool TutorialSelected
{
get
{
if (contextualTutorialBox == null) return false;
return contextualTutorialBox.Selected;
}
}
private readonly bool isMultiplayer;
@@ -59,6 +70,12 @@ namespace Barotrauma
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.02f), leftColumn.RectTransform) { MinSize = new Point(0, 20) }, TextManager.Get("MapSeed") + ":");
seedBox = new GUITextBox(new RectTransform(new Vector2(1.0f, 0.05f), leftColumn.RectTransform) { MinSize = new Point(0, 20) }, ToolBox.RandomSeed(8));
if (!isMultiplayer)
{
contextualTutorialBox = new GUITickBox(new RectTransform(new Point(32, 32), leftColumn.RectTransform), TextManager.Get("TutorialActive"));
UpdateTutorialSelection();
}
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.02f), leftColumn.RectTransform) { MinSize = new Point(0, 20) }, TextManager.Get("SelectedSub") + ":");
var filterContainer = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.05f), leftColumn.RectTransform), isHorizontal: true)
{
@@ -385,7 +402,14 @@ namespace Barotrauma
},
Enabled = false
};
}
}
public void UpdateTutorialSelection()
{
if (isMultiplayer) return;
Tutorial contextualTutorial = Tutorial.Tutorials.Find(t => t is ContextualTutorial);
contextualTutorialBox.Selected = (contextualTutorial != null) ? !GameMain.Config.CompletedTutorialNames.Contains(contextualTutorial.Name) : true;
}
private bool SelectSaveFile(GUIComponent component, object obj)
{