(b807790e4) Created a Bug Report button in settings screen, which links the player either to the Barotrauma feedback or Github issue form
This commit is contained in:
@@ -756,6 +756,31 @@ namespace Barotrauma
|
|||||||
Config.SaveNewPlayerConfig();
|
Config.SaveNewPlayerConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 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 };
|
||||||
|
|
||||||
|
List<Pair<string, string>> links = new List<Pair<string, string>>()
|
||||||
|
{
|
||||||
|
new Pair<string, string>("Barotrauma Feedback Form","https://barotraumagame.com/feedback"),
|
||||||
|
new Pair<string, string>("Github Issue Form (Needs account)","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)
|
||||||
|
{
|
||||||
|
UserData = link.Second,
|
||||||
|
OnClicked = (btn, userdata) =>
|
||||||
|
{
|
||||||
|
Process.Start(userdata as string);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool waitForKeyHit = true;
|
static bool waitForKeyHit = true;
|
||||||
public CoroutineHandle ShowLoading(IEnumerable<object> loader, bool waitKeyHit = true)
|
public CoroutineHandle ShowLoading(IEnumerable<object> loader, bool waitKeyHit = true)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ using Microsoft.Xna.Framework.Input;
|
|||||||
using OpenTK.Audio.OpenAL;
|
using OpenTK.Audio.OpenAL;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
namespace Barotrauma
|
namespace Barotrauma
|
||||||
@@ -80,13 +81,19 @@ namespace Barotrauma
|
|||||||
|
|
||||||
var leftPanel = new GUILayoutGroup(new RectTransform(new Vector2(0.25f, 1.0f), settingsFramePadding.RectTransform, Anchor.TopLeft));
|
var leftPanel = new GUILayoutGroup(new RectTransform(new Vector2(0.25f, 1.0f), settingsFramePadding.RectTransform, Anchor.TopLeft));
|
||||||
|
|
||||||
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), leftPanel.RectTransform),
|
var settingsTitle = new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.05f), leftPanel.RectTransform),
|
||||||
TextManager.Get("Settings"), textAlignment: Alignment.TopLeft, font: GUI.LargeFont)
|
TextManager.Get("Settings"), textAlignment: Alignment.CenterLeft, font: GUI.LargeFont)
|
||||||
{ ForceUpperCase = true };
|
{ ForceUpperCase = true };
|
||||||
|
|
||||||
|
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));
|
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"));
|
new GUITextBlock(new RectTransform(new Vector2(1.0f, 0.045f), generalLayoutGroup.RectTransform), TextManager.Get("ContentPackages"));
|
||||||
var contentPackageList = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.75f), generalLayoutGroup.RectTransform))
|
var contentPackageList = new GUIListBox(new RectTransform(new Vector2(1.0f, 0.75f), generalLayoutGroup.RectTransform))
|
||||||
{
|
{
|
||||||
CanBeFocused = false,
|
CanBeFocused = false,
|
||||||
|
|||||||
Reference in New Issue
Block a user