| 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 |
{ Win screen. } |
| 17 |
unit GameViewWin; |
| 18 |
|
| 19 |
interface |
| 20 |
|
| 21 |
uses Classes, |
| 22 |
CastleVectors, CastleUIControls, CastleControls, CastleKeysMouse; |
| 23 |
|
| 24 |
type |
| 25 |
TViewWin = class(TCastleView) |
| 26 |
published |
| 27 |
{ Components designed using CGE editor. |
| 28 |
These fields will be automatically initialized at Start. } |
| 29 |
ButtonBack: TCastleButton; |
| 30 |
private |
| 31 |
procedure ClickBack(Sender: TObject); |
| 32 |
public |
| 33 |
constructor Create(AOwner: TComponent); override; |
| 34 |
procedure Start; override; |
| 35 |
end; |
| 36 |
|
| 37 |
var |
| 38 |
ViewWin: TViewWin; |
| 39 |
|
| 40 |
implementation |
| 41 |
|
| 42 |
uses GameViewMenu; |
| 43 |
|
| 44 |
constructor TViewWin.Create(AOwner: TComponent); |
| 45 |
begin |
| 46 |
inherited; |
| 47 |
DesignUrl := 'castle-data:/gameviewwin.castle-user-interface'; |
| 48 |
end; |
| 49 |
|
| 50 |
procedure TViewWin.Start; |
| 51 |
begin |
| 52 |
inherited; |
| 53 |
ButtonBack.OnClick := {$ifdef FPC}@{$endif} ClickBack; |
| 54 |
end; |
| 55 |
|
| 56 |
procedure TViewWin.ClickBack(Sender: TObject); |
| 57 |
begin |
| 58 |
Container.View := ViewMenu; |
| 59 |
end; |
| 60 |
|
| 61 |
end. |