Tinman  1.0
initial.h
Go to the documentation of this file.
1 // -*- coding:utf-8; tab-width:4; mode:cpp -*-
2 // Tinman author: Isaac Lacoba Molina
3 // Copyright (C) 2014 ISAAC LACOBA MOLINA
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18 #ifndef INITIAL_H
19 #define INITIAL_H
20 #include "state.h"
21 
22 
23 class Initial: public State {
24  CEGUI::Window* menu_window_;
25 
26  public:
27  typedef std::shared_ptr<Initial> shared;
28 
29  Initial(std::shared_ptr<Game> game);
30  virtual ~Initial();
31 
32  void enter();
33  void update(float delta);
34 
35  private:
36  bool change_state(const CEGUI::EventArgs &event);
37 
38  void add_hooks();
39  void add_hooks(const std::string& button,
40  const CEGUI::Event::Subscriber& callback);
41  void add_gui_hooks();
42  void init_gui();
43  void load_window();
44 };
45 
46 #endif
Definition: initial.h:23
void update(float delta)
Definition: initial.cpp:56
bool change_state(const CEGUI::EventArgs &event)
Definition: initial.cpp:48
void enter()
Definition: initial.cpp:29
std::shared_ptr< Initial > shared
Definition: initial.h:27
virtual ~Initial()
Definition: initial.cpp:24
Initial(std::shared_ptr< Game > game)
Definition: initial.cpp:21
CEGUI::Window * menu_window_
Definition: initial.h:24
void add_gui_hooks()
Definition: initial.cpp:67
void load_window()
Definition: initial.cpp:41
Definition: state.h:28
void init_gui()
Definition: initial.cpp:36
void add_hooks()
Definition: initial.cpp:61