Debian Codegraph @

examples/fps_game/code/gameviewportunderui.pas

raw
1 {
2 Copyright 2022-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 { Maintain display of the viewport with 3D contents under the UI.
17
18 We could just use TCastleDesign to instantiate it
19 from castle-data:/viewport_under_ui.castle-user-interface in
20 each UI design, but this would mean we reload the model when switching
21 views. }
22 unit GameViewportUnderUi;
23
24 interface
25
26 uses CastleControls;
27
28 var
29 ViewportUnderUi: TCastleDesign;
30
31 procedure LoadViewportUnderUi;
32
33 implementation
34
35 uses CastleWindow;
36
37 procedure LoadViewportUnderUi;
38 begin
39 ViewportUnderUi := TCastleDesign.Create(Application);
40 ViewportUnderUi.FullSize := true;
41 ViewportUnderUi.Url := 'castle-data:/viewport_under_ui.castle-user-interface';
42 end;
43
44 end.