Faction Test 100.4.0.0
This commit is contained in:
@@ -269,7 +269,7 @@ namespace Barotrauma
|
||||
};
|
||||
|
||||
#if USE_STEAM
|
||||
steamWorkshopButton = new GUIButton(new RectTransform(new Vector2(1.0f, 1.0f), customizeList.RectTransform), TextManager.Get("SteamWorkshopButton"), textAlignment: Alignment.Left, style: "MainMenuGUIButton")
|
||||
steamWorkshopButton = new GUIButton(new RectTransform(new Vector2(1.0f, 1.0f), customizeList.RectTransform), TextManager.Get("settingstab.mods"), textAlignment: Alignment.Left, style: "MainMenuGUIButton")
|
||||
{
|
||||
ForceUpperCase = ForceUpperCase.Yes,
|
||||
Enabled = true,
|
||||
@@ -334,7 +334,7 @@ namespace Barotrauma
|
||||
OnClicked = (button, userData) =>
|
||||
{
|
||||
string url = TextManager.Get("EditorDisclaimerWikiUrl").Fallback("https://barotraumagame.com/wiki").Value;
|
||||
GameMain.Instance.ShowOpenUrlInWebBrowserPrompt(url, promptExtensionTag: "wikinotice");
|
||||
GameMain.ShowOpenUrlInWebBrowserPrompt(url, promptExtensionTag: "wikinotice");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -463,13 +463,17 @@ namespace Barotrauma
|
||||
}
|
||||
};
|
||||
var tutorialPreview = new GUILayoutGroup(new RectTransform(new Vector2(0.6f, 1.0f), tutorialContent.RectTransform)) { RelativeSpacing = 0.05f, Stretch = true };
|
||||
var imageContainer = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.6f), tutorialPreview.RectTransform), style: "InnerFrame");
|
||||
var imageContainer = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.5f), tutorialPreview.RectTransform), style: "InnerFrame");
|
||||
tutorialBanner = new GUIImage(new RectTransform(Vector2.One, imageContainer.RectTransform), style: null, scaleToFit: true);
|
||||
|
||||
var infoContainer = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.4f), tutorialPreview.RectTransform), style: "GUIFrameListBox");
|
||||
var infoContent = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.9f), infoContainer.RectTransform, Anchor.Center), childAnchor: Anchor.TopCenter);
|
||||
var infoContainer = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.5f), tutorialPreview.RectTransform), style: "GUIFrameListBox");
|
||||
var infoContent = new GUILayoutGroup(new RectTransform(new Vector2(0.95f, 0.9f), infoContainer.RectTransform, Anchor.Center), childAnchor: Anchor.TopLeft)
|
||||
{
|
||||
AbsoluteSpacing = GUI.IntScale(10)
|
||||
};
|
||||
|
||||
tutorialHeader = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.75f), infoContent.RectTransform), string.Empty, font: GUIStyle.SubHeadingFont, textAlignment: Alignment.Center);
|
||||
tutorialHeader = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), string.Empty, font: GUIStyle.SubHeadingFont);
|
||||
tutorialDescription = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.0f), infoContent.RectTransform), string.Empty, wrap: true);
|
||||
|
||||
var startButton = new GUIButton(new RectTransform(new Vector2(0.5f, 0.0f), infoContent.RectTransform, Anchor.BottomRight), text: TextManager.Get("startgamebutton"))
|
||||
{
|
||||
@@ -500,6 +504,10 @@ namespace Barotrauma
|
||||
private void SelectTutorial(Tutorial tutorial)
|
||||
{
|
||||
tutorialHeader.Text = tutorial.DisplayName;
|
||||
tutorialHeader.CalculateHeightFromText();
|
||||
tutorialDescription.Text = tutorial.Description;
|
||||
tutorialDescription.CalculateHeightFromText();
|
||||
(tutorialDescription.Parent as GUILayoutGroup)?.Recalculate();
|
||||
tutorial.TutorialPrefab.Banner?.EnsureLazyLoaded();
|
||||
tutorialBanner.Sprite = tutorial.TutorialPrefab.Banner;
|
||||
tutorialBanner.Color = tutorial.TutorialPrefab.Banner == null ? Color.Black : Color.White;
|
||||
@@ -945,25 +953,19 @@ namespace Barotrauma
|
||||
|
||||
if (backgroundSprite == null)
|
||||
{
|
||||
#if UNSTABLE
|
||||
backgroundSprite = new Sprite("Content/UnstableBackground.png", sourceRectangle: null);
|
||||
#endif
|
||||
backgroundSprite ??= (LocationType.Prefabs.Where(l => l.UseInMainMenu).GetRandomUnsynced())?.GetPortrait(0);
|
||||
}
|
||||
|
||||
if (backgroundSprite != null)
|
||||
{
|
||||
GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite,
|
||||
aberrationStrength: 0.0f);
|
||||
GUI.DrawBackgroundSprite(spriteBatch, backgroundSprite, Color.White);
|
||||
}
|
||||
|
||||
var vignette = GUIStyle.GetComponentStyle("mainmenuvignette")?.GetDefaultSprite();
|
||||
if (vignette != null)
|
||||
{
|
||||
spriteBatch.Begin(blendState: BlendState.NonPremultiplied);
|
||||
vignette.Draw(spriteBatch, Vector2.Zero, Color.White, Vector2.Zero, 0.0f,
|
||||
new Vector2(GameMain.GraphicsWidth / vignette.size.X, GameMain.GraphicsHeight / vignette.size.Y));
|
||||
spriteBatch.End();
|
||||
new Vector2(Math.Min(GameMain.GraphicsWidth / vignette.size.X, GameMain.GraphicsHeight / vignette.size.Y)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -976,10 +978,10 @@ namespace Barotrauma
|
||||
|
||||
public override void Draw(double deltaTime, GraphicsDevice graphics, SpriteBatch spriteBatch)
|
||||
{
|
||||
DrawBackground(graphics, spriteBatch);
|
||||
|
||||
spriteBatch.Begin(SpriteSortMode.Deferred, null, GUI.SamplerState, null, GameMain.ScissorTestEnable);
|
||||
|
||||
DrawBackground(graphics, spriteBatch);
|
||||
|
||||
GUI.Draw(Cam, spriteBatch);
|
||||
|
||||
if (selectedTab != Tab.Credits)
|
||||
@@ -1011,7 +1013,7 @@ namespace Barotrauma
|
||||
GUI.DrawLine(spriteBatch, textPos, textPos - Vector2.UnitX * textSize.X, mouseOn ? Color.White : Color.White * 0.7f);
|
||||
if (mouseOn && PlayerInput.PrimaryMouseButtonClicked())
|
||||
{
|
||||
GameMain.Instance.ShowOpenUrlInWebBrowserPrompt("http://privacypolicy.daedalic.com");
|
||||
GameMain.ShowOpenUrlInWebBrowserPrompt("http://privacypolicy.daedalic.com");
|
||||
}
|
||||
}
|
||||
textPos.Y -= textSize.Y;
|
||||
|
||||
Reference in New Issue
Block a user