Windows input change and slight MCI code change that no one will ever find but me.

This commit is contained in:
mysticbbs 2013-05-23 20:47:55 -04:00
parent d5c5fe822d
commit 5c3c7c4730
1 changed files with 48 additions and 9 deletions

View File

@ -452,7 +452,22 @@ Begin
If Code = '21' Then BufAddStr(Pipe2Ansi(21)) Else If Code = '21' Then BufAddStr(Pipe2Ansi(21)) Else
If Code = '22' Then BufAddStr(Pipe2Ansi(22)) Else If Code = '22' Then BufAddStr(Pipe2Ansi(22)) Else
If Code = '23' Then BufAddStr(Pipe2Ansi(23)) Else If Code = '23' Then BufAddStr(Pipe2Ansi(23)) Else
If Code = '[X' Then Begin
Inc (Count, 2);
Code := Copy(Str, Count + 1, 2);
AnsiMoveX(strS2I(Code));
End Else
If Code = '[Y' Then Begin
Inc (Count, 2);
Code := Copy(Str, Count + 1, 2);
AnsiMoveY(strS2I(Code));
End Else
BufAddStr(Str[Count] + Code); BufAddStr(Str[Count] + Code);
Inc (Count, 2); Inc (Count, 2);
End Else End Else
BufAddChar(Str[Count]); BufAddChar(Str[Count]);
@ -1425,7 +1440,7 @@ Begin
Handles[0] := Input.ConIn; Handles[0] := Input.ConIn;
If Not TBBSCore(Core).LocalMode Then Begin If Not TBBSCore(Core).LocalMode Then Begin
If TBBSCore(Core).Client.FInBufPos < TBBSCore(Core).Client.FInBufEnd Then If TBBSCore(Core).Client.FInBufPos <= TBBSCore(Core).Client.FInBufEnd Then
InType := 2 InType := 2
Else Begin Else Begin
Handles[1] := SocketEvent; Handles[1] := SocketEvent;
@ -1901,6 +1916,8 @@ Var
End; End;
Begin Begin
PurgeInputBuffer;
If UseInLimit Then Begin If UseInLimit Then Begin
Field := InLimit; Field := InLimit;
UseInLimit := False; UseInLimit := False;
@ -1956,8 +1973,6 @@ Begin
PWrite (Copy(Str, Junk, Field)); PWrite (Copy(Str, Junk, Field));
PurgeInputBuffer;
Repeat Repeat
Ch := GetKey; Ch := GetKey;
@ -1968,6 +1983,7 @@ Begin
StrPos := 1; StrPos := 1;
Junk := 1; Junk := 1;
CurPos := 1; CurPos := 1;
ReDraw; ReDraw;
End; End;
#72 : If (BackPos < mysMaxInputHistory) And (BackPos < InputPos) Then Begin #72 : If (BackPos < mysMaxInputHistory) And (BackPos < InputPos) Then Begin
@ -1978,28 +1994,40 @@ Begin
Str := InputData[BackPos]; Str := InputData[BackPos];
StrPos := Length(Str) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
ReDraw; ReDraw;
End; End;
#75 : If StrPos > 1 Then Begin #75 : If StrPos > 1 Then Begin
If CurPos = 1 Then ScrollLeft; If CurPos = 1 Then ScrollLeft;
Dec (StrPos); Dec (StrPos);
Dec (CurPos); Dec (CurPos);
If CurPos < 1 then CurPos := 1; If CurPos < 1 then CurPos := 1;
AnsiMoveX (Screen.CursorX - 1); AnsiMoveX (Screen.CursorX - 1);
End; End;
#77 : If StrPos < Length(Str) + 1 Then Begin #77 : If StrPos < Length(Str) + 1 Then Begin
If (CurPos = Field) and (StrPos < Length(Str)) Then ScrollRight; If (CurPos = Field) and (StrPos < Length(Str)) Then
ScrollRight;
Inc (CurPos); Inc (CurPos);
Inc (StrPos); Inc (StrPos);
AnsiMoveX (Screen.CursorX + 1); AnsiMoveX (Screen.CursorX + 1);
End; End;
#79 : Begin #79 : Begin
StrPos := Length(Str) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
ReDraw; ReDraw;
End; End;
#80 : If (BackPos > 0) Then Begin #80 : If (BackPos > 0) Then Begin
@ -2012,12 +2040,16 @@ Begin
StrPos := Length(Str) + 1; StrPos := Length(Str) + 1;
Junk := StrPos - Field; Junk := StrPos - Field;
If Junk < 1 Then Junk := 1; If Junk < 1 Then Junk := 1;
CurPos := StrPos - Junk + 1; CurPos := StrPos - Junk + 1;
ReDraw; ReDraw;
End; End;
#83 : If (StrPos <= Length(Str)) and (Length(Str) > 0) Then Begin #83 : If (StrPos <= Length(Str)) and (Length(Str) > 0) Then Begin
Delete(Str, StrPos, 1); Delete(Str, StrPos, 1);
ReDrawPart; ReDrawPart;
End; End;
End; End;
@ -2039,13 +2071,20 @@ Begin
ScrollLeft ScrollLeft
Else Else
If StrPos = Length(Str) + 1 Then Begin If StrPos = Length(Str) + 1 Then Begin
If UseInField Then AnsiColor(TBBSCore(Core).Theme.FieldColor2); If UseInField Then
AnsiColor(TBBSCore(Core).Theme.FieldColor2);
BufAddStr (#8 + FieldCh + #8); BufAddStr (#8 + FieldCh + #8);
If UseInField Then AnsiColor(TBBSCore(Core).Theme.FieldColor1);
If UseInField Then
AnsiColor(TBBSCore(Core).Theme.FieldColor1);
Dec (CurPos); Dec (CurPos);
End Else Begin End Else Begin
BufAddChar (#8); BufAddChar (#8);
Dec (CurPos); Dec (CurPos);
ReDrawPart; ReDrawPart;
End; End;
End; End;