This commit is contained in:
Evil Factory
2021-12-16 15:09:48 -03:00
10 changed files with 34 additions and 21 deletions
@@ -1,8 +1,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using Barotrauma.IO;
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.Linq;
namespace Barotrauma
{
@@ -13,7 +12,7 @@ namespace Barotrauma
if (consentTextAvailable)
{
var background = new GUIFrame(new RectTransform(Vector2.One, GUI.Canvas), style: "GUIBackgroundBlocker");
var frame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.7f), background.RectTransform, Anchor.Center) { MaxSize = new Point(800, int.MaxValue) });
var frame = new GUIFrame(new RectTransform(new Vector2(0.5f, 0.7f), background.RectTransform, Anchor.Center) { MinSize = new Point(800, 0), MaxSize = new Point(1500, int.MaxValue) });
var content = new GUILayoutGroup(new RectTransform(new Vector2(0.95f), frame.RectTransform, Anchor.Center))
{
@@ -89,18 +88,20 @@ namespace Barotrauma
buttonContainer.RectTransform.MinSize = new Point(0, yesBtn.RectTransform.MinSize.Y);
buttonContainer.RectTransform.MaxSize = new Point(int.MaxValue, yesBtn.RectTransform.MinSize.Y);
content.Recalculate();
foreach (var child in content.Children)
{
if (child is GUITextBlock textBlock)
{
textBlock.TextScale = MathHelper.Min(1.0f, 1.0f / GameSettings.TextScale);
textBlock.RectTransform.MinSize = new Point(0, (int)textBlock.TextSize.Y);
textBlock.RectTransform.MaxSize = new Point(int.MaxValue, (int)textBlock.TextSize.Y + GUI.IntScale(15));
textBlock.RectTransform.MaxSize = new Point(int.MaxValue, (int)textBlock.TextSize.Y);
}
}
frame.RectTransform.MaxSize = new Point(
frame.RectTransform.MaxSize.X,
(int)(content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing) / content.RectTransform.RelativeSize.Y));
int contentHeight = content.Children.Sum(c => c.RectTransform.MaxSize.Y + content.AbsoluteSpacing);
frame.RectTransform.MinSize = new Point(frame.RectTransform.MinSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
frame.RectTransform.MaxSize = new Point(frame.RectTransform.MaxSize.X, (int)(contentHeight / content.RectTransform.RelativeSize.Y));
GUIMessageBox.MessageBoxes.Add(background);
}
@@ -480,7 +480,7 @@ namespace Barotrauma
DebugConsole.Log("Selected content packages: " + string.Join(", ", Config.AllEnabledPackages.Select(cp => cp.Name)));
}
#if !DEBUG
#if !DEBUG && !OSX
GameAnalyticsManager.InitIfConsented();
#endif
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.15.22.0</Version>
<Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
+1 -1
View File
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.15.22.0</Version>
<Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>
@@ -6,7 +6,7 @@
<RootNamespace>Barotrauma</RootNamespace>
<Authors>FakeFish, Undertow Games</Authors>
<Product>Barotrauma</Product>
<Version>0.15.22.0</Version>
<Version>0.15.22.1</Version>
<Copyright>Copyright © FakeFish 2018-2020</Copyright>
<Platforms>AnyCPU;x64</Platforms>
<AssemblyName>Barotrauma</AssemblyName>