Add tryout command for TUI onboarding

Add a new /tryout command as an extensible entry point for recommended feature trials, with /tryout tui as the first action. The command updates [Console.General] ConsoleMode to "tui", writes the config back immediately, and explains both how to revert the change and that a restart is required.

Also show a startup recommendation in classic console mode when stdin is interactive, so users can discover the TUI experience without manually editing MinecraftClient.ini. All user-facing text is routed through the translation resources.
This commit is contained in:
BruceChen 2026-03-29 01:31:31 +08:00
parent 0d34d5e33d
commit 83f14a64f8
4 changed files with 150 additions and 1 deletions

View file

@ -193,6 +193,7 @@ namespace MinecraftClient
if (!ProcessStartupState(startupState))
return;
MaybePrintClassicModeTuiRecommendation();
RunStartupSequence(args);
}
@ -247,6 +248,19 @@ namespace MinecraftClient
return true;
}
private static void MaybePrintClassicModeTuiRecommendation()
{
if (ConsoleIO.BasicIO
|| Config.Console.General.ConsoleMode != ConsoleModeType.classic
|| Console.IsInputRedirected)
{
return;
}
char cmdChar = Config.Main.Advanced.InternalCmdChar.ToChar();
ConsoleIO.WriteLineFormatted("§8" + string.Format(Translations.mcc_console_mode_tui_recommendation, cmdChar));
}
/// <summary>
/// Handles a failed config load by prompting the user to fix or regenerate the config file.
/// </summary>