ScummVM API documentation
usercfg.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#ifndef HODJNPODJ_RIDDLES_USERCFG_H
23#define HODJNPODJ_RIDDLES_USERCFG_H
24
25#include "bagel/afxwin.h"
26#include "bagel/hodjnpodj/hnplibs/cbofdlg.h"
27#include "bagel/hodjnpodj/hnplibs/stdinc.h"
28
29namespace Bagel {
30namespace HodjNPodj {
31namespace Riddles {
32
33#define IDD_USERCFG 100
34
35#define LIMIT_MIN 10
36#define LIMIT_MAX 301
37#define LIMIT_DEF 30
38
39#define LEVEL_MIN 0
40#define LEVEL_MAX 3
41#define LEVEL_DEF 1
42
43class CUserCfgDlg : public CBmpDialog {
44public:
45 CUserCfgDlg(CWnd *pParent = nullptr, CPalette *pPalette = nullptr, unsigned int = IDD_USERCFG);
46 void ClearDialogImage();
47
48protected:
49
50 virtual void DoDataExchange(CDataExchange *) override;
51 virtual bool OnCommand(WPARAM, LPARAM) override;
52 virtual bool OnInitDialog() override;
53 void PutDlgData();
54 void GetDlgData();
55 void DispLimit();
56 void DispLevel();
57 int GetIndex(int);
58
59 void OnHScroll(unsigned int, unsigned int, CScrollBar *);
60 void OnClose();
61 void OnPaint();
62 void OnLButtonDown(unsigned int, CPoint);
63 DECLARE_MESSAGE_MAP()
64
65 CText *m_pTxtTimeLimit = nullptr;
66 CText *m_pTxtLimit = nullptr;
67 CText *m_pTxtLevel = nullptr;
68 CScrollBar *m_pScrollBar = nullptr;
69 CScrollBar *m_pLevelScroll = nullptr;
70 unsigned int m_nTimeLimit = 0;
71 int m_nDifficultyLevel = 0;
72 bool m_bSave = false; // True if should save theses values
73};
74
75} // namespace Riddles
76} // namespace HodjNPodj
77} // namespace Bagel
78
79#endif
Definition: cbofdlg.h:31
Definition: text.h:62
Definition: afxwin.h:667
Definition: atltypes.h:79
Definition: afxwin.h:1765
Definition: afxwin.h:1141
Definition: minwindef.h:292