YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
GameMenu.cpp
Go to the documentation of this file.
1
#include "
YAPOG/Audio/AudioManager.hpp
"
2
3
#include "
Gui/GameMenu.hpp
"
4
5
namespace
ycl
6
{
7
8
GameMenu::GameMenu
(
9
yap::Menu::Type
menuType,
10
const
yap::Padding
& ext,
11
const
yap::Padding
& in,
12
bool
fixed)
13
: Menu (menuType, ext, in, fixed)
14
{
15
}
16
17
GameMenu::~GameMenu
()
18
{
19
}
20
21
bool
GameMenu::HandleOnEvent
(
const
yap::GuiEvent
& guiEvent)
22
{
23
if
(
yap::Menu::HandleOnEvent
(guiEvent))
24
return
true
;
25
26
if
(guiEvent.type == sf::Event::KeyPressed)
27
return
true
;
28
29
return
false
;
30
}
31
32
void
GameMenu::HandleItemActivated
()
33
{
34
yap::Menu::HandleItemActivated
();
35
36
// Play a sound
37
yap::AudioManager::Instance
().
PlaySound
(
"SE/Choose.wav"
);
38
}
39
40
void
GameMenu::HandleItemSelected
()
41
{
42
yap::Menu::HandleItemSelected
();
43
44
// Play a sound
45
yap::AudioManager::Instance
().
PlaySound
(
"SE/Select.wav"
);
46
}
47
48
}
// namespace ycl
YAPOG.Client
src
Gui
GameMenu.cpp
Generated on Mon Sep 17 2012 22:24:21 for YAPOG by
1.8.1.1