From 23460e1282c62d8ed92add0775496b7dcbdf0f3d Mon Sep 17 00:00:00 2001 From: naru Date: Sun, 20 Apr 2003 11:05:48 +0000 Subject: [PATCH] Fix: Internal scope flag not changed in synchronized session Fix: \n tag does not break the line Keeps window position --- bottleclient/TalkShowFrame.pas | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/bottleclient/TalkShowFrame.pas b/bottleclient/TalkShowFrame.pas index a4fba76..fb5327f 100644 --- a/bottleclient/TalkShowFrame.pas +++ b/bottleclient/TalkShowFrame.pas @@ -26,6 +26,7 @@ type Sur0, Sur1: integer; Talk: String): integer; function DrawSingleImage(X, Y, Surface: integer; var Height: integer): integer; + function DrawSeparateLine(VertPos: integer): integer; public { Public éŒ¾ } property SsParser: TSsParser read FSsParser write SetSsParser; @@ -102,13 +103,15 @@ begin // for i := 0 to FSsParser.Count-1 do begin - if (FSsParser[i] = '\h') and UnyuTalking and not InSync then + if (FSsParser[i] = '\h') and UnyuTalking then begin - TalkEnd; + if not InSync then + TalkEnd; UnyuTalking := false; - end else if (FSsParser[i] = '\u') and not UnyuTalking and not InSync then + end else if (FSsParser[i] = '\u') and not UnyuTalking then begin - TalkEnd; + if not InSync then + TalkEnd; UnyuTalking := true; end else if FSsParser[i] = '\_s' then begin @@ -138,9 +141,13 @@ begin sur1 := sur else sur0 := sur; - end else if FSsParser.Match(FSsParser[i], '\n') > 2 then + end else if FSsParser.Match(FSsParser[i], '\n') >= 2 then begin Talk := Talk + #13#10; + end else if FSsParser[i] = '\c' then + begin + TalkEnd; + y := y + DrawSeparateLine(y); end else if FSsParser.MarkUpType[i] in [mtStr, mtMeta] then begin Talk := Talk + FSsParser[i]; @@ -235,4 +242,16 @@ begin PaintBoxPaint(self); end; +function TfrmTalkShow.DrawSeparateLine(VertPos: integer): integer; +begin + with PaintBox.Canvas do + begin + Pen.Color := Pref.TalkColorH; + Pen.Mode := pmCopy; + MoveTo(5, VertPos); + LineTo(PaintBox.Width-5, VertPos); + Result := 4; + end; +end; + end. -- 2.11.0