Options to view history and whatsnew, both which highlight major and alpha releases in different colors
This commit is contained in:
parent
5672ada68a
commit
cee19d6898
|
@ -247,13 +247,15 @@ Procedure ViewTextFile (FN : String);
|
||||||
Const
|
Const
|
||||||
WinSize = 12;
|
WinSize = 12;
|
||||||
Var
|
Var
|
||||||
T : Text;
|
T : Text;
|
||||||
Count : Word;
|
Count : Word;
|
||||||
A : Word;
|
A : Word;
|
||||||
Line : Integer;
|
Line : Integer;
|
||||||
Per : LongInt;
|
Per : LongInt;
|
||||||
Per10 : Byte;
|
Per10 : Byte;
|
||||||
BarPos : Byte = 0;
|
BarPos : Integer = -1;
|
||||||
|
LineColor : Byte;
|
||||||
|
LineTemp : Byte;
|
||||||
Begin
|
Begin
|
||||||
Assign (T, FN);
|
Assign (T, FN);
|
||||||
{$I-} Reset(T); {$I+}
|
{$I-} Reset(T); {$I+}
|
||||||
|
@ -310,8 +312,18 @@ Begin
|
||||||
BarPos := Per10;
|
BarPos := Per10;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
For A := 0 to WinSize Do
|
For A := 0 to WinSize Do Begin
|
||||||
Screen.WriteXY (1, A + 11, 7, strPadR(Txt[Line + A]^, 80, ' '));
|
If Copy(Txt[Line + A]^, 4, 6) = '<ALPHA' Then
|
||||||
|
LineColor := 9
|
||||||
|
Else Begin
|
||||||
|
If Copy(Txt[Line + A]^, 1, 21) = '| Mystic BBS RELEASED' Then
|
||||||
|
LineColor := 9
|
||||||
|
Else
|
||||||
|
LineColor := 7;
|
||||||
|
End;
|
||||||
|
|
||||||
|
Screen.WriteXY (1, A + 11, LineColor, strPadR(Txt[Line + A]^, 80, ' '));
|
||||||
|
End;
|
||||||
|
|
||||||
Case Keys.ReadKey of
|
Case Keys.ReadKey of
|
||||||
#00 : Case Keys.ReadKey of
|
#00 : Case Keys.ReadKey of
|
||||||
|
@ -546,11 +558,13 @@ Var
|
||||||
Var
|
Var
|
||||||
A : Byte;
|
A : Byte;
|
||||||
Begin
|
Begin
|
||||||
A := Pos(Config.SystemPath, NewStr);
|
A := Pos(Config.SystemPath, NewStr);
|
||||||
If A > 0 Then Begin
|
|
||||||
Delete (NewStr, A, Length(Config.SystemPath));
|
If A > 0 Then Begin
|
||||||
|
Delete (NewStr, A, Length(Config.SystemPath));
|
||||||
Insert (Str, NewStr, A);
|
Insert (Str, NewStr, A);
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Change := NewStr;
|
Change := NewStr;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
|
@ -649,9 +663,10 @@ Begin
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Const
|
Const
|
||||||
Items : Array[1..3] of String[32] = (
|
Items : Array[1..4] of String[32] = (
|
||||||
' % INSTALL MYSTIC BBS ',
|
' % INSTALL MYSTIC BBS ',
|
||||||
' % READ WHATS NEW ',
|
' % READ WHATS NEW ',
|
||||||
|
' % READ FULL HISTORY ',
|
||||||
' % ABORT INSTALLATION '
|
' % ABORT INSTALLATION '
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -667,7 +682,7 @@ Begin
|
||||||
Pos := 2;
|
Pos := 2;
|
||||||
|
|
||||||
Repeat
|
Repeat
|
||||||
For A := 1 to 3 Do
|
For A := 1 to 4 Do
|
||||||
If A = Pos Then
|
If A = Pos Then
|
||||||
Screen.WriteXY (25, 16 + A, 15 + 3 * 16, Items[A])
|
Screen.WriteXY (25, 16 + A, 15 + 3 * 16, Items[A])
|
||||||
Else
|
Else
|
||||||
|
@ -676,7 +691,7 @@ Begin
|
||||||
Case Keys.ReadKey of
|
Case Keys.ReadKey of
|
||||||
#00 : Case Keys.ReadKey of
|
#00 : Case Keys.ReadKey of
|
||||||
#72 : If Pos > 1 Then Dec(Pos);
|
#72 : If Pos > 1 Then Dec(Pos);
|
||||||
#80 : If Pos < 3 THen Inc(Pos);
|
#80 : If Pos < 4 THen Inc(Pos);
|
||||||
End;
|
End;
|
||||||
#13 : Case Pos of
|
#13 : Case Pos of
|
||||||
1 : Begin
|
1 : Begin
|
||||||
|
@ -689,7 +704,11 @@ Begin
|
||||||
ViewTextFile('whatsnew.txt');
|
ViewTextFile('whatsnew.txt');
|
||||||
DrawMainMenu;
|
DrawMainMenu;
|
||||||
End;
|
End;
|
||||||
3 : Break;
|
3 : Begin
|
||||||
|
ViewTextFile('history.txt');
|
||||||
|
DrawMainMenu;
|
||||||
|
End;
|
||||||
|
4 : Break;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
#27 : Break;
|
#27 : Break;
|
||||||
|
|
Loading…
Reference in New Issue