Skip to content

Commit

Permalink
Menu Handler: made state gamestate/gameboard data getters public
Browse files Browse the repository at this point in the history
This is to enable the MP Change Control dialog to use them.
  • Loading branch information
Vultraz committed Apr 28, 2017
1 parent a4b3f72 commit dd5a8a6
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/menu_events.hpp
Expand Up @@ -103,6 +103,14 @@ class menu_handler : private chat_handler {
void do_command(const std::string &str);
void do_ai_formula(const std::string &str, int side_num, mouse_handler &mousehandler);
void send_to_server(const config& cfg) override;

game_state & gamestate() const;
game_data & gamedata();
game_board & board() const;
unit_map& units();
std::vector<team>& teams() const;
const gamemap& map() const;

protected:
void add_chat_message(const time_t& time, const std::string& speaker,
int side, const std::string& message,
Expand All @@ -120,13 +128,6 @@ class menu_handler : private chat_handler {
game_display* gui_;
play_controller & pc_;

game_state & gamestate() const;
game_data & gamedata();
game_board & board() const;
unit_map& units();
std::vector<team>& teams() const;
const gamemap& map() const;

const config& game_config_;

gui::floating_textbox textbox_info_;
Expand Down

0 comments on commit dd5a8a6

Please sign in to comment.