mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-13 22:04:36 -06:00
Functions4U_Demo: New functions to handle console text
git-svn-id: svn://ultimatepp.org/upp/trunk@14792 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
73ecddafec
commit
d4c6253ec6
1 changed files with 19 additions and 0 deletions
|
|
@ -129,7 +129,26 @@ void DistanceDemo() {
|
|||
Puts(Format("Distance between 'hello' and 'yellow' is %d", DamerauLevenshteinDistance("hello", "yellow")));
|
||||
}
|
||||
|
||||
void MiscellaneousDemos() {
|
||||
SetConsoleColor(CONSOLE_COLOR::LTRED);
|
||||
Cout() << "This message is in red\n";
|
||||
SetConsoleColor(CONSOLE_COLOR::LTYELLOW);
|
||||
Cout() << "This message is in yellow\n";
|
||||
SetConsoleColor(CONSOLE_COLOR::RESET);
|
||||
Cout() << "This message is in normal color\n";
|
||||
|
||||
Cout() << "Next text messages (printf, Cout()) will be disabled\n";
|
||||
ConsoleOutputDisable(true);
|
||||
Cout() << "Text with Cout()\n";
|
||||
printf("Text with printf()\n");
|
||||
ConsoleOutputDisable(false);
|
||||
Cout() << "Text messages are now enabled\n";
|
||||
}
|
||||
|
||||
void Test() {
|
||||
Puts("Miscellaneous demos");
|
||||
MiscellaneousDemos();
|
||||
|
||||
Puts("Files demo");
|
||||
FilesDemo();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue