Rev 746 | Rev 748 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 746 | Rev 747 | ||
---|---|---|---|
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-14 *) |
6 | (* Revision: 2022-02-16 *) |
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 34... | Line 34... | ||
34 | function QueryVal(var s: string; initX, initY, width, height: integer; |
34 | function QueryVal(var s: string; initX, initY, width, height: integer; |
35 | Title: string; borderStrength: integer): boolean; |
35 | Title: string; borderStrength: integer): boolean; |
36 | procedure ShowMessage(msg: string; title: string; dobeep: boolean); |
36 | procedure ShowMessage(msg: string; title: string; dobeep: boolean); |
37 | procedure CursorOn; |
37 | procedure CursorOn; |
38 | procedure CursorOff; |
38 | procedure CursorOff; |
- | 39 | procedure ResetDefaultDosColors; |
|
39 | 40 | ||
40 | implementation |
41 | implementation |
41 | 42 | ||
42 | uses |
43 | uses |
43 | Crt, Drivers, VtsFuncs; |
44 | Crt, Drivers, VtsFuncs; |
Line 372... | Line 373... | ||
372 | itemIndex := ListCount(items)-1; |
373 | itemIndex := ListCount(items)-1; |
373 | iStartScope := itemIndex - Min(ListHeight,ListCount(items)); |
374 | iStartScope := itemIndex - Min(ListHeight,ListCount(items)); |
374 | iEndScope := itemIndex; |
375 | iEndScope := itemIndex; |
375 | goto doAgain; |
376 | goto doAgain; |
376 | end; |
377 | end; |
- | 378 | (* TODO: Implement PgUp and PgDown keys *) |
|
377 | end; |
379 | end; |
378 | 380 | ||
379 | if sc = #13(*Return*) then |
381 | if sc = #13(*Return*) then |
380 | begin |
382 | begin |
381 | DrawSelectionList := itemIndex; |
383 | DrawSelectionList := itemIndex; |
Line 593... | Line 595... | ||
593 | mov ah,1 (* Set text-mode cursor shape *) |
595 | mov ah,1 (* Set text-mode cursor shape *) |
594 | mov cx,2607h (* hide cursor (Start>End) *) |
596 | mov cx,2607h (* hide cursor (Start>End) *) |
595 | int 10h |
597 | int 10h |
596 | end; |
598 | end; |
597 | 599 | ||
- | 600 | procedure ResetDefaultDosColors; |
|
- | 601 | begin |
|
- | 602 | TextBackground(Black); |
|
- | 603 | TextColor(LightGray); |
|
- | 604 | end; |
|
- | 605 | ||
598 | end. |
606 | end. |