Author Topic: multi-color text  (Read 1020 times)

0 Members and 1 Guest are viewing this topic.

Offline skrX

  • Soldier
  • **
  • Posts: 112
  • x ye.
multi-color text
« on: March 24, 2016, 05:07:39 am »
I would like to present to you the way through which you can write in one line using two different colors.

Code: [Select]
function Line(j: integer): string;
var
 i: integer;
begin
for i := 1 to j do
Result := Result + chr(10) + chr(13);
end;

Usage
Code: [Select]
Player.WriteConsole(Line(1)+'    bbb',$66FF00);
Player.WriteConsole('AAA',$FFFFFF);
Player.WriteConsole(Line(1)+'    ccc',$00FFFF);
Player.WriteConsole('DDD',$66FF00);

Result


If you have any other ways, please share.