YAPOG  0.0.1
Yet Another Pokemon Online Game
BattleMoveInfoMenu.cpp
Go to the documentation of this file.
6 
8 
9 namespace ycl
10 {
12  : BaseBattleWidget ()
13  , pp_ ()
14  , type_ ()
15  {
16  yap::WidgetBackground* menuBck =
18  "WindowSkins/BasicSkin/Global/WindowBackgroundTexture.png", true);
19 
20  yap::Texture* t = new yap::Texture ();
21  t->LoadFromFile ("WindowSkins/BasicSkin/Global/TopBorder.png");
22  yap::Texture* tr = new yap::Texture ();
23  tr->LoadFromFile ("WindowSkins/BasicSkin/Global/TopRightCorner.png");
24  yap::Texture* r = new yap::Texture ();
25  r->LoadFromFile ("WindowSkins/BasicSkin/Global/RightBorder.png");
26  yap::Texture* br = new yap::Texture ();
27  br->LoadFromFile ("WindowSkins/BasicSkin/Global/BottomRightCorner.png");
28  yap::Texture* b = new yap::Texture ();
29  b->LoadFromFile ("WindowSkins/BasicSkin/Global/BottomBorder.png");
30  yap::Texture* bl = new yap::Texture ();
31  bl->LoadFromFile ("WindowSkins/BasicSkin/Global/BottomLeftCorner.png");
32  yap::Texture* l = new yap::Texture ();
33  l->LoadFromFile ("WindowSkins/BasicSkin/Global/LeftBorder.png");
34  yap::Texture* tl = new yap::Texture ();
35  tl->LoadFromFile ("WindowSkins/BasicSkin/Global/TopLeftCorner.png");
36 
37  yap::WidgetBorder* menuBorder =
38  new yap::WidgetBorder (*t, *tr, *r, *br, *b, *bl, *l, *tl, true);
39 
40  this->SetSize (yap::Vector2 (231, 129));
41 
42  type_.SetPicture (new yap::Sprite ("Pictures/Types/0.png"));
43 
44  pp_.Move (yap::Vector2 (85, 20));
45  type_.Move (yap::Vector2 (70, 70));
46 
47  this->AddChild (pp_);
48  this->AddChild (type_);
49 
50  SetBackground (*menuBck);
51  SetBorder (*menuBorder);
52  }
53 
55  {
56  }
57 
60  {
61  pp_.SetText (value);
62  }
63 
65  {
66  pp_.SetText (
68  "/" +
70  }
71 
73  {
74  type_.Show (true);
75 
76  type_.SetPicture (new yap::Sprite ("Pictures/Types/" +
78  + ".png"));
79  }
80 
82  {
83  type_.Show (false);
84  }
85 
86 } // namespace yap