Subversion Repositories oidplus

Rev

Rev 733 | Rev 738 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 733 Rev 735
Line 1... Line 1...
1
unit VTSCUI;
1
unit VTSCUI;
2
 
2
 
3
(************************************************)
3
(************************************************)
4
(* VTSCUI.PAS                                   *)
4
(* VTSCUI.PAS                                   *)
5
(* Author:   Daniel Marschall                   *)
5
(* Author:   Daniel Marschall                   *)
6
(* Revision: 2022-02-12                         *)
6
(* Revision: 2022-02-14                         *)
7
(* License:  Apache 2.0                         *)
7
(* License:  Apache 2.0                         *)
8
(* This file contains:                          *)
8
(* This file contains:                          *)
9
(* - ViaThinkSoft CUI (Console User Interface)  *)
9
(* - ViaThinkSoft CUI (Console User Interface)  *)
10
(************************************************)
10
(************************************************)
11
 
11
 
Line 203... Line 203...
203
var
203
var
204
  i: integer;
204
  i: integer;
205
  itemIndex: integer;
205
  itemIndex: integer;
206
  sc: char;
206
  sc: char;
207
  iStartScope, iEndScope: integer;
207
  iStartScope, iEndScope: integer;
-
 
208
  sTmp: string;
208
label
209
label
209
  doAgain;
210
  doAgain;
210
begin
211
begin
211
  if borderStrength = 1 then
212
  if borderStrength = 1 then
212
  begin
213
  begin
Line 298... Line 299...
298
    end;
299
    end;
299
    GotoXY(x,y+i-iStartScope);
300
    GotoXY(x,y+i-iStartScope);
300
    if i > ListCount(items)-1 then
301
    if i > ListCount(items)-1 then
301
      Write(FillRight('', ListWidth, ' '))
302
      Write(FillRight('', ListWidth, ' '))
302
    else
303
    else
-
 
304
    begin
-
 
305
      sTmp := ListGetElement(items, i);
-
 
306
      if Length(sTmp) > ListWidth then
-
 
307
      begin
-
 
308
        (* Cut too long line *)
-
 
309
        sTmp := Copy(sTmp, 1, ListWidth-3) + '...';
-
 
310
      end;
303
      Write(FillRight(ListGetElement(items, i), ListWidth, ' '));
311
      Write(FillRight(sTmp, ListWidth, ' '));
-
 
312
    end;
304
    TextColor(White);
313
    TextColor(White);
305
    TextBackground(Black);
314
    TextBackground(Black);
306
  end;
315
  end;
307
 
316
 
308
  repeat
317
  repeat