YAPOG
0.0.1
Yet Another Pokemon Online Game
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
MenuItem.hpp
Go to the documentation of this file.
1
#ifndef YAPOG_MENU_ITEM_HPP
2
# define YAPOG_MENU_ITEM_HPP
3
4
# include "
YAPOG/Macros.hpp
"
5
# include "
YAPOG/Graphics/Gui/BaseWidget.hpp
"
6
# include "
YAPOG/Graphics/Gui/Label.hpp
"
7
# include "
YAPOG/System/Event/Event.hpp
"
8
9
namespace
yap
10
{
11
class
YAPOG_LIB
MenuItem
:
public
BaseWidget
12
{
13
DISALLOW_COPY
(
MenuItem
);
14
15
public
:
16
Event<MenuItem&, const EmptyEventArgs&>
OnActivated
;
17
Event<MenuItem&, const EmptyEventArgs&>
OnSelected
;
18
19
MenuItem
();
20
MenuItem
(
bool
isScalable);
21
virtual
~
MenuItem
();
22
virtual
void
Do ();
23
virtual
bool
IsFocusable ()
const
;
24
String
GetContent ()
const
;
25
void
SetContent (
String
content);
26
27
protected
:
28
virtual
void
Refresh ();
29
virtual
Vector2
HandleGetSize ()
const
;
30
virtual
void
HandleMove (
const
Vector2
& offset);
31
virtual
void
HandleScale (
const
Vector2
& factor);
32
33
virtual
void
HandleDraw (
IDrawingContext
& context);
34
35
virtual
void
HandleShow (
bool
isVisible);
36
virtual
void
HandleChangeColor (
const
sf::Color& color);
37
38
virtual
void
HandleUpdate (
const
Time
& dt);
39
40
private
:
41
Label
label_
;
42
bool
isScalable_
;
43
44
};
45
}
// namespace yap
46
47
#endif
/* YAPOG_MENU_ITEM_HPP! */
YAPOG
include
YAPOG
Graphics
Gui
MenuItem.hpp
Generated on Mon Sep 17 2012 22:24:24 for YAPOG by
1.8.1.1