|
Source listing: echo $file; ?>. Return to
the main page
/* -*- C++ -*-
*******************************************************************
*
*
* Shisen-Sho for Windows
*
* dialogs.h - Dialog declarations
*
*
*******************************************************************
*
* A japanese game similar to mahjongg
*
*******************************************************************
*
* Created 2000-12-28 by Jim Mason <jmason@sirius.com>
*
* Game engine ported from Mario Weilguni's <mweilguni@sime.com>
* original game for KDE, KSHISEN. If you are interested in the
* KDE version of the game, see http://www.kde.org/kdegames/
*
*******************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
*******************************************************************
*/
#ifndef _DIALOGS_H_
#define _DIALOGS_H_
#include "StdString.h"
#include "wndcore.h"
#include "frame.h"
#include "resource.h"
/////////////////////////////////////////////////////////////////////////////
// StaticText control
class StaticText : public Window {
public:
StaticText();
public:
void SetColour(COLORREF rgb) { m_rgb = rgb; }
void SetFont(HFONT hFont, BOOL bOwnFont = FALSE)
{ m_hFont = hFont;
m_bOwnFont = bOwnFont; }
void SetFormat(UINT nFormat) { m_nFormat = nFormat; }
// Overrides
protected:
LRESULT WndProc(UINT nMsg, WPARAM wParam, LPARAM lParam);
virtual void OnDestroy();
protected:
void OnPaint();
protected:
COLORREF m_rgb;
HFONT m_hFont;
UINT m_nFormat;
BOOL m_bOwnFont;
};
/////////////////////////////////////////////////////////////////////////////
// PlayerName dialog
class PlayerName : public Dialog {
public:
PlayerName(Window* pParent=NULL);
protected:
enum { IDD = IDD_GETPLAYERNAME };
// Overrides
protected:
BOOL OnCommand(UINT nID, UINT nEvent, HWND hSource);
public:
CStdString m_szName;
};
/////////////////////////////////////////////////////////////////////////////
// ShowScores dialog
class ShowScores : public Dialog {
public:
ShowScores(Window* pParent=NULL);
protected:
enum { IDD = IDD_SHOWSCORES };
// Overrides
protected:
BOOL OnInitDialog();
public:
std::vector<HighScore>* m_pHighScore;
int m_iHotItem;
StaticText m_caption;
};
/////////////////////////////////////////////////////////////////////////////
// SelectTileset dialog
class SelectTileset : public Dialog
{
public:
SelectTileset(Window* pParent=NULL);
public:
enum { IDD = IDD_SELECTTILESET };
public:
const CStdString& GetTileset() { return m_szTileset; }
const CStdString& GetBackground() { return m_szBackground; }
// Overrides
protected:
BOOL OnCommand(UINT nID, UINT nEvent, HWND hSource);
BOOL OnInitDialog();
protected:
void OnChangeTileset();
void OnBrowseTileset();
void OnChangeBackground();
void OnBrowseBackground();
void OnOK();
protected:
Board m_board;
HWND m_tileset, m_background;
std::vector<CStdString> m_imageFiles;
int m_iNextTileset, m_iNextBkgnd, m_iNewFile;
protected:
CStdString m_szTileset, m_szBackground;
};
/////////////////////////////////////////////////////////////////////////////
// About dialog
class About : public Dialog {
public:
About(Window* pParent=NULL);
protected:
enum { IDD = IDD_ABOUTBOX };
};
#endif // ndef _DIALOGS_H_
<< Back to Shisen-Sho
|
|