ScummVM API documentation
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 #ifndef HODJNPODJ_POKER_DIALOGS_H
23 #define HODJNPODJ_POKER_DIALOGS_H
24 
25 #include "bagel/hodjnpodj/hnplibs/cbofdlg.h"
26 #include "bagel/hodjnpodj/poker/poker.h"
27 
28 namespace Bagel {
29 namespace HodjNPodj {
30 namespace Poker {
31 
32 #define AMOUNTMAX 10
33 #define AMOUNTMIN 1
34 
38 class COptionsDlg : public CBmpDialog {
39 private:
40  bool m_bSoundOn = false; // bool for telling me should I play sounds or not
41  bool m_bDisableSets = false; // bool for telling me should I disable the
42  // "Set Amount" and "Set Payoffs" buttons
43 
44 public:
45  COptionsDlg(CWnd* pParent = nullptr, CPalette *pPalette = nullptr, unsigned int = IDD_OPTIONS);
46  void SetInitialOptions(bool = false, bool = true); // Sets the private members
47  void ClearDialogImage();
48 
49 protected:
50  virtual bool OnCommand(WPARAM, LPARAM) override;
51  virtual bool OnInitDialog() override;
52  afx_msg void OnPaint();
53  afx_msg bool OnEraseBkgnd(CDC *pDC);
54  afx_msg void OnDestroy();
55  DECLARE_MESSAGE_MAP()
56 };
57 
61 class CSetAmountDlg : public CBmpDialog {
62 private:
63  int m_nCurrentAmount = 0; // contains the current amount set
64  char m_cAmount[6] = {};
65  CRect rectDisplayAmount;
66 
67 public:
68  CSetAmountDlg(CWnd* pParent = nullptr, CPalette *pPalette = nullptr, unsigned int = IDD_SETAMOUNT);
69  void SetInitialOptions(long = 0); // Sets the private members
70  void ClearDialogImage();
71  bool OnInitDialog() override;
72 
73 protected:
74  //{{AFX_MSG(COptions)
75  virtual bool OnCommand(WPARAM, LPARAM) override;
76  afx_msg void OnHScroll(unsigned int nSBCode, unsigned int nPos, CScrollBar* pScrollBar);
77  afx_msg void OnPaint();
78  afx_msg bool OnEraseBkgnd(CDC *pDC);
79  afx_msg void OnDestroy();
80  //}}AFX_MSG
81  DECLARE_MESSAGE_MAP()
82 };
86 class CSetPayoffsDlg : public CBmpDialog {
87 private:
88  char m_cPair[6] = {};
89  char m_cPairJacksPlus[6] = {};
90  char m_cTwoPair[6] = {};
91  char m_cThreeOAK[6] = {};
92  char m_cStriaght[6] = {};
93  char m_cFlush[6] = {};
94  char m_cFullHouse[6] = {};
95  char m_cFourOAK[6] = {};
96  char m_cStraightFlush[6] = {};
97  char m_cRoyalFlush[6] = {};
98  int m_nSetOfOdds = 0;
99  bool m_bJustDisplay = false;
100  CRect crectRedraw;
101  CRect rectPair, rectPairJacks;
102  CRect rectTwoPair, rectThree;
103  CRect rectStraight, rectFlush;
104  CRect rectFullHouse, rectFour;
105  CRect rectStraightFlush;
106  CRect rectRoyalFlush;
107 
108 public:
109  CSetPayoffsDlg(CWnd* pParent = nullptr, CPalette *pPalette = nullptr, unsigned int = IDD_WINRATIO, int = IDC_POPO, bool = false);
110  void ClearDialogImage();
111  void OnKlingon(bool = true);
112  void OnKuwaiti(bool = true);
113  void OnMartian(bool = true);
114  void OnPopo(bool = true);
115  void OnVegas(bool = true);
116 
117 protected:
118  virtual void DoDataExchange(CDataExchange *) override;
119  virtual bool OnInitDialog() override;
120  afx_msg void OnSetpayoffs();
121  virtual bool OnCommand(WPARAM, LPARAM) override;
122  afx_msg void OnCancel() override;
123  afx_msg void OnPaint();
124  afx_msg void OnDestroy();
125  afx_msg bool OnEraseBkgnd(CDC *pDC);
126  DECLARE_MESSAGE_MAP()
127 };
128 
132 class CUserWonDlg : public CBmpDialog {
133 private:
134  int m_nWinPhrase = 0;
135 
136 public:
137  CUserWonDlg(CWnd *pParent = nullptr, CPalette *pPalette = nullptr, unsigned int = IDD_USERWON);
138  void SetInitialOptions(int = 0);
139  void ClearDialogImage();
140  bool OnInitDialog() override;
141 
142 protected:
143  virtual void OnOK() override;
144  virtual bool OnCommand(WPARAM, LPARAM) override;
145  afx_msg void OnPaint();
146  afx_msg void OnDestroy();
147  DECLARE_MESSAGE_MAP()
148 };
149 
150 } // namespace Poker
151 } // namespace HodjNPodj
152 } // namespace Bagel
153 
154 #endif
Definition: afxwin.h:1141
Definition: minwindef.h:292
Definition: dialogs.h:38
Definition: afxwin.h:667
Definition: afxwin.h:1765
Definition: afxwin.h:721
Definition: cbofdlg.h:31
Definition: afxwin.h:27
Definition: atltypes.h:131
Definition: dialogs.h:132