-
Notifications
You must be signed in to change notification settings - Fork 2
/
gamemenu.h
147 lines (113 loc) · 3.54 KB
/
gamemenu.h
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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#ifndef GAMEMENU_H
#define GAMEMENU_H
#include <QtGui>
#include "gamescene.h"
#include "ui_menu.h"
const int MENU_MAIN = 0;
const int MENU_OPTIONS = 1;
const int MENU_PAUSE = 2;
const int MENU_GRAPHICS = 3;
const int MENU_AUDIO = 4;
const int MENU_GAME = 5;
const int MENU_PROFILE = 6;
const int MENU_HALL = 7;
const int MENU_CREDITS = 8;
const int MENU_LEVELS = 9;
const int MENU_HELP = 10;
const int MENU_LANGUAGE = 11;
class ConfirmDialog : public QDialog
{
Q_OBJECT
public:
ConfirmDialog(QWidget *parent = 0, Qt::WindowFlags f = 0);
int exec(const QString &qs);
public slots:
void onNoClicked();
void onYesClicked();
private:
QLabel *text;
int m_result;
};
////////////////////////////////////////////////////////////////////////////////
class MenuWidget : public QStackedWidget
{
Q_OBJECT
public:
MenuWidget(QWidget *parent = 0);
void initGraphics();
void showHelp();
void setMenuPage(int index) { setCurrentIndex(index); setFocus(); }
void setBackground(QPixmap pix) { bgpicture = pix; }
bool isActive() { return m_active; }
void activate(bool en = true);
void checkMenuMouseActions(const QPoint &pos);
QString selectedLevelPack();
void keyPressEvent(QKeyEvent *keyEvent);
QRect buttonProfile, buttonLevelpack;
private:
Ui::MenuWidget ui;
QPixmap bgpicture;
bool startAfterSelect, m_active, m_newplayer, m_renameplayer;
QStringList lpacks;
class HelpForm *helpForm;
// void updateHallOfFame();
private slots:
void on_bNew_clicked();
void on_bContinue_clicked();
void on_bOptions_clicked();
void on_bHelp_clicked();
void on_bCredits_clicked();
void on_bExit_clicked();
void on_bOptGraphics_clicked();
void on_bOptSound_clicked();
void on_bOptProfile_clicked();
void on_bOptLevels_clicked();
void on_bOptLanguage_clicked();
void on_bOptBack_clicked();
void on_bPauseGraphics_clicked();
void on_bPauseSound_clicked();
void on_bPauseHelp_clicked();
void on_bPauseRestart_clicked();
void on_bPauseAbandon_clicked();
void on_bPauseBack_clicked();
void on_bGraphicsOk_clicked();
void on_bGraphicsBack_clicked();
void on_bAudioBack_clicked();
void on_cbVolumeMusic_valueChanged(int val);
void on_cbMuteMusic_toggled(bool on);
void on_cbVolumeSound_valueChanged(int val);
void on_cbMuteSound_toggled(bool on);
void on_rbArcade_toggled(bool);
void on_rbPuzzle_toggled(bool);
void on_sliDifficulty_valueChanged(int);
void on_bGameStart_clicked();
// void on_bProfileCancel_clicked();
// void on_bProfileOk_clicked();
void on_bProfileSelect_clicked();
void on_bProfileRename_clicked();
void on_bProfileDelete_clicked();
void on_bProfileBack_clicked();
void on_lwPlayersList_itemDoubleClicked(QListWidgetItem *item);
// void on_bHallBack_clicked();
void on_bHelpBack_clicked();
void on_bCreditsBack_clicked();
void on_bLangBack_clicked();
void on_bLangOk_clicked();
void on_lwLanguage_itemDoubleClicked(QListWidgetItem *item);
void on_bLevelsOk_clicked();
void on_bLevelsBack_clicked();
void on_lwLevels_itemDoubleClicked(QListWidgetItem *item);
void onCurrentChanged(int);
signals:
void menuNew();
void menuContinue();
void menuExit();
void menuPauseBack();
void menuThemeChanged();
void menuRestartLevel();
void menuAbandonGame();
void menuVideoModeChanged();
void menuGameStart();
void menuLevelPack();
};
#endif // GAMEMENU_H