Update of /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second
In directory slayer.i.sourceforge.net:/tmp/cvs-serv4043
Modified Files:
frmMain.dfm frmMain.pas
Log Message:
kk
now the NPC speech in the output memo is bold and blue and you can choose
what conversation you want to play (if more than 1 are available)
Index: frmMain.dfm
===================================================================
RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.dfm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
Binary files /tmp/cvsAerdBX and /tmp/cvsWoG7QK differ
Index: frmMain.pas
===================================================================
RCS file: /cvsroot/pythianproject/PythianProject/Source/Conversation/Interpreter/second/frmMain.pas,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** frmMain.pas 2000/09/17 11:37:07 1.2
--- frmMain.pas 2000/09/18 19:38:26 1.3
***************
*** 6,10 ****
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, XDOM, conversationObjectsUnit, OleCtrls, HTTSLib_TLB,
! Spin;
type
--- 6,10 ----
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, ExtCtrls, XDOM, conversationObjectsUnit, OleCtrls, HTTSLib_TLB,
! Spin, ComCtrls;
type
***************
*** 14,18 ****
pnlBottom: TPanel;
Label2: TLabel;
- OutMemo: TMemo;
pnlControl: TPanel;
btnStart: TButton;
--- 14,17 ----
***************
*** 31,34 ****
--- 30,35 ----
CheckBox1: TCheckBox;
SpellTimer: TTimer;
+ OutMemo: TRichEdit;
+ Shape1: TShape;
procedure btnStartClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
***************
*** 107,110 ****
--- 108,114 ----
procedure Tfrm_Main.LoadXML;
+ var
+ i: Integer;
+ s: string;
begin
try
***************
*** 120,124 ****
// turn currentXMLDoc into conversation objects
TranslateDOMToConvTree(currentXMLDoc);
! curConv := ConversationEngine.Conversations[0];
end;
--- 124,147 ----
// turn currentXMLDoc into conversation objects
TranslateDOMToConvTree(currentXMLDoc);
! i := 0;
! if ConversationEngine.Conversations.Count > 1 then
! begin
! i := ConversationEngine.Conversations.Count;
! s := InputBox('Conversation', 'Which conv. should be runned (0..' +
! IntToStr(i-1) + '): ', '0');
! try
! i := StrToInt(s);
! if (i < 0) or (i > ConversationEngine.Conversations.Count - 1) then
! raise Exception.Create('Integer value not in range!');
! except
! on E:Exception do
! begin
! i := 0;
! ShowMessage('Bad value (choosing conversation number 0)'+#13#10+E.Message);
! end;
! end;
! end;
!
! curConv := ConversationEngine.Conversations[i];
end;
***************
*** 154,159 ****
procedure Tfrm_Main.DisplayThis;
begin
! OutMemo.Lines.Append(LogLine);
end;
--- 177,199 ----
procedure Tfrm_Main.DisplayThis;
+ var
+ s: string;
begin
! OutMemo.SelLength := 0;
! if curObj is TNPCSpeech then
! begin
! OutMemo.SelAttributes.Color := clNavy;
! OutMemo.SelAttributes.Style := [fsBold, fsUnderline]
! end else
! if curObj is TPlayerOption then
! begin
! OutMemo.SelAttributes.Style := [fsBold];
! end;
! s := LogLine;
! if Trim(s) <> '' then
! OutMemo.Lines.Add(s);
!
! OutMemo.SelAttributes.Style := [];
! OutMemo.SelAttributes.Color := clBlack;
end;
***************
*** 161,165 ****
begin
Result := curObj.ReturnStrRepr;
!
if curObj is TConversation then
Result := 'System: Conversation Data'
--- 201,205 ----
begin
Result := curObj.ReturnStrRepr;
!
if curObj is TConversation then
Result := 'System: Conversation Data'
|