Changed Label to RichtTextLabel for scrolling compatabillity

This commit is contained in:
2026-04-04 20:54:52 +02:00
parent 20158802dd
commit 22108bb58d
9 changed files with 244 additions and 41 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
using System;
using YourProject.Commands;
using TextRPG.Commands;
namespace YourProject.Commands
namespace TextRPG.Commands
{
public class ClearCommand : Command
{
+1 -1
View File
@@ -1,6 +1,6 @@
using System;
namespace YourProject.Commands // Add namespace
namespace TextRPG.Commands
{
public abstract class Command
{
+4 -2
View File
@@ -1,9 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using YourProject.Commands;
using TextRPG.Commands;
namespace YourProject.Commands
namespace TextRPG.Commands
{
public static class ConsoleManager
{
@@ -14,6 +14,8 @@ namespace YourProject.Commands
// Register all commands
RegisterCommand(new HelpCommand());
RegisterCommand(new ClearCommand());
RegisterCommand(new TimeCommand());
}
public static void RegisterCommand(Command command)
+2 -2
View File
@@ -1,7 +1,7 @@
using System;
using YourProject.Commands; // Reference the namespace
using TextRPG.Commands;
namespace YourProject.Commands
namespace TextRPG.Commands
{
public class HelpCommand : Command
{
+18
View File
@@ -0,0 +1,18 @@
using System;
using TextRPG.Commands;
namespace TextRPG.Commands
{
public class TimeCommand : Command
{
public override string Name => "time";
public override string Description => "Outputs the current time";
public override string Usage => "time";
public override void Execute(string[] args, Action<string> outputCallback)
{
// Send a special marker that the console UI will recognize
outputCallback("12:23");
}
}
}