You've already forked lazarus-ccr
fpchess: Improves the UI
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1847 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1,26 +1,26 @@
|
|||||||
object formChess: TformChess
|
object formChess: TformChess
|
||||||
Left = 318
|
Left = 318
|
||||||
Height = 433
|
Height = 500
|
||||||
Top = 123
|
Top = 123
|
||||||
Width = 360
|
Width = 360
|
||||||
ActiveControl = notebookMain
|
ActiveControl = notebookMain
|
||||||
Caption = 'FP Chess 0.1'
|
Caption = 'FP Chess 0.1'
|
||||||
ClientHeight = 433
|
ClientHeight = 500
|
||||||
ClientWidth = 360
|
ClientWidth = 360
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '0.9.31'
|
||||||
object notebookMain: TNotebook
|
object notebookMain: TNotebook
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 433
|
Height = 500
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 360
|
Width = 360
|
||||||
PageIndex = 0
|
PageIndex = 1
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = True
|
TabStop = True
|
||||||
object pageStart: TPage
|
object pageStart: TPage
|
||||||
ClientWidth = 360
|
ClientWidth = 360
|
||||||
ClientHeight = 433
|
ClientHeight = 500
|
||||||
object Label1: TLabel
|
object Label1: TLabel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 32
|
Height = 32
|
||||||
@@ -62,7 +62,7 @@ object formChess: TformChess
|
|||||||
object btnQuit: TBitBtn
|
object btnQuit: TBitBtn
|
||||||
Left = 24
|
Left = 24
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 392
|
Top = 456
|
||||||
Width = 304
|
Width = 304
|
||||||
Caption = 'Quit'
|
Caption = 'Quit'
|
||||||
OnClick = btnQuitClick
|
OnClick = btnQuitClick
|
||||||
@@ -132,8 +132,8 @@ object formChess: TformChess
|
|||||||
end
|
end
|
||||||
object panelModules: TPanel
|
object panelModules: TPanel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 121
|
Height = 177
|
||||||
Top = 224
|
Top = 232
|
||||||
Width = 344
|
Width = 344
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
@@ -161,7 +161,7 @@ object formChess: TformChess
|
|||||||
object btnStartGame: TBitBtn
|
object btnStartGame: TBitBtn
|
||||||
Left = 24
|
Left = 24
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 352
|
Top = 416
|
||||||
Width = 304
|
Width = 304
|
||||||
Caption = 'Start game'
|
Caption = 'Start game'
|
||||||
OnClick = btnStartGameClick
|
OnClick = btnStartGameClick
|
||||||
@@ -169,23 +169,8 @@ object formChess: TformChess
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object pageGame: TPage
|
object pageGame: TPage
|
||||||
ClientWidth = 720
|
ClientWidth = 360
|
||||||
ClientHeight = 866
|
ClientHeight = 500
|
||||||
object Label5: TLabel
|
|
||||||
AnchorSideRight.Control = pageGame
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
Left = 0
|
|
||||||
Height = 32
|
|
||||||
Top = 8
|
|
||||||
Width = 360
|
|
||||||
Alignment = taCenter
|
|
||||||
Anchors = [akTop, akLeft, akRight]
|
|
||||||
AutoSize = False
|
|
||||||
Caption = 'Playing'
|
|
||||||
Font.Height = -19
|
|
||||||
ParentColor = False
|
|
||||||
ParentFont = False
|
|
||||||
end
|
|
||||||
object labelPos: TLabel
|
object labelPos: TLabel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 17
|
Height = 17
|
||||||
@@ -203,16 +188,49 @@ object formChess: TformChess
|
|||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object memoDebug: TMemo
|
object memoDebug: TMemo
|
||||||
|
AnchorSideRight.Control = pageGame
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = pageGame
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 106
|
Height = 71
|
||||||
Top = 440
|
Top = 424
|
||||||
Width = 344
|
Width = 347
|
||||||
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Right = 5
|
||||||
|
BorderSpacing.Bottom = 5
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
object btnResign: TBitBtn
|
||||||
|
Left = 176
|
||||||
|
Height = 30
|
||||||
|
Top = 8
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Resign'
|
||||||
|
TabOrder = 1
|
||||||
|
end
|
||||||
|
object btnQuitGame: TBitBtn
|
||||||
|
Left = 272
|
||||||
|
Height = 30
|
||||||
|
Top = 8
|
||||||
|
Width = 75
|
||||||
|
Caption = 'Quit'
|
||||||
|
OnClick = btnQuitGameClick
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object btnGameNewGame: TBitBtn
|
||||||
|
Left = 80
|
||||||
|
Height = 30
|
||||||
|
Top = 8
|
||||||
|
Width = 75
|
||||||
|
Caption = 'New Game'
|
||||||
|
OnClick = btnGameNewGameClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object pageWebservice: TPage
|
object pageWebservice: TPage
|
||||||
ClientWidth = 720
|
ClientWidth = 1440
|
||||||
ClientHeight = 866
|
ClientHeight = 1732
|
||||||
object Label8: TLabel
|
object Label8: TLabel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 32
|
Height = 32
|
||||||
@@ -285,6 +303,7 @@ object formChess: TformChess
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object timerChessTimer: TTimer
|
object timerChessTimer: TTimer
|
||||||
|
Enabled = False
|
||||||
OnTimer = timerChessTimerTimer
|
OnTimer = timerChessTimerTimer
|
||||||
left = 296
|
left = 296
|
||||||
top = 152
|
top = 152
|
||||||
|
@@ -27,6 +27,9 @@ type
|
|||||||
{ TformChess }
|
{ TformChess }
|
||||||
|
|
||||||
TformChess = class(TForm)
|
TformChess = class(TForm)
|
||||||
|
btnGameNewGame: TBitBtn;
|
||||||
|
btnResign: TBitBtn;
|
||||||
|
btnQuitGame: TBitBtn;
|
||||||
btnQuit: TBitBtn;
|
btnQuit: TBitBtn;
|
||||||
btnStartGame: TBitBtn;
|
btnStartGame: TBitBtn;
|
||||||
btnPlayAgainstAI: TButton;
|
btnPlayAgainstAI: TButton;
|
||||||
@@ -38,7 +41,6 @@ type
|
|||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
labelTime: TLabel;
|
labelTime: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Label5: TLabel;
|
|
||||||
Label6: TLabel;
|
Label6: TLabel;
|
||||||
Label7: TLabel;
|
Label7: TLabel;
|
||||||
Label8: TLabel;
|
Label8: TLabel;
|
||||||
@@ -54,7 +56,9 @@ type
|
|||||||
spinPlayerTime: TSpinEdit;
|
spinPlayerTime: TSpinEdit;
|
||||||
timerChessTimer: TTimer;
|
timerChessTimer: TTimer;
|
||||||
pageWebservice: TPage;
|
pageWebservice: TPage;
|
||||||
|
procedure btnGameNewGameClick(Sender: TObject);
|
||||||
procedure btnQuitClick(Sender: TObject);
|
procedure btnQuitClick(Sender: TObject);
|
||||||
|
procedure btnQuitGameClick(Sender: TObject);
|
||||||
procedure btnStartGameClick(Sender: TObject);
|
procedure btnStartGameClick(Sender: TObject);
|
||||||
procedure comboGameModeSelect(Sender: TObject);
|
procedure comboGameModeSelect(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
@@ -181,6 +185,18 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TformChess.btnGameNewGameClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
notebookMain.PageIndex := INT_PAGE_START;
|
||||||
|
|
||||||
|
timerChessTimer.Enabled := False;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TformChess.btnQuitGameClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
Close;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TformChess.btnStartGameClick(Sender: TObject);
|
procedure TformChess.btnStartGameClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
lModule: TChessModule;
|
lModule: TChessModule;
|
||||||
@@ -192,6 +208,8 @@ begin
|
|||||||
gSelectedModuleIndex := comboGameMode.ItemIndex;
|
gSelectedModuleIndex := comboGameMode.ItemIndex;
|
||||||
lModule := GetChessModule(gSelectedModuleIndex);
|
lModule := GetChessModule(gSelectedModuleIndex);
|
||||||
lModule.PrepareForGame();
|
lModule.PrepareForGame();
|
||||||
|
|
||||||
|
timerChessTimer.Enabled := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TformChess.comboGameModeSelect(Sender: TObject);
|
procedure TformChess.comboGameModeSelect(Sender: TObject);
|
||||||
|
Reference in New Issue
Block a user