diff --git a/data/gui/online/waiting_for_others.stkgui b/data/gui/online/waiting_for_others.stkgui new file mode 100644 index 000000000..61a8ebb55 --- /dev/null +++ b/data/gui/online/waiting_for_others.stkgui @@ -0,0 +1,11 @@ + + +
+ +
+ + + + Waiting... +
+
diff --git a/src/states_screens/tracks_screen.cpp b/src/states_screens/tracks_screen.cpp index 2ba4dda63..0353416e5 100644 --- a/src/states_screens/tracks_screen.cpp +++ b/src/states_screens/tracks_screen.cpp @@ -33,6 +33,7 @@ #include "states_screens/state_manager.hpp" #include "states_screens/track_info_screen.hpp" #include "states_screens/gp_info_screen.hpp" +#include "states_screens/waiting_for_others.hpp" #include "tracks/track.hpp" #include "tracks/track_manager.hpp" #include "utils/translation.hpp" @@ -96,7 +97,7 @@ void TracksScreen::eventCallback(Widget* widget, const std::string& name, ClientLobbyRoomProtocol* clrp = static_cast(protocol); clrp->voteTrack(selection); - + WaitingForOthersScreen::getInstance()->push(); } else { diff --git a/src/states_screens/waiting_for_others.cpp b/src/states_screens/waiting_for_others.cpp new file mode 100644 index 000000000..3ea5eb2f2 --- /dev/null +++ b/src/states_screens/waiting_for_others.cpp @@ -0,0 +1,60 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009-2015 Marianne Gagnon +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#include "states_screens/waiting_for_others.hpp" + +#include "config/user_config.hpp" +#include "guiengine/widget.hpp" +#include "guiengine/widgets/list_widget.hpp" +#include "guiengine/widgets/ribbon_widget.hpp" +#include "input/device_manager.hpp" +#include "input/input_manager.hpp" +#include "input/keyboard_device.hpp" +#include "karts/kart_properties_manager.hpp" +#include "race/race_manager.hpp" +#include "states_screens/state_manager.hpp" + +using namespace GUIEngine; + +DEFINE_SCREEN_SINGLETON( WaitingForOthersScreen ); + +// ----------------------------------------------------------------------------- + +WaitingForOthersScreen::WaitingForOthersScreen() : Screen("online/waiting_for_others.stkgui") +{ +} // WaitingForOthersScreen + +// ----------------------------------------------------------------------------- + +void WaitingForOthersScreen::loadedFromFile() +{ +} // loadedFromFile + +// ----------------------------------------------------------------------------- + +void WaitingForOthersScreen::eventCallback(Widget* widget, const std::string& name, const int playerID) +{ +} // eventCallback + +// ----------------------------------------------------------------------------- + +void WaitingForOthersScreen::init() +{ + Screen::init(); +} //init + +// ----------------------------------------------------------------------------- diff --git a/src/states_screens/waiting_for_others.hpp b/src/states_screens/waiting_for_others.hpp new file mode 100644 index 000000000..8d4131286 --- /dev/null +++ b/src/states_screens/waiting_for_others.hpp @@ -0,0 +1,47 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2009-2015 Marianne Gagnon +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 3 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + +#ifndef HEADER_WAITING_FOR_OTHERS_HPP +#define HEADER_WAITING_FOR_OTHERS_HPP + +#include "guiengine/screen.hpp" + +namespace GUIEngine { class Widget; } + +/** + * \brief Help screen, part 1 + * \ingroup states_screens + */ +class WaitingForOthersScreen : public GUIEngine::Screen, public GUIEngine::ScreenSingleton +{ + friend class GUIEngine::ScreenSingleton; + WaitingForOthersScreen(); + +public: + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void loadedFromFile() OVERRIDE; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, + const int playerID) OVERRIDE; + + /** \brief implement callback from parent class GUIEngine::Screen */ + virtual void init() OVERRIDE; +}; + +#endif