diff --git a/applications/fpchess/chessmodules.pas b/applications/fpchess/chessmodules.pas index 9e340a38f..57f4e838f 100644 --- a/applications/fpchess/chessmodules.pas +++ b/applications/fpchess/chessmodules.pas @@ -17,7 +17,8 @@ type TChessModule = class public Kind: TChessModuleKind; - Description: string; + Name, SelectionDescription, PlayingDescription: string; + constructor Create; virtual; procedure CreateUserInterface(); virtual; abstract; procedure ShowUserInterface(AParent: TWinControl); virtual; abstract; procedure HideUserInterface(); virtual; abstract; @@ -71,7 +72,7 @@ begin begin lModule := TChessModule(gChessModules.Items[i]); if lModule <> nil then - AList.Add(lModule.Description); + AList.Add(lModule.SelectionDescription); end; end; @@ -94,6 +95,11 @@ end; { TChessModule } +constructor TChessModule.Create; +begin + +end; + function TChessModule.IsMovingAllowedNow: Boolean; begin Result := not (vChessGame.IsWhitePlayerTurn xor vChessGame.FirstPlayerIsWhite); diff --git a/applications/fpchess/engines/kcchess/mod_kcchess.pas b/applications/fpchess/engines/kcchess/mod_kcchess.pas index 38f28a83e..af7079a04 100644 --- a/applications/fpchess/engines/kcchess/mod_kcchess.pas +++ b/applications/fpchess/engines/kcchess/mod_kcchess.pas @@ -140,7 +140,7 @@ type function FPChessPieceToKCChessImage(APos: TPoint): PieceImageType; function FPChessPieceToKCChessColor(APos: TPoint): PieceColorType; public - constructor Create(); + constructor Create(); override; procedure CreateUserInterface(); override; procedure ShowUserInterface(AParent: TWinControl); override; procedure HideUserInterface(); override; @@ -217,7 +217,9 @@ constructor TKCChessModule.Create; begin inherited Create; - Description := 'Play against the computer - KCChess Engine'; + Name := 'mod_kcchess.pas'; + SelectionDescription := 'Play against the computer - KCChess Engine'; + PlayingDescription := 'Playing against the computer - KCChess Engine'; Kind := cmkAgainstComputer; end; diff --git a/applications/fpchess/mainform.lfm b/applications/fpchess/mainform.lfm index acd87d5ae..2867190ec 100644 --- a/applications/fpchess/mainform.lfm +++ b/applications/fpchess/mainform.lfm @@ -4,7 +4,7 @@ object formChess: TformChess Top = 123 Width = 360 ActiveControl = notebookMain - Caption = 'FP Chess 0.1' + Caption = 'FP Chess 1.0' ClientHeight = 500 ClientWidth = 360 OnCreate = FormCreate @@ -28,7 +28,7 @@ object formChess: TformChess Width = 360 Alignment = taCenter AutoSize = False - Caption = 'Welcome to FP Chess 0.1' + Caption = 'Welcome to FP Chess 1.0' Font.Height = -19 ParentColor = False ParentFont = False @@ -174,7 +174,7 @@ object formChess: TformChess object labelPos: TLabel Left = 8 Height = 18 - Top = 392 + Top = 376 Width = 54 Caption = 'labelPos' ParentColor = False @@ -206,7 +206,7 @@ object formChess: TformChess Left = 176 Height = 30 Top = 8 - Width = 75 + Width = 88 Caption = 'Resign' TabOrder = 1 end @@ -223,15 +223,23 @@ object formChess: TformChess Left = 80 Height = 30 Top = 8 - Width = 75 + Width = 88 Caption = 'New Game' OnClick = btnGameNewGameClick TabOrder = 3 end + object labelMode: TLabel + Left = 8 + Height = 18 + Top = 392 + Width = 66 + Caption = 'labelMode' + ParentColor = False + end end object pageWebservice: TPage - ClientWidth = 2880 - ClientHeight = 3464 + ClientWidth = 5760 + ClientHeight = 6928 object Label8: TLabel Left = 0 Height = 32 diff --git a/applications/fpchess/mainform.pas b/applications/fpchess/mainform.pas index 88a587904..986c53dd6 100644 --- a/applications/fpchess/mainform.pas +++ b/applications/fpchess/mainform.pas @@ -39,6 +39,7 @@ type editLocalIP: TLabeledEdit; editWebserviceURL: TLabeledEdit; Label1: TLabel; + labelMode: TLabel; labelTime: TLabel; Label2: TLabel; Label6: TLabel; @@ -158,6 +159,10 @@ begin [FormatTime(vChessGame.WhitePlayerTime), FormatTime(vChessGame.BlackPlayerTime)]); formChess.labelTime.Caption := lStr; + + lStr := GetChessModule(gSelectedModuleIndex).PlayingDescription; + + formChess.labelMode.Caption := lStr; end; procedure TformChess.InitializeGameModel; diff --git a/applications/fpchess/mod_fics.pas b/applications/fpchess/mod_fics.pas index f7b5237a0..d1adc33db 100644 --- a/applications/fpchess/mod_fics.pas +++ b/applications/fpchess/mod_fics.pas @@ -33,7 +33,7 @@ type FICS_PASSWORD: string; // Frequency to issue commands to avoid disconnection, in miliseconds PROTECT_LOGOUT_FREQ: Integer; - constructor Create(); + constructor Create(); override; destructor Destroy; override; procedure CreateUserInterface(); override; procedure ShowUserInterface(AParent: TWinControl); override; @@ -59,7 +59,9 @@ begin Errmode => 'die', );*) - Description := 'Play online via the Free Internet Chess Server'; + Name := 'mod_fics.pas'; + SelectionDescription := 'Play online - Free Internet Chess Server'; + PlayingDescription := 'Playing online - Free Internet Chess Server'; Kind := cmkInternet; FICS_HOST := 'freechess.org'; diff --git a/applications/fpchess/mod_samecomputer.pas b/applications/fpchess/mod_samecomputer.pas index 90f31f6a4..1174929fd 100644 --- a/applications/fpchess/mod_samecomputer.pas +++ b/applications/fpchess/mod_samecomputer.pas @@ -19,7 +19,7 @@ type editSecondPlayerName: TEdit; public SecondPlayerName: string; - constructor Create(); + constructor Create(); override; procedure CreateUserInterface(); override; procedure ShowUserInterface(AParent: TWinControl); override; procedure HideUserInterface(); override; @@ -38,7 +38,9 @@ constructor TSameComputerChessModule.Create; begin inherited Create; - Description := 'Play against a friend in the same computer'; + Name := 'mod_samecomputer.pas'; + SelectionDescription := 'Play against a friend in the same computer'; + PlayingDescription := 'Playing against a friend in the same computer'; Kind := cmkSameComputer; end;