New icon for settings and make the top left text more user friendly
This commit is contained in:
@@ -45,8 +45,9 @@ public class SettingsMenuSystem : ISettingsMenuSystem
|
||||
var tabGameplayIndex = (SettingsMenu.Tab)tabCount;
|
||||
var tabControlsIndex = (SettingsMenu.Tab)tabCount+1;
|
||||
|
||||
_gameplayContentFrame = CreateNewContentTab(tabGameplayIndex, __instance,
|
||||
"SettingsMenuTab.Mods", "LuaCsForBarotrauma.SettingsMenu.ModGameplayButton");
|
||||
_gameplayContentFrame = CreateNewContentTab(tabGameplayIndex, __instance,
|
||||
GUIStyle.ComponentStyles.ContainsKey("SettingsMenuTab.LuaCsSettings") ? "SettingsMenuTab.LuaCsSettings" : "SettingsMenuTab.Mods",
|
||||
"LuaCsForBarotrauma.SettingsMenu.ModGameplayButton");
|
||||
/*_controlsContentFrame = CreateNewContentTab(tabControlsIndex, __instance,
|
||||
"SettingsMenuTab.Controls", "LuaCsForBarotrauma.SettingsMenu.ModControlsButton");
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<contentpackage name="LuaCsForBarotrauma">
|
||||
<Text file="%ModDir%/Texts/English.xml"/>
|
||||
<UIStyle file="%ModDir%/Style.xml" />
|
||||
<!--<Text file="%ModDir%/Texts/Portuguese.xml"/>-->
|
||||
</contentpackage>
|
||||
|
||||
@@ -125,7 +125,9 @@ namespace Barotrauma
|
||||
}
|
||||
|
||||
private ISettingList<string> _csRunPolicy;
|
||||
|
||||
|
||||
public string CsRunPolicyValue => _csRunPolicy?.Value ?? "Prompt";
|
||||
|
||||
/// <summary>
|
||||
/// Whether usernames are anonymized or show in logs.
|
||||
/// </summary>
|
||||
|
||||
@@ -43,11 +43,31 @@ internal class MainMenuPatch : ISystem, IEventScreenSelected
|
||||
{
|
||||
if (mainMenuUIAdded) { return; }
|
||||
|
||||
new GUITextBlock(new RectTransform(new Point(300, 30), screen.Frame.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(10, 10) }, $"Using LuaCsForBarotrauma revision {AssemblyInfo.GitRevision}", Color.Red)
|
||||
var textBlock = new GUITextBlock(new RectTransform(new Point(300, 30), screen.Frame.RectTransform, Anchor.TopLeft) { AbsoluteOffset = new Point(10, 10) }, "", Color.Red)
|
||||
{
|
||||
IgnoreLayoutGroups = false
|
||||
};
|
||||
|
||||
textBlock.OnAddedToGUIUpdateList = (GUIComponent component) =>
|
||||
{
|
||||
string mode = LuaCsSetup.Instance.CsRunPolicyValue;
|
||||
|
||||
if (mode is "Prompt")
|
||||
{
|
||||
mode = "Enabled (prompt mode)";
|
||||
}
|
||||
else if (mode is "Enabled")
|
||||
{
|
||||
mode = "Always enabled";
|
||||
}
|
||||
else
|
||||
{
|
||||
mode = "Disabled";
|
||||
}
|
||||
|
||||
textBlock.Text = $"LuaCsForBarotrauma active (revision {AssemblyInfo.GitRevision}), csharp is currently {mode}\nNew settings available in the game settings menu.";
|
||||
};
|
||||
|
||||
mainMenuUIAdded = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user