diff --git a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs index a7b05fc0f..5a155a525 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs @@ -1434,7 +1434,16 @@ namespace Barotrauma RelativeSpacing = 0.05f }; - var button = new GUIButton(new RectTransform(new Vector2(1.0f, 0.1f), buttonContainer.RectTransform), TextManager.Get("PauseMenuResume"), style: "GUIButtonLarge") + var button = new GUIButton(new RectTransform(new Vector2(1.0f, 0.1f), buttonContainer.RectTransform), TextManager.Get("bugreportbutton"), style: "GUIButtonLarge") + { + Color = Color.Red, + HoverColor = Color.DarkRed, + PressedColor = Color.White, + OnClicked = (btn, userdata) => { GameMain.Instance.ShowBugReporter(); return true; } + }; + + + button = new GUIButton(new RectTransform(new Vector2(1.0f, 0.1f), buttonContainer.RectTransform), TextManager.Get("PauseMenuResume"), style: "GUIButtonLarge") { OnClicked = TogglePauseMenu }; diff --git a/Barotrauma/BarotraumaClient/Source/GameMain.cs b/Barotrauma/BarotraumaClient/Source/GameMain.cs index 28a8f28a7..0b481560e 100644 --- a/Barotrauma/BarotraumaClient/Source/GameMain.cs +++ b/Barotrauma/BarotraumaClient/Source/GameMain.cs @@ -812,17 +812,18 @@ namespace Barotrauma // ToDo: Move texts/links to localization, when possible. public void ShowBugReporter() { - var msgBox = new GUIMessageBox("", ""); - var linkHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 0.5f), msgBox.Content.RectTransform)) { Stretch = true, RelativeSpacing = 0.05f }; + var msgBox = new GUIMessageBox(TextManager.Get("bugreportbutton"), ""); + var linkHolder = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 1.0f), msgBox.Content.RectTransform)) { Stretch = true, RelativeSpacing = 0.025f }; + linkHolder.RectTransform.MaxSize = new Point(int.MaxValue, linkHolder.Rect.Height); List> links = new List>() { - new Pair("Barotrauma Feedback Form","https://barotraumagame.com/feedback"), - new Pair("Github Issue Form (Needs account)","https://github.com/Regalis11/Barotrauma/issues/new?template=bug_report.md") + new Pair(TextManager.Get("bugreportfeedbackform"),"https://barotraumagame.com/feedback"), + new Pair(TextManager.Get("bugreportgithubform"),"https://github.com/Regalis11/Barotrauma/issues/new?template=bug_report.md") }; foreach (var link in links) { - new GUIButton(new RectTransform(new Vector2(1.0f, 0.2f), linkHolder.RectTransform), link.First, style: "MainMenuGUIButton", textAlignment: Alignment.Left) + new GUIButton(new RectTransform(new Vector2(1.0f, 1.0f), linkHolder.RectTransform), link.First, style: "MainMenuGUIButton", textAlignment: Alignment.Left) { UserData = link.Second, OnClicked = (btn, userdata) => @@ -833,6 +834,9 @@ namespace Barotrauma } }; } + + msgBox.InnerFrame.RectTransform.MinSize = new Point(0, + msgBox.InnerFrame.Rect.Height + linkHolder.Rect.Height + msgBox.Content.AbsoluteSpacing * 2 + 10); } static bool waitForKeyHit = true; diff --git a/Barotrauma/BarotraumaClient/Source/GameSettings.cs b/Barotrauma/BarotraumaClient/Source/GameSettings.cs index f6e42ac9b..b31bd2605 100644 --- a/Barotrauma/BarotraumaClient/Source/GameSettings.cs +++ b/Barotrauma/BarotraumaClient/Source/GameSettings.cs @@ -85,13 +85,6 @@ namespace Barotrauma TextManager.Get("Settings"), textAlignment: Alignment.TopLeft, font: GUI.LargeFont) { ForceUpperCase = true }; - //TODO: enable when new texts can be added - /*new GUIButton(new RectTransform(new Vector2(1.0f, 0.75f), settingsTitle.RectTransform, Anchor.CenterRight), style: "GUIBugButton") - { - ToolTip = "Bug Reporter", - OnClicked = (btn, userdata) => { GameMain.Instance.ShowBugReporter(); return true; } - };*/ - var generalLayoutGroup = new GUILayoutGroup(new RectTransform(new Vector2(1.0f, 1.0f), leftPanel.RectTransform, Anchor.TopLeft)); new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), generalLayoutGroup.RectTransform), TextManager.Get("ContentPackages")); @@ -178,6 +171,12 @@ namespace Barotrauma }; } + new GUIButton(new RectTransform(new Vector2(0.05f, 0.75f), tabButtonHolder.RectTransform, Anchor.BottomRight) { RelativeOffset = new Vector2(0.0f, 0.2f) }, style: "GUIBugButton") + { + ToolTip = TextManager.Get("bugreportbutton"), + OnClicked = (btn, userdata) => { GameMain.Instance.ShowBugReporter(); return true; } + }; + var buttonArea = new GUIFrame(new RectTransform(new Vector2(1.0f, 0.08f), paddedFrame.RectTransform, Anchor.BottomCenter), style: null); /// Graphics tab --------------------------------------------------------------