ScummVM API documentation
next_cd_dialog.h
1 
2 /* ScummVM - Graphic Adventure Engine
3  *
4  * ScummVM is the legal property of its developers, whose names
5  * are too numerous to list here. Please refer to the COPYRIGHT
6  * file distributed with this source distribution.
7  *
8  * This program is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef BAGEL_DIALOGS_NEXT_CD_DIALOG_H
24 #define BAGEL_DIALOGS_NEXT_CD_DIALOG_H
25 
26 #include "bagel/boflib/gui/dialog.h"
27 #include "bagel/boflib/gui/button.h"
28 
29 namespace Bagel {
30 
31 #define NUM_QUIT_BUTTONS 3
32 
33 class CBagQuitDialog : public CBofDialog {
34 public:
36 
37  void onInitDialog() override;
38 
39 protected:
40  void onPaint(CBofRect *pRect) override;
41  void onClose() override;
42  void onBofButton(CBofObject *pObject, int nState) override;
43 
44  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
45 
46  // Data
47  //
48  CBofBmpButton *_pButtons[NUM_QUIT_BUTTONS];
49 };
50 
51 class CBagNextCDDialog : public CBofDialog {
52 public:
54 
55  void onInitDialog() override;
56 
57 protected:
58  void onPaint(CBofRect *pRect) override;
59  void onClose() override;
60  void onBofButton(CBofObject *, int nFlags) override;
61 
62  void onKeyHit(uint32 lKey, uint32 nRepCount) override;
63 
64  // Data
65  CBofBmpButton *_pButton;
66 };
67 
68 class CBagCreditsDialog : public CBofDialog {
69 public:
71 
72  void onInitDialog() override;
73 
74 protected:
75  void onPaint(CBofRect *pRect) override;
76  void onClose() override;
77 
78  void onKeyHit(uint32 lKey, uint32 lRepCount) override;
79  void onLButtonDown(uint32 nFlags, CBofPoint *pPoint, void * = nullptr) override;
80 
81  void onMainLoop() override;
82 
83  ErrorCode nextScreen();
84  ErrorCode displayCredits();
85  ErrorCode loadNextTextFile();
86  int linesPerPage();
87  void nextLine();
88  ErrorCode paintLine(int nLine, char *pszText);
89 
90  CBofBitmap *_pCreditsBmp;
91  CBofBitmap *_pSaveBmp;
92 
93  char *_pszNextLine;
94  char *_pszEnd;
95  char *_pszText;
96 
97  int _nLines;
98  int _nNumPixels;
99  int _iScreen;
100 
101  bool _bDisplay;
102 };
103 
104 } // namespace Bagel
105 
106 #endif
Definition: next_cd_dialog.h:51
Definition: object.h:28
Definition: bitmap.h:55
Definition: next_cd_dialog.h:33
Definition: dialog.h:38
Definition: rect.h:36
Definition: button.h:109
Definition: credits_dialog.h:30
Definition: bagel.h:31
Definition: point.h:34