|
@@ -33,7 +33,7 @@ __fastcall TForm1::TForm1(TComponent* Owner)
|
|
void __fastcall TForm1::OnHelloCommand(const TGLConsoleCommand *ConsoleCommand,
|
|
void __fastcall TForm1::OnHelloCommand(const TGLConsoleCommand *ConsoleCommand,
|
|
const TGLCustomConsole *Console, TGLUserInputCommand &Command)
|
|
const TGLCustomConsole *Console, TGLUserInputCommand &Command)
|
|
{
|
|
{
|
|
- Console->AddLine();
|
|
|
|
|
|
+ /// Console->AddLine();
|
|
}
|
|
}
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------
|
|
@@ -50,7 +50,7 @@ void __fastcall TForm1::OnCommand(const TGLConsoleCommand *ConsoleCommand,
|
|
{
|
|
{
|
|
for (i = 1; i< (Command.CommandCount - 1); i++)
|
|
for (i = 1; i< (Command.CommandCount - 1); i++)
|
|
Str = Str + Command.Strings[i];
|
|
Str = Str + Command.Strings[i];
|
|
- Console->AddLine("You just typed: " + Str);
|
|
|
|
|
|
+/// Console->AddLine("You just typed: " + Str); // todo
|
|
Command.UnknownCommand = false;
|
|
Command.UnknownCommand = false;
|
|
}
|
|
}
|
|
else
|
|
else
|
|
@@ -85,13 +85,13 @@ void __fastcall TForm1::FormCreate(TObject *Sender)
|
|
|
|
|
|
//two ways of processing commands:
|
|
//two ways of processing commands:
|
|
//1) manual
|
|
//1) manual
|
|
- GLConsole1->OnCommandIssued = OnCommand;
|
|
|
|
|
|
+ /// GLConsole1->OnCommandIssued = OnCommand; // todo
|
|
//2)using built-in objects (prefered)
|
|
//2)using built-in objects (prefered)
|
|
GLConsole1->Commands->Add()->CommandName = "hello";
|
|
GLConsole1->Commands->Add()->CommandName = "hello";
|
|
GLConsole1->Commands->Add()->ShortHelp = "Says hi to you too";
|
|
GLConsole1->Commands->Add()->ShortHelp = "Says hi to you too";
|
|
GLConsole1->Commands->Add()->LongHelp->Add("Well, the console really does say - Hi, dude - to you, because");
|
|
GLConsole1->Commands->Add()->LongHelp->Add("Well, the console really does say - Hi, dude - to you, because");
|
|
GLConsole1->Commands->Add()->LongHelp->Add("it is roude not to greet someone, when he says - hello - to you ;)");
|
|
GLConsole1->Commands->Add()->LongHelp->Add("it is roude not to greet someone, when he says - hello - to you ;)");
|
|
- GLConsole1->Commands->Add()->OnCommand = OnHelloCommand;
|
|
|
|
|
|
+/// GLConsole1->Commands->Add()->OnCommand = OnHelloCommand; // todo
|
|
|
|
|
|
//register additional commands to enable auto-completion function
|
|
//register additional commands to enable auto-completion function
|
|
GLConsole1->AdditionalCommands->Add("echo");
|
|
GLConsole1->AdditionalCommands->Add("echo");
|