The Battle for Wesnoth  1.17.0-dev
hotkey_handler_mp.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2021
3  by Chris Beck <render787@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 /**
17  * @file
18  * An extension of playsingle_controller::hotkey_handler, which has support for
19  * MP wesnoth features like network traffic
20  */
21 
22 #pragma once
23 
24 #include "playmp_controller.hpp"
26 
28 
29 protected:
31 
32 public:
35 
36  virtual void whisper() override;
37  virtual void shout() override;
38  virtual void start_network() override;
39  virtual void stop_network() override;
40  virtual bool can_execute_command(const hotkey::hotkey_command& command, int index=-1) const override;
41 
42 };
hotkey_handler(playmp_controller &, saved_game &)
virtual void start_network() override
Stores all information related to functions that can be bound to hotkeys.
virtual void stop_network() override
An extension of play_controller::hotkey_handler, which has support for SP wesnoth features like white...
std::size_t index(const std::string &str, const std::size_t index)
Codepoint index corresponding to the nth character in a UTF-8 string.
Definition: unicode.cpp:72
virtual bool can_execute_command(const hotkey::hotkey_command &command, int index=-1) const override
Check if a command can be executed.