Files
RobustToolbox/Robust.Client/UserInterface/UiCommands.cs
T
AcruidandGitHub 2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00

25 lines
733 B
C#

using Robust.Client.State;
using Robust.Shared.Console;
using Robust.Shared.IoC;
using Robust.Shared.Reflection;
namespace Robust.Client.UserInterface
{
class ChangeSceneCommpand : IConsoleCommand
{
public string Command => "scene";
public string Help => "scene <className>";
public string Description => "Immediately changes the UI scene/state.";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var reflection = IoCManager.Resolve<IReflectionManager>();
var type = reflection.LooseGetType(args[0]);
var stateMan = IoCManager.Resolve<IStateManager>();
stateMan.RequestStateChange(type);
}
}
}