stk-code_catmod/src/states_screens/network_kart_selection.hpp
hilnius b394bd9295 lot of code refactoring, now protocols can choose whether they receive network messages (and more generally events) in a synchronous mode (along with the main loop) or in an asynchronous mode
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/hilnius@13403 178a84e3-b1eb-0310-8ba1-8eac791a3b58
2013-08-01 19:49:57 +00:00

30 lines
1001 B
C++

#ifndef NETWORK_KART_SELECTION_HPP
#define NETWORK_KART_SELECTION_HPP
#include "states_screens/kart_selection.hpp"
#include "guiengine/screen.hpp"
class NetworkKartSelectionScreen : public KartSelectionScreen, public GUIEngine::ScreenSingleton<NetworkKartSelectionScreen>
{
friend class GUIEngine::ScreenSingleton<NetworkKartSelectionScreen>;
protected:
//!< map the id of the kart widgets to race ids
std::vector<uint8_t> m_id_mapping;
NetworkKartSelectionScreen();
virtual ~NetworkKartSelectionScreen();
virtual void playerConfirm(const int playerID);
void considerKartHovered(uint8_t widget_id, std::string selection);
public:
virtual void init() OVERRIDE;
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name,
const int playerID) OVERRIDE;
virtual bool onEscapePressed() OVERRIDE;
virtual void playerSelected(uint8_t race_id, std::string kart_name);
};
#endif // NETWORK_KART_SELECTION_HPP