Subversion Repositories oidplus

Rev

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

Rev 748 Rev 758
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-19                         *)
6
(* Revision: 2022-02-27                         *)
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 363... Line 363...
363
        goto doAgain;
363
        goto doAgain;
364
      end
364
      end
365
      else if sc = #$47(*POS1*) then
365
      else if sc = #$47(*POS1*) then
366
      begin
366
      begin
367
        itemIndex := 0;
367
        itemIndex := 0;
368
        iStartScope := 0;
368
        iStartScope := itemIndex;
369
        iEndScope := iStartScope + ListHeight;
369
        iEndScope := iStartScope + ListHeight;
370
        goto doAgain;
370
        goto doAgain;
371
      end
371
      end
372
      else if sc = #$4F(*END*) then
372
      else if sc = #$4F(*END*) then
373
      begin
373
      begin
374
        itemIndex := ListCount(items)-1;
374
        itemIndex := ListCount(items)-1;
375
        iStartScope := itemIndex - Min(ListHeight,ListCount(items));
375
        iStartScope := itemIndex - Min(ListHeight,ListCount(items));
376
        iEndScope := itemIndex;
376
        iEndScope := itemIndex;
377
        goto doAgain;
377
        goto doAgain;
-
 
378
      end
-
 
379
      else if sc = #$49(*PgUp*) then
-
 
380
      begin
-
 
381
        Dec(itemIndex, ListHeight);
-
 
382
        if itemIndex < 0 then
-
 
383
          itemIndex := 0;
-
 
384
        iStartScope := itemIndex;
-
 
385
        iEndScope := itemIndex + ListHeight;
-
 
386
        goto doAgain;
-
 
387
      end
-
 
388
      else if sc = #$51(*PgDown*) then
-
 
389
      begin
-
 
390
        Inc(itemIndex, ListHeight);
-
 
391
        if itemIndex > ListCount(items)-1 then
-
 
392
          itemIndex := ListCount(items)-1;
-
 
393
        iStartScope := itemIndex - Min(ListHeight,ListCount(items));
-
 
394
        iEndScope := itemIndex;
-
 
395
        goto doAgain;
378
      end;
396
      end;
379
      (* TODO: Implement PgUp and PgDown keys *)
-
 
380
    end;
397
    end;
381
 
398
 
382
    if sc = #13(*Return*) then
399
    if sc = #13(*Return*) then
383
    begin
400
    begin
384
      DrawSelectionList := itemIndex;
401
      DrawSelectionList := itemIndex;