1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
//////////////////////////////////////////////////////////////////////////
// OptionsDialog.h
//
// Represents a standard options dialog box where the user can toggle
// 3D mode, full screen, custom cursors, adjust sound volumes, and
// quit the game.
//////////////////////////////////////////////////////////////////////////
#ifndef __OPTIONS_DIALOG_H__
#define __OPTIONS_DIALOG_H__
#include "Dialog.h"
#include "SliderListener.h"
#include "CheckboxListener.h"
namespace Sexy
{
class Graphics;
class Slider;
class DialogButton;
class Checkbox;
class Board;
class OptionsDialog : public Dialog, public SliderListener, public CheckboxListener
{
protected:
Slider* mMusicVolumeSlider;
Slider* mSfxVolumeSlider;
DialogButton* mQuitBtn;
Board* mBoard;
public:
enum
{
MUSIC_SLIDER_ID,
SFX_SLIDER_ID,
QUIT_BTN_ID,
FS_CHECKBOX_ID,
HARDWARE_CHECKBOX_ID,
CUSTOM_CURSORS_CHECKBOX_ID,
MESSAGE_BOX_ID,
DIALOG_ID
};
Checkbox* m3DCheckbox;
Checkbox* mFSCheckbox;
Checkbox* mCustomCursorsCheckbox;
public:
//////////////////////////////////////////////////////////////////////////
// Function: OptionsDialog
// Parameters:
// b - A pointer to the board, used to unpause when dialog closes
//
// Returns: none
//////////////////////////////////////////////////////////////////////////
OptionsDialog(Board* b);
virtual ~OptionsDialog();
//////////////////////////////////////////////////////////////////////////
// Draw
//////////////////////////////////////////////////////////////////////////
virtual void Draw(Graphics* g);
//////////////////////////////////////////////////////////////////////////
// ButtonDepress
//////////////////////////////////////////////////////////////////////////
virtual void ButtonDepress(int theId);
//////////////////////////////////////////////////////////////////////////
// AddedToManager
//////////////////////////////////////////////////////////////////////////
virtual void AddedToManager(WidgetManager* theWidgetManager);
//////////////////////////////////////////////////////////////////////////
// RemovedFromManager
//////////////////////////////////////////////////////////////////////////
virtual void RemovedFromManager(WidgetManager* theWidgetManager);
//////////////////////////////////////////////////////////////////////////
// Resize
//////////////////////////////////////////////////////////////////////////
virtual void Resize(int theX, int theY, int theWidth, int theHeight);
//////////////////////////////////////////////////////////////////////////
// SliderVal
//////////////////////////////////////////////////////////////////////////
virtual void SliderVal(int theId, double theVal);
//////////////////////////////////////////////////////////////////////////
// CheckboxChecked
//////////////////////////////////////////////////////////////////////////
void CheckboxChecked(int theId, bool checked);
};
}
#endif
|