1
1
{ ***************************************************************************
2
2
3
- Copyright (c) 2016-2021 Kike Pérez
3
+ Copyright (c) 2016-2024 Kike Pérez
4
4
5
5
Unit : Quick.Console
6
6
Description : Console output with colors and optional file log
7
7
Author : Kike Pérez
8
8
Version : 1.9
9
9
Created : 10/05/2017
10
- Modified : 05/08/2021
10
+ Modified : 20/01/2024
11
11
12
12
This file is part of QuickLib: https://github.com/exilon/QuickLib
13
13
@@ -172,7 +172,7 @@ TConsoleMenu = class
172
172
procedure coutSL (const cMsg : string; cColor : TConsoleColor);
173
173
procedure cout (const cMsg : string; params : array of const ; cEventType : TLogEventType); overload;
174
174
procedure coutXY (x,y : Integer; const cMsg : string; cEventType : TLogEventType); overload;
175
- procedure coutXY (x,y : Integer; const cMsg : string; cColor : TConsoleColor); overload;
175
+ procedure coutXY (x,y : Integer; const cMsg : string; cColor : TConsoleColor; cClearLineBefore : Boolean = False ); overload;
176
176
procedure coutXY (x,y : Integer; const cMsg : string; params : array of const ; cEventType : TLogEventType); overload;
177
177
procedure coutXY (x,y : Integer; const cMsg : string; params : array of const ; cColor : TConsoleColor); overload;
178
178
procedure coutTL (const cMsg : string; cEventType : TLogEventType); overload;
@@ -480,7 +480,7 @@ procedure coutXY(x,y : Integer; const cMsg : string; cEventType : TLogEventType)
480
480
end ;
481
481
end ;
482
482
483
- procedure coutXY (x,y : Integer; const cMsg : string; cColor : TConsoleColor); overload;
483
+ procedure coutXY (x,y : Integer; const cMsg : string; cColor : TConsoleColor; cClearLineBefore : Boolean = False ); overload;
484
484
var
485
485
NewCoord : TCoord;
486
486
LastCoord : TCoord;
@@ -496,7 +496,7 @@ procedure coutXY(x,y : Integer; const cMsg : string; cColor : TConsoleColor); ov
496
496
{ $ENDIF}
497
497
NewCoord.X := x;
498
498
NewCoord.Y := y;
499
- ClearLine(Y);
499
+ if cClearLineBefore then ClearLine(Y);
500
500
SetCursorPos(NewCoord);
501
501
try
502
502
cout(cMsg,cColor);
0 commit comments