- Timestamp:
- Feb 8, 2014, 11:35:27 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UFormMain.lfm
r3 r4 5 5 Width = 775 6 6 Caption = 'xTactics' 7 ClientHeight = 6217 ClientHeight = 595 8 8 ClientWidth = 775 9 Menu = MainMenu1 9 10 OnCreate = FormCreate 10 11 OnDestroy = FormDestroy … … 13 14 object PaintBox1: TPaintBox 14 15 Left = 0 15 Height = 62116 Height = 595 16 17 Top = 0 17 18 Width = 775 … … 23 24 OnPaint = PaintBox1Paint 24 25 end 26 object MainMenu1: TMainMenu 27 left = 72 28 top = 48 29 object MenuItem1: TMenuItem 30 Caption = 'Game' 31 object MenuItem2: TMenuItem 32 Action = AGameNew 33 end 34 object MenuItem3: TMenuItem 35 Action = AGameEnd 36 end 37 object MenuItem4: TMenuItem 38 Action = AGameEndTurn 39 end 40 object MenuItem5: TMenuItem 41 Caption = '-' 42 end 43 object MenuItem6: TMenuItem 44 Action = AExit 45 end 46 end 47 end 48 object ActionList1: TActionList 49 left = 223 50 top = 49 51 object AGameNew: TAction 52 Caption = 'New' 53 OnExecute = AGameNewExecute 54 end 55 object AExit: TAction 56 Caption = 'Exit' 57 OnExecute = AExitExecute 58 end 59 object AGameEnd: TAction 60 Caption = 'End' 61 end 62 object AGameEndTurn: TAction 63 Caption = 'End turn' 64 end 65 end 25 66 end -
trunk/UFormMain.pas
r3 r4 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 UGame, LCLType ;9 UGame, LCLType, Menus, ActnList; 10 10 11 11 type … … 14 14 15 15 TFormMain = class(TForm) 16 AGameEndTurn: TAction; 17 AGameEnd: TAction; 18 AExit: TAction; 19 AGameNew: TAction; 20 ActionList1: TActionList; 21 MainMenu1: TMainMenu; 22 MenuItem1: TMenuItem; 23 MenuItem2: TMenuItem; 24 MenuItem3: TMenuItem; 25 MenuItem4: TMenuItem; 26 MenuItem5: TMenuItem; 27 MenuItem6: TMenuItem; 16 28 PaintBox1: TPaintBox; 29 procedure AExitExecute(Sender: TObject); 30 procedure AGameNewExecute(Sender: TObject); 17 31 procedure FormCreate(Sender: TObject); 18 32 procedure FormDestroy(Sender: TObject); … … 56 70 begin 57 71 Game := TGame.Create; 72 end; 73 74 procedure TFormMain.AExitExecute(Sender: TObject); 75 begin 76 Application.Terminate; 77 end; 78 79 procedure TFormMain.AGameNewExecute(Sender: TObject); 80 begin 81 Game.New; 82 PaintBox1.Repaint; 58 83 end; 59 84 -
trunk/UGame.pas
r3 r4 34 34 procedure Paint(Canvas: TCanvas; Rect: TRect); 35 35 constructor Create; 36 destructor Destroy; override; 36 37 procedure Init(Size: TPoint); 37 38 end; … … 200 201 end; 201 202 203 destructor TMap.Destroy; 204 begin 205 Init(0, 0); 206 inherited Destroy; 207 end; 208 202 209 procedure TMap.Init(Size: TPoint); 203 210 var
Note:
See TracChangeset
for help on using the changeset viewer.