Add a wait time for the rules popup (#5823)
* Create new rules popup * Implement accept and quit buttons * Add rules accept timer Forces the player to read the rules by making them wait. Speed reading the rules took me just under 45 seconds which means it'll take longer than that if someone's reading this for the first time. * Fix info rules header * Change _rulesPopup to local variable
This commit is contained in:
23
Content.Client/Info/RulesControl.xaml.cs
Normal file
23
Content.Client/Info/RulesControl.xaml.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.ResourceManagement;
|
||||
using Robust.Client.UserInterface.Controls;
|
||||
using Robust.Client.UserInterface.XAML;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Localization;
|
||||
|
||||
namespace Content.Client.Info;
|
||||
|
||||
[GenerateTypedNameReferences]
|
||||
public partial class RulesControl : BoxContainer
|
||||
{
|
||||
[Dependency] private readonly IResourceCache _resourceManager = default!;
|
||||
|
||||
public RulesControl()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
|
||||
AddChild(new InfoSection(Loc.GetString("ui-rules-header"),
|
||||
_resourceManager.ContentFileReadAllText($"/Server Info/Rules.txt"), true));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user