Prelim support for 50-line mode just need to add config options

This commit is contained in:
mysticbbs 2012-06-18 02:48:43 -04:00
parent 85163c5c02
commit 61a896c343
1 changed files with 19 additions and 13 deletions

View File

@ -47,9 +47,9 @@ Const
mideMaxOpenFiles = 10; mideMaxOpenFiles = 10;
mideMaxLineSize = 254; mideMaxLineSize = 254;
mideTabSpaces = 2; mideTabSpaces = 2;
mideTopY = 1; mideTopY : Byte = 1;
mideBotY = 24; mideBotY : Byte = 24;
mideWinSize = 24; mideWinSize : Byte = 24;
colTextString = 27; { 27 } colTextString = 27; { 27 }
colTextKeyword = 31; { 31 } colTextKeyword = 31; { 31 }
@ -281,7 +281,7 @@ Var
A : Byte; A : Byte;
S : String; S : String;
Begin Begin
For A := 0 to 21 Do Begin For A := 0 to mideWinSize - 3 Do Begin
If CurWin[CurWinNum]^.TopPage + A <= CurWin[CurWinNum]^.TotalLines Then If CurWin[CurWinNum]^.TopPage + A <= CurWin[CurWinNum]^.TotalLines Then
S := CurWin[CurWinNum]^.TextData[CurWin[CurWinNum]^.TopPage + A]^ S := CurWin[CurWinNum]^.TextData[CurWin[CurWinNum]^.TopPage + A]^
Else Else
@ -812,7 +812,7 @@ End;
Procedure ScrollDown; Procedure ScrollDown;
Begin Begin
If CurWin[CurWinNum]^.TopPage + 20 = CurWin[CurWinNum]^.TotalLines Then Exit; If CurWin[CurWinNum]^.TopPage + (mideWinSize - 4) = CurWin[CurWinNum]^.TotalLines Then Exit;
Inc (CurWin[CurWinNum]^.TopPage); Inc (CurWin[CurWinNum]^.TopPage);
@ -994,7 +994,7 @@ Begin
If CurLine = TotalLines Then Exit; If CurLine = TotalLines Then Exit;
Inc (CurLine); Inc (CurLine);
If CurY < 22 Then If CurY < (mideWinSize - 2) Then
Inc (CurY) Inc (CurY)
Else Else
ScrollDown; ScrollDown;
@ -1082,9 +1082,9 @@ Begin
If CurWinNum = 0 Then Exit; If CurWinNum = 0 Then Exit;
With CurWin[CurWinNum]^ Do Begin With CurWin[CurWinNum]^ Do Begin
If CurLine > 20 Then Begin If CurLine > (mideWinSize - 4) Then Begin
Dec (TopPage, 20); Dec (TopPage, (mideWinSize - 4));
Dec (CurLine, 20); Dec (CurLine, (mideWinSize - 4));
If TopPage < 1 Then Begin If TopPage < 1 Then Begin
TopPage := 1; TopPage := 1;
@ -1105,9 +1105,9 @@ Begin
If CurWinNum = 0 Then Exit; If CurWinNum = 0 Then Exit;
With CurWin[CurWinNum]^ Do Begin With CurWin[CurWinNum]^ Do Begin
If CurLine + 20 <= TotalLines Then Begin If CurLine + (mideWinSize - 4) <= TotalLines Then Begin
Inc (TopPage, 20); Inc (TopPage, (mideWinSize - 4));
Inc (CurLine, 20); Inc (CurLine, (mideWinSize - 4));
End Else Begin End Else Begin
TopPage := TotalLines - CurY + 1; TopPage := TotalLines - CurY + 1;
CurLine := TotalLines; CurLine := TotalLines;
@ -1256,6 +1256,7 @@ Begin
Form.HelpX := 16; Form.HelpX := 16;
Form.HelpColor := 113; Form.HelpColor := 113;
Form.HelpSize := 52; Form.HelpSize := 52;
Form.HelpY := mideBotY + 1;
MenuPtr := 0; MenuPtr := 0;
@ -1560,6 +1561,11 @@ Begin
Console.SetWindowTitle('MIDE'); Console.SetWindowTitle('MIDE');
(* FOR 50 line mode development *)
Console.SetScreenSize(50);
mideBotY := 49;
mideWinSize := 49;
FillScreen; FillScreen;
TotalWinNum := 0; TotalWinNum := 0;
@ -1588,7 +1594,7 @@ Begin
BarPos := 2 BarPos := 2
Else Else
If CurLine = TotalLines Then If CurLine = TotalLines Then
BarPos := 23 BarPos := mideBotY - 1
Else Else
BarPos := Round(CurLine / TotalLines * 100) DIV 5 + 3; BarPos := Round(CurLine / TotalLines * 100) DIV 5 + 3;