New icon for settings and make the top left text more user friendly
This commit is contained in:
@@ -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