#include <quit.h>
Inheritance diagram for hoa_quit::QuitMode:


Public Member Functions | |
| void | Draw () |
| Draws the next frame to be displayed on the screen. | |
| QuitMode () | |
| void | Reset () |
| Resets appropriate class members. Called whenever PauseMode is made the active game mode. | |
| void | Update () |
| Updates the game state by the amount of time that has elapsed. | |
| ~QuitMode () | |
Private Member Functions | |
| void | _Cancel () |
| Helper function which cancels out of quit mode. | |
| void | _QuitGame () |
| Helper function which quits the game. | |
| void | _QuitToBootMenu () |
| Helper function which quits to the boot menu. | |
Private Attributes | |
| hoa_video::OptionBox | _option_box |
| The option box which presents the quit options that the user can select. | |
| hoa_video::StillImage | _quit_menu |
| An image of the quit menu. | |
| uint8 | _quit_type |
| The currently selected quit option. | |
| hoa_video::StillImage | _saved_screen |
| An image of the last frame shown on the screen before QuitMode was called. | |
****************************************************************************
There are three options that the user may select when in quit mode:
This game mode can be reached in two different ways:
If either of these events occurs and QuitMode is already the active game mode, that effectively selects the Quit Game option and the game exits without further warning.
2) During some scenes of the game you might need the audio to be synchronized with the flow of action. If the user tries to quit the game you will want to pause the audio so the audio doesn't go out of synch with the action. In order to do this, when you begin such a scene you need to call the SetPauseVolumeAction() function of the GameSettings class with the argument SETTINGS_PAUSE_AUDIO. When you are finished with this type of scene, you must must MUST remember to set this member back to its original value.
Definition at line 81 of file quit.h.
| hoa_quit::QuitMode::QuitMode | ( | ) |
Definition at line 41 of file quit.cpp.
References _option_box, _saved_screen, hoa_video::GameVideo::CaptureScreen(), hoa_utils::MakeUnicodeString(), hoa_mode_manager::MODE_MANAGER_QUIT_MODE, hoa_mode_manager::GameMode::mode_type, hoa_quit::private_quit::QUIT_CANCEL, hoa_quit::QUIT_DEBUG, hoa_video::private_video::GUIElement::SetAlignment(), hoa_video::OptionBox::SetCellSize(), hoa_video::OptionBox::SetCursorOffset(), hoa_video::OptionBox::SetFont(), hoa_video::OptionBox::SetOptionAlignment(), hoa_video::OptionBox::SetOptions(), hoa_video::private_video::GUIElement::SetPosition(), hoa_video::OptionBox::SetSelection(), hoa_video::OptionBox::SetSelectMode(), hoa_video::OptionBox::SetSize(), hoa_video::VIDEO_SELECT_SINGLE, hoa_video::VIDEO_X_CENTER, hoa_video::VIDEO_Y_CENTER, and hoa_video::VideoManager.
Here is the call graph for this function:

| hoa_quit::QuitMode::~QuitMode | ( | ) |
Definition at line 94 of file quit.cpp.
References _saved_screen, hoa_video::GameVideo::DeleteImage(), hoa_quit::QUIT_DEBUG, and hoa_video::VideoManager.
Here is the call graph for this function:

| void hoa_quit::QuitMode::_Cancel | ( | ) | [private] |
Helper function which cancels out of quit mode.
Definition at line 225 of file quit.cpp.
References hoa_mode_manager::ModeManager, hoa_mode_manager::GameModeManager::Pop(), and hoa_input::TEMP_HandlePause().
Referenced by Update().
Here is the call graph for this function:

| void hoa_quit::QuitMode::_QuitGame | ( | ) | [private] |
Helper function which quits the game.
Definition at line 197 of file quit.cpp.
References hoa_system::GameSystem::ExitGame(), and hoa_system::SystemManager.
Referenced by Update().
Here is the call graph for this function:

| void hoa_quit::QuitMode::_QuitToBootMenu | ( | ) | [private] |
Helper function which quits to the boot menu.
Definition at line 204 of file quit.cpp.
References hoa_mode_manager::ModeManager, hoa_mode_manager::GameModeManager::PopAll(), and hoa_mode_manager::GameModeManager::Push().
Referenced by Update().
Here is the call graph for this function:

| void hoa_quit::QuitMode::Draw | ( | ) | [virtual] |
Draws the next frame to be displayed on the screen.
Implements hoa_mode_manager::GameMode.
Definition at line 172 of file quit.cpp.
References _option_box, _quit_menu, _saved_screen, hoa_video::OptionBox::Draw(), hoa_video::GameVideo::DrawImage(), hoa_video::GameVideo::GetHeight(), hoa_video::GameVideo::GetWidth(), hoa_video::GameVideo::Move(), hoa_video::GameVideo::SetCoordSys(), hoa_video::GameVideo::SetDrawFlags(), hoa_video::VIDEO_X_CENTER, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_BOTTOM, hoa_video::VIDEO_Y_CENTER, and hoa_video::VideoManager.
Here is the call graph for this function:

| void hoa_quit::QuitMode::Reset | ( | ) | [virtual] |
Resets appropriate class members. Called whenever PauseMode is made the active game mode.
Implements hoa_mode_manager::GameMode.
Definition at line 103 of file quit.cpp.
References _quit_type, hoa_quit::private_quit::QUIT_CANCEL, hoa_video::GameVideo::SetCoordSys(), hoa_video::GameVideo::SetDrawFlags(), hoa_video::GameVideo::SetFont(), hoa_video::VIDEO_BLEND, hoa_video::VIDEO_X_LEFT, hoa_video::VIDEO_Y_BOTTOM, and hoa_video::VideoManager.
Here is the call graph for this function:

| void hoa_quit::QuitMode::Update | ( | ) | [virtual] |
Updates the game state by the amount of time that has elapsed.
Implements hoa_mode_manager::GameMode.
Definition at line 116 of file quit.cpp.
References _Cancel(), _option_box, _QuitGame(), _QuitToBootMenu(), hoa_input::GameInput::CancelPress(), hoa_input::GameInput::ConfirmPress(), hoa_video::OptionBox::GetEvent(), hoa_video::OptionBox::GetSelection(), hoa_system::GameSystem::GetUpdateTime(), hoa_video::OptionBox::HandleCancelKey(), hoa_video::OptionBox::HandleConfirmKey(), hoa_video::OptionBox::HandleLeftKey(), hoa_video::OptionBox::HandleRightKey(), hoa_input::InputManager, hoa_input::GameInput::LeftPress(), hoa_quit::private_quit::QUIT_CANCEL, hoa_quit::QUIT_DEBUG, hoa_quit::private_quit::QUIT_GAME, hoa_quit::private_quit::QUIT_TO_BOOTMENU, hoa_input::GameInput::RightPress(), hoa_system::SystemManager, hoa_video::OptionBox::Update(), hoa_video::VIDEO_OPTION_CANCEL, and hoa_video::VIDEO_OPTION_CONFIRM.
Here is the call graph for this function:

The option box which presents the quit options that the user can select.
Definition at line 90 of file quit.h.
Referenced by Draw(), QuitMode(), and Update().
uint8 hoa_quit::QuitMode::_quit_type [private] |
An image of the last frame shown on the screen before QuitMode was called.
Definition at line 86 of file quit.h.
Referenced by Draw(), QuitMode(), and ~QuitMode().
1.5.1