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 };
46 
47 enum PrebuiltDialogs {
48  kSaveAsDialog = 0, //TODO: Currently unused, we are using ScummVM dialogs instead.
49  kSpeakDialog = 1,
50  kWinGameDialog = 2,
51  kLoseGameDialog = 3,
52  kPrebuiltDialogCount
53 };
54 
55 enum PrebuiltElementType {
56  kDEPlainText,
57  kDEButton,
58  kDETextInput,
59  kDEEnd
60 };
61 
63  uint left;
64  uint top;
65  uint right;
66  uint bottom;
67 };
68 
70  PrebuiltElementType type;
71  const char *title;
72  DialogAction action;
73  uint left;
74  uint top;
75  uint width;
76  uint height;
77 };
78 
79 // Prebuilt dialogs
80 enum {
81  // HACK
82  kMaxPrebuiltDialogElements = 10
83 };
84 
86  PrebuiltDialogBounds bounds;
87  PrebuiltDialogElement elements[kMaxPrebuiltDialogElements];
88 };
89 
90 extern const PrebuiltDialog g_prebuiltDialogs[];
91 
92 } // End of namespace MacVenture
93 
94 #endif
Definition: prebuilt_dialogs.h:69
Definition: prebuilt_dialogs.h:62
Definition: container.h:38
Definition: prebuilt_dialogs.h:85