YAPOG  0.0.1
Yet Another Pokemon Online Game
SplashScreen.cpp
Go to the documentation of this file.
7 
9 
10 namespace ycl
11 {
13  const yap::String SplashScreen::DEFAULT_SPLASH_TEXT = "Appuyez sur Start !";
14 
16  : BaseScreen (DEFAULT_NAME, context)
17  , logo_ (nullptr)
18  , splashText_ (DEFAULT_SPLASH_TEXT)
19  {
20  }
21 
23  {
24  }
25 
27  {
29 
31  Create<yap::Texture> ("Texture", yap::ID (100)));
32 
33  logo_->Scale (yap::Vector2 (0.42f, 0.42f));
35  800 / 2 - logo_->GetSize ().x / 2,
36  600 / 2 - logo_->GetSize ().y / 2));
37 
38  splashText_.ChangeColor (sf::Color::Black);
40  yap::Vector2 (
41  400 - splashText_.GetSize ().x / 2,
42  450.0f));
44  }
45 
47  {
49 
50  context_.SetTargetClearColor (sf::Color::White);
51  }
52 
54  const yap::Time& dt,
55  yap::IDrawingContext& context)
56  {
57  logo_->Draw (context);
58 
59  BaseScreen::HandleRun (dt, context);
60  }
61 
63  {
66  guiEvent))
67  {
68  nextScreen_ = "MainMenu";
69  return true;
70  }
71 
72  return false;
73  }
74 } // namespace ycl