ScummVM API documentation
prebuilt_dialogs.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 /*
23  * Based on
24  * WebVenture (c) 2010, Sean Kasun
25  * https://github.com/mrkite/webventure, http://seancode.com/webventure/
26  *
27  * Used with explicit permission from the author
28  */
29 
30 #ifndef MACVENTURE_PREBUIT_DIALOGS_H
31 #define MACVENTURE_PREBUIT_DIALOGS_H
32 
33 #include "common/rect.h"
34 
35 namespace MacVenture {
36 
37 enum DialogAction {
38  kDANone,
39  kDACloseDialog,
40  kDASubmit,
41  kDASaveAs,
42  kDALoadGame,
43  kDAQuit,
44  kDANewGame,
45  kDAPrintDiploma
46 };
47 
48 enum PrebuiltDialogs {
49  kSaveAsDialog = 0, //TODO: Currently unused, we are using ScummVM dialogs instead.
50  kSpeakDialog = 1,
51  kWinGameDialog = 2,
52  kLoseGameDialog = 3,
53  kPrebuiltDialogCount
54 };
55 
56 enum PrebuiltElementType {
57  kDEPlainText,
58  kDEButton,
59  kDETextInput,
60  kDEEnd
61 };
62 
64  uint left;
65  uint top;
66  uint right;
67  uint bottom;
68 };
69 
71  PrebuiltElementType type;
72  const char *title;
73  DialogAction action;
74  uint left;
75  uint top;
76  uint width;
77  uint height;
78 };
79 
80 // Prebuilt dialogs
81 enum {
82  // HACK
83  kMaxPrebuiltDialogElements = 10
84 };
85 
87  PrebuiltDialogBounds bounds;
88  PrebuiltDialogElement elements[kMaxPrebuiltDialogElements];
89 };
90 
91 extern const PrebuiltDialog g_prebuiltDialogs[];
92 
93 } // End of namespace MacVenture
94 
95 #endif
Definition: prebuilt_dialogs.h:70
Definition: prebuilt_dialogs.h:63
Definition: container.h:38
Definition: prebuilt_dialogs.h:86