Debian Codegraph @

examples/advanced_editor/custom_component/code/gameviewmain.pas

raw
1 {
2 Copyright 2020-2023 Michalis Kamburelis.
3
4 This file is part of "Castle Game Engine".
5
6 "Castle Game Engine" is free software; see the file COPYING.txt,
7 included in this distribution, for details about the copyright.
8
9 "Castle Game Engine" is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
13 ----------------------------------------------------------------------------
14 }
15
16 { Main view, where most of the application logic takes place. }
17 unit GameViewMain;
18
19 interface
20
21 uses Classes,
22 CastleComponentSerialize, CastleUIControls, CastleControls,
23 CastleKeysMouse, CastleNotifications, CastleViewport;
24
25 type
26 { Main view, where most of the application logic takes place. }
27 TViewMain = class(TCastleView)
28 //published
29 { Components designed using CGE editor.
30 These fields will be automatically initialized at Start. }
31 public
32 constructor Create(AOwner: TComponent); override;
33 procedure Start; override;
34 procedure Update(const SecondsPassed: Single; var HandleInput: Boolean); override;
35 end;
36
37 var
38 ViewMain: TViewMain;
39
40 implementation
41
42 uses SysUtils,
43 CastleVectors,
44 { needed in the uses clause, to register TImageGrid }
45 GameControls;
46
47 { TViewMain ----------------------------------------------------------------- }
48
49 constructor TViewMain.Create(AOwner: TComponent);
50 begin
51 inherited;
52 DesignUrl := 'castle-data:/gameviewmain.castle-user-interface';
53 end;
54
55 procedure TViewMain.Start;
56 begin
57 inherited;
58 end;
59
60 procedure TViewMain.Update(const SecondsPassed: Single; var HandleInput: Boolean);
61 begin
62 inherited;
63 { This virtual method is executed every frame (many times per second). }
64 end;
65
66 end.