Menu class used to show and manage the game menu.
More...
#include <menu.h>
|
void | playStory (GLint skinId) |
| Signal emitted to show the gameView in story mode. More...
|
|
void | playArcade (GLint skinId, GLint levelId) |
| Signal emitted to show the gameView in arcade mode. More...
|
|
void | showLevelEditor (GLint levelId) |
| Signal emitted to show the levelEditor.
|
|
void | setMouseMovementTracking (int mode) |
| This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved. More...
|
|
void | enableAudio (bool enabled) |
| Signal emitted to enable or disable the audio. More...
|
|
void | playAmbientMusic (QString filename) |
| Signal emitted to play the ambient music. More...
|
|
void | stopAmbientMusic () |
| Signal emitted to stop the current ambient music.
|
|
void | playEffect (QString effectName) |
| Signal emitted to play an effect. More...
|
|
void | setSkybox (QString skyboxName) |
| Signal emitted to set the Skybox. More...
|
|
|
| Menu (QMap< GLint, Skin * > &_skinsList, QMap< GLint, Level * > &_levelsList, QMap< GLint, GLuint > &_iconsList, Alphabet *_alphabet, QObject *_parent, bool _audioEnabled=true, bool showIntro=true) |
| Create a Menu object used to show and manage the game menu. More...
|
|
| ~Menu () |
| Disconnect and Destroy a Menu object.
|
|
GLvoid | draw (GLboolean simplifyForPicking=false) |
| Method to draw the menu. More...
|
|
|
void | itemClicked (QMouseEvent *event, QList< GLuint > listNames) |
| Slot invoked when the user clicks on a item. More...
|
|
void | mouseReleased (QMouseEvent *event) |
| Slot invoked when the user releases the mouse button. More...
|
|
void | mouseMoved (QMouseEvent *event, QList< GLuint > listNames) |
| Slot invoked when the user moves the mouse. More...
|
|
void | wheelScrolled (QWheelEvent *event) |
| Slot invoked when the user scrolls the wheel of the mouse button. More...
|
|
void | keyPressed (QKeyEvent *event) |
| Slot invoked when the user presses a key on the keyboard. More...
|
|
Menu class used to show and manage the game menu.
- Version
- 1.0
- Author
- #34
Menu::Menu |
( |
QMap< GLint, Skin * > & |
_skinsList, |
|
|
QMap< GLint, Level * > & |
_levelsList, |
|
|
QMap< GLint, GLuint > & |
_iconsList, |
|
|
Alphabet * |
_alphabet, |
|
|
QObject * |
_parent, |
|
|
bool |
_audioEnabled = true , |
|
|
bool |
showIntro = true |
|
) |
| |
|
explicit |
Create a Menu object used to show and manage the game menu.
- Postcondition
- You have to connect parent's signals to this object's slots. For Qubet check the connectInputEvents function.
- Parameters
-
_skinsList | is the reference to Qubet's skinsList. |
_levelsList | is the reference to Qubet's levelsList. |
_iconsList | is the reference to Qubet's iconsList. |
_alphabet | is the reference to Qubet's alphabet. |
_parent | is a callback variable to the parent of the parent. |
_audioEnabled | is a variable to states if the audio is enabled or not. |
showIntro | states if you want to show the intro. [default = true] |
GLvoid Menu::draw |
( |
GLboolean |
simplifyForPicking = false | ) |
|
Method to draw the menu.
- Parameters
-
simplifyForPicking | [default = false] is used to draw a simplified scene used for the picking function. |
void Menu::enableAudio |
( |
bool |
enabled | ) |
|
|
signal |
Signal emitted to enable or disable the audio.
- Parameters
-
enabled | is the variable that states if the audio is to enable or not. |
void Menu::itemClicked |
( |
QMouseEvent * |
event, |
|
|
QList< GLuint > |
listNames |
|
) |
| |
|
privateslot |
Slot invoked when the user clicks on a item.
- Parameters
-
event | is the QMouseEvent. |
listNames | is the QList<GLuint> of item's names. |
void Menu::keyPressed |
( |
QKeyEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user presses a key on the keyboard.
- Parameters
-
void Menu::mouseMoved |
( |
QMouseEvent * |
event, |
|
|
QList< GLuint > |
listNames |
|
) |
| |
|
privateslot |
Slot invoked when the user moves the mouse.
- Parameters
-
event | is the QMouseEvent*. |
listNames | is the QList<GLuint> of item's names. |
void Menu::mouseReleased |
( |
QMouseEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user releases the mouse button.
- Parameters
-
event | is the QMouseEvent*. |
void Menu::playAmbientMusic |
( |
QString |
filename | ) |
|
|
signal |
Signal emitted to play the ambient music.
- Parameters
-
filename | is the filename to play. |
void Menu::playArcade |
( |
GLint |
skinId, |
|
|
GLint |
levelId |
|
) |
| |
|
signal |
Signal emitted to show the gameView in arcade mode.
- Parameters
-
void Menu::playEffect |
( |
QString |
effectName | ) |
|
|
signal |
Signal emitted to play an effect.
- Parameters
-
effectName | is the name of the effect to play. |
void Menu::playStory |
( |
GLint |
skinId | ) |
|
|
signal |
Signal emitted to show the gameView in story mode.
- Parameters
-
void Menu::setMouseMovementTracking |
( |
int |
mode | ) |
|
|
signal |
This signal is emitted to set the Qubet's Mouse Move Tracking sensibility. The modes are: 0 - no signal emitted. 1 - the signal mouseMoved is emitted only when the mouse is moved and one of the mouse buttons are clicked. 2 - the signal mouseMoved is emitted always when the mouse is moved.
- Parameters
-
mode | It is the selected mode. |
void Menu::setSkybox |
( |
QString |
skyboxName | ) |
|
|
signal |
Signal emitted to set the Skybox.
- Parameters
-
skyboxName | is the name of the Skybox to apply. |
void Menu::wheelScrolled |
( |
QWheelEvent * |
event | ) |
|
|
privateslot |
Slot invoked when the user scrolls the wheel of the mouse button.
- Parameters
-
event | is the QWheelEvent*. |
It is the alphabet provided by Qubet.
GLfloat Menu::angleRotCube |
|
private |
It is the current rotation angle of the cube.
GLfloat Menu::angleRotVolumeCube |
|
private |
It is the current rotation angle of the volume icon.
GLboolean Menu::audioEnabled |
|
private |
It is the state of the audio.
It is the camera offset for the menu.
It is the list of the current menu steps.
It is the id of the current choosen level.
GLint Menu::currentSection |
|
private |
It is used to states the menu to draw the introduction or the menu.
It is the id of the current choosen skin.
It is the value of the current view
It is the selected gameType.
QMap<GLint,GLuint> Menu::iconsList |
|
private |
It is the iconsList provided by Qubet object.
It is the variable that states if the menu is moving or not.
It is the id of the current menu action selected.
QMap<GLint,Level*> Menu::levelsList |
|
private |
It is the levelsList provided by Qubet object.
It is the main menu buttons stringList.
It is a callback variable to the parent of the widget.
QMap<GLint,Skin*> Menu::skinsList |
|
private |
It is the skinsList provided by Qubet object.
It is the spin step of the skin selection cube.
It is the skin of the volume button
It is an incremental variable to wait from intro screens.
The documentation for this class was generated from the following files: