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 tabGameplayIndex = (SettingsMenu.Tab)tabCount;
|
||||||
var tabControlsIndex = (SettingsMenu.Tab)tabCount+1;
|
var tabControlsIndex = (SettingsMenu.Tab)tabCount+1;
|
||||||
|
|
||||||
_gameplayContentFrame = CreateNewContentTab(tabGameplayIndex, __instance,
|
_gameplayContentFrame = CreateNewContentTab(tabGameplayIndex, __instance,
|
||||||
"SettingsMenuTab.Mods", "LuaCsForBarotrauma.SettingsMenu.ModGameplayButton");
|
GUIStyle.ComponentStyles.ContainsKey("SettingsMenuTab.LuaCsSettings") ? "SettingsMenuTab.LuaCsSettings" : "SettingsMenuTab.Mods",
|
||||||
|
"LuaCsForBarotrauma.SettingsMenu.ModGameplayButton");
|
||||||
/*_controlsContentFrame = CreateNewContentTab(tabControlsIndex, __instance,
|
/*_controlsContentFrame = CreateNewContentTab(tabControlsIndex, __instance,
|
||||||
"SettingsMenuTab.Controls", "LuaCsForBarotrauma.SettingsMenu.ModControlsButton");
|
"SettingsMenuTab.Controls", "LuaCsForBarotrauma.SettingsMenu.ModControlsButton");
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<contentpackage name="LuaCsForBarotrauma">
|
<contentpackage name="LuaCsForBarotrauma">
|
||||||
<Text file="%ModDir%/Texts/English.xml"/>
|
<Text file="%ModDir%/Texts/English.xml"/>
|
||||||
|
<UIStyle file="%ModDir%/Style.xml" />
|
||||||
<!--<Text file="%ModDir%/Texts/Portuguese.xml"/>-->
|
<!--<Text file="%ModDir%/Texts/Portuguese.xml"/>-->
|
||||||
</contentpackage>
|
</contentpackage>
|
||||||
|
|||||||
@@ -125,7 +125,9 @@ namespace Barotrauma
|
|||||||
}
|
}
|
||||||
|
|
||||||
private ISettingList<string> _csRunPolicy;
|
private ISettingList<string> _csRunPolicy;
|
||||||
|
|
||||||
|
public string CsRunPolicyValue => _csRunPolicy?.Value ?? "Prompt";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Whether usernames are anonymized or show in logs.
|
/// Whether usernames are anonymized or show in logs.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -43,11 +43,31 @@ internal class MainMenuPatch : ISystem, IEventScreenSelected
|
|||||||
{
|
{
|
||||||
if (mainMenuUIAdded) { return; }
|
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
|
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;
|
mainMenuUIAdded = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user