diff --git a/data/gui/bomb_icon.png b/data/gui/bomb_icon.png new file mode 100644 index 000000000..422cc085f Binary files /dev/null and b/data/gui/bomb_icon.png differ diff --git a/data/gui/help1.stkgui b/data/gui/help1.stkgui index f9350a807..09571a474 100644 --- a/data/gui/help1.stkgui +++ b/data/gui/help1.stkgui @@ -1,69 +1,84 @@ +
-
- +
+ - - - - - - - +
- + + + + + + + + + - -
+ + +
+ + + + + + +
-
- - - -
+
+ + + +
- +
+ + + +
- +
+ + + +
-
- -
diff --git a/data/gui/help2.stkgui b/data/gui/help2.stkgui index f5708bf1a..0a41d67f8 100644 --- a/data/gui/help2.stkgui +++ b/data/gui/help2.stkgui @@ -1,77 +1,95 @@ -
-
- - - - - - - - - - - - -
- +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
diff --git a/data/gui/help3.stkgui b/data/gui/help3.stkgui index 168346f0c..2244fab2e 100644 --- a/data/gui/help3.stkgui +++ b/data/gui/help3.stkgui @@ -1,78 +1,93 @@ -
-
- - - - - - - - - - - - -
- +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
diff --git a/data/gui/help4.stkgui b/data/gui/help4.stkgui index 60c919543..536c0a14d 100644 --- a/data/gui/help4.stkgui +++ b/data/gui/help4.stkgui @@ -1,44 +1,60 @@ -
-
- - - - - - - - - - - - -
- +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
diff --git a/data/gui/help5.stkgui b/data/gui/help5.stkgui index 62c4ee0bd..6286df924 100644 --- a/data/gui/help5.stkgui +++ b/data/gui/help5.stkgui @@ -1,49 +1,60 @@ -
-
- - - - - - - - - - - - -
- +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
diff --git a/data/gui/help6.stkgui b/data/gui/help6.stkgui new file mode 100644 index 000000000..6ff99a813 --- /dev/null +++ b/data/gui/help6.stkgui @@ -0,0 +1,77 @@ + + + +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
+
diff --git a/data/gui/help7.stkgui b/data/gui/help7.stkgui new file mode 100644 index 000000000..9e89355b0 --- /dev/null +++ b/data/gui/help7.stkgui @@ -0,0 +1,69 @@ + + + +
+
+ + +
+ + + + + + + + + + + + + + + + +
+
+
diff --git a/data/gui/networking_icon.png b/data/gui/networking_icon.png new file mode 100644 index 000000000..9aeccff75 Binary files /dev/null and b/data/gui/networking_icon.png differ diff --git a/data/gui/slipstream_icon.png b/data/gui/slipstream_icon.png new file mode 100644 index 000000000..6a3ade3c6 Binary files /dev/null and b/data/gui/slipstream_icon.png differ diff --git a/data/gui/story_mode_book.png b/data/gui/story_mode_book.png new file mode 100644 index 000000000..a533d43bd Binary files /dev/null and b/data/gui/story_mode_book.png differ diff --git a/src/states_screens/help_screen_1.cpp b/src/states_screens/help_screen_1.cpp index ec1be7b02..f9686a41f 100644 --- a/src/states_screens/help_screen_1.cpp +++ b/src/states_screens/help_screen_1.cpp @@ -32,10 +32,15 @@ #include "states_screens/help_screen_3.hpp" #include "states_screens/help_screen_4.hpp" #include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/help_screen_7.hpp" #include "states_screens/state_manager.hpp" using namespace GUIEngine; +// FIXME : it's hugely repetitive to have one class per help screen when +// THEY ALL DO THE SAME THING +// (the specialized test of this first screen is a tiny exception) // ----------------------------------------------------------------------------- HelpScreen1::HelpScreen1() : Screen("help1.stkgui") @@ -102,6 +107,10 @@ void HelpScreen1::eventCallback(Widget* widget, const std::string& name, const i screen = HelpScreen4::getInstance(); else if (selection == "page5") screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); if(screen) StateManager::get()->replaceTopMostScreen(screen); } @@ -122,7 +131,11 @@ void HelpScreen1::init() tutorial->setActive(StateManager::get()->getGameState() != GUIEngine::INGAME_MENU); - if (w != NULL) w->select( "page1", PLAYER_ID_GAME_MASTER ); + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page1", PLAYER_ID_GAME_MASTER ); + } } //init // ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_2.cpp b/src/states_screens/help_screen_2.cpp index a1493a061..0ae651a29 100644 --- a/src/states_screens/help_screen_2.cpp +++ b/src/states_screens/help_screen_2.cpp @@ -23,6 +23,8 @@ #include "states_screens/help_screen_3.hpp" #include "states_screens/help_screen_4.hpp" #include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/help_screen_7.hpp" #include "states_screens/state_manager.hpp" using namespace GUIEngine; @@ -58,6 +60,10 @@ void HelpScreen2::eventCallback(Widget* widget, const std::string& name, const i screen = HelpScreen4::getInstance(); else if (selection == "page5") screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); if(screen) StateManager::get()->replaceTopMostScreen(screen); } @@ -74,7 +80,11 @@ void HelpScreen2::init() Screen::init(); RibbonWidget* w = this->getWidget("category"); - if (w != NULL) w->select( "page2", PLAYER_ID_GAME_MASTER ); + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page2", PLAYER_ID_GAME_MASTER ); + } } // init // ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_3.cpp b/src/states_screens/help_screen_3.cpp index 74b3ff02b..8ce46f0bd 100644 --- a/src/states_screens/help_screen_3.cpp +++ b/src/states_screens/help_screen_3.cpp @@ -24,6 +24,8 @@ #include "states_screens/help_screen_2.hpp" #include "states_screens/help_screen_4.hpp" #include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/help_screen_7.hpp" #include "states_screens/state_manager.hpp" using namespace GUIEngine; @@ -60,6 +62,10 @@ void HelpScreen3::eventCallback(Widget* widget, const std::string& name, const i screen = HelpScreen4::getInstance(); else if (selection == "page5") screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); if(screen) StateManager::get()->replaceTopMostScreen(screen); } @@ -76,7 +82,11 @@ void HelpScreen3::init() Screen::init(); RibbonWidget* w = this->getWidget("category"); - if (w != NULL) w->select( "page3", PLAYER_ID_GAME_MASTER ); + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page3", PLAYER_ID_GAME_MASTER ); + } } // init // ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_4.cpp b/src/states_screens/help_screen_4.cpp index 7289c2cbf..3ac5490f0 100644 --- a/src/states_screens/help_screen_4.cpp +++ b/src/states_screens/help_screen_4.cpp @@ -24,6 +24,8 @@ #include "states_screens/help_screen_2.hpp" #include "states_screens/help_screen_3.hpp" #include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/help_screen_7.hpp" #include "states_screens/state_manager.hpp" using namespace GUIEngine; @@ -60,6 +62,10 @@ void HelpScreen4::eventCallback(Widget* widget, const std::string& name, const i // screen = HelpScreen4::getInstance(); else if (selection == "page5") screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); if(screen) StateManager::get()->replaceTopMostScreen(screen); } @@ -76,7 +82,11 @@ void HelpScreen4::init() Screen::init(); RibbonWidget* w = this->getWidget("category"); - if (w != NULL) w->select( "page4", PLAYER_ID_GAME_MASTER ); + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page4", PLAYER_ID_GAME_MASTER ); + } } // init // ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_5.cpp b/src/states_screens/help_screen_5.cpp index 842a9deda..fcc96c5ba 100644 --- a/src/states_screens/help_screen_5.cpp +++ b/src/states_screens/help_screen_5.cpp @@ -23,6 +23,8 @@ #include "states_screens/help_screen_2.hpp" #include "states_screens/help_screen_3.hpp" #include "states_screens/help_screen_4.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/help_screen_7.hpp" #include "states_screens/state_manager.hpp" using namespace GUIEngine; @@ -59,6 +61,10 @@ void HelpScreen5::eventCallback(Widget* widget, const std::string& name, const i screen = HelpScreen4::getInstance(); //else if (selection == "page5") // screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); if(screen) StateManager::get()->replaceTopMostScreen(screen); } @@ -75,7 +81,11 @@ void HelpScreen5::init() Screen::init(); RibbonWidget* w = this->getWidget("category"); - if (w != NULL) w->select( "page5", PLAYER_ID_GAME_MASTER ); + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page5", PLAYER_ID_GAME_MASTER ); + } } // init // ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_6.cpp b/src/states_screens/help_screen_6.cpp new file mode 100644 index 000000000..9bd4b112f --- /dev/null +++ b/src/states_screens/help_screen_6.cpp @@ -0,0 +1,91 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2016 C. Michael Murphey +// +// 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/help_screen_6.hpp" + +#include "guiengine/widget.hpp" +#include "guiengine/widgets/ribbon_widget.hpp" +#include "states_screens/help_screen_1.hpp" +#include "states_screens/help_screen_2.hpp" +#include "states_screens/help_screen_3.hpp" +#include "states_screens/help_screen_4.hpp" +#include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_7.hpp" +#include "states_screens/state_manager.hpp" + +using namespace GUIEngine; + +// ----------------------------------------------------------------------------- + +HelpScreen6::HelpScreen6() : Screen("help6.stkgui") +{ +} // HelpScreen6 + +// ----------------------------------------------------------------------------- + +void HelpScreen6::loadedFromFile() +{ +} // loadedFromFile + +// ----------------------------------------------------------------------------- + +void HelpScreen6::eventCallback(Widget* widget, const std::string& name, const int playerID) +{ + if (name == "category") + { + + std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER); + + Screen *screen = NULL; + if (selection == "page1") + screen = HelpScreen1::getInstance(); + else if (selection == "page2") + screen = HelpScreen2::getInstance(); + else if (selection == "page3") + screen = HelpScreen3::getInstance(); + else if (selection == "page4") + screen = HelpScreen4::getInstance(); + else if (selection == "page5") + screen = HelpScreen5::getInstance(); + //else if (selection == "page6") + // screen = HelpScreen6::getInstance(); + else if (selection == "page7") + screen = HelpScreen7::getInstance(); + if(screen) + StateManager::get()->replaceTopMostScreen(screen); + } + else if (name == "back") + { + StateManager::get()->escapePressed(); + } +} // eventCallback + +// ----------------------------------------------------------------------------- + +void HelpScreen6::init() +{ + Screen::init(); + RibbonWidget* w = this->getWidget("category"); + + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page6", PLAYER_ID_GAME_MASTER ); + } +} // init + +// ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_6.hpp b/src/states_screens/help_screen_6.hpp new file mode 100644 index 000000000..caa0bb31d --- /dev/null +++ b/src/states_screens/help_screen_6.hpp @@ -0,0 +1,49 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2016 C. Michael Murphey +// +// 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_HELP_SCREEN_6_HPP +#define HEADER_HELP_SCREEN_6_HPP + +#include "guiengine/screen.hpp" + +namespace GUIEngine { class Widget; } + +/** + * \brief Help screen, part 6 + * \ingroup states_screens + */ +class HelpScreen6 : public GUIEngine::Screen, public GUIEngine::ScreenSingleton +{ + friend class GUIEngine::ScreenSingleton; + + HelpScreen6(); + +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 diff --git a/src/states_screens/help_screen_7.cpp b/src/states_screens/help_screen_7.cpp new file mode 100644 index 000000000..4a387e7ef --- /dev/null +++ b/src/states_screens/help_screen_7.cpp @@ -0,0 +1,91 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2016 C. Michael Murphey +// +// 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/help_screen_7.hpp" + +#include "guiengine/widget.hpp" +#include "guiengine/widgets/ribbon_widget.hpp" +#include "states_screens/help_screen_1.hpp" +#include "states_screens/help_screen_2.hpp" +#include "states_screens/help_screen_3.hpp" +#include "states_screens/help_screen_4.hpp" +#include "states_screens/help_screen_5.hpp" +#include "states_screens/help_screen_6.hpp" +#include "states_screens/state_manager.hpp" + +using namespace GUIEngine; + +// ----------------------------------------------------------------------------- + +HelpScreen7::HelpScreen7() : Screen("help7.stkgui") +{ +} // HelpScreen7 + +// ----------------------------------------------------------------------------- + +void HelpScreen7::loadedFromFile() +{ +} // loadedFromFile + +// ----------------------------------------------------------------------------- + +void HelpScreen7::eventCallback(Widget* widget, const std::string& name, const int playerID) +{ + if (name == "category") + { + + std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER); + + Screen *screen = NULL; + if (selection == "page1") + screen = HelpScreen1::getInstance(); + else if (selection == "page2") + screen = HelpScreen2::getInstance(); + else if (selection == "page3") + screen = HelpScreen3::getInstance(); + else if (selection == "page4") + screen = HelpScreen4::getInstance(); + else if (selection == "page5") + screen = HelpScreen5::getInstance(); + else if (selection == "page6") + screen = HelpScreen6::getInstance(); + //else if (selection == "page7") + // screen = HelpScreen7::getInstance(); + if(screen) + StateManager::get()->replaceTopMostScreen(screen); + } + else if (name == "back") + { + StateManager::get()->escapePressed(); + } +} // eventCallback + +// ----------------------------------------------------------------------------- + +void HelpScreen7::init() +{ + Screen::init(); + RibbonWidget* w = this->getWidget("category"); + + if (w != NULL) + { + w->setFocusForPlayer(PLAYER_ID_GAME_MASTER); + w->select( "page7", PLAYER_ID_GAME_MASTER ); + } +} // init + +// ----------------------------------------------------------------------------- diff --git a/src/states_screens/help_screen_7.hpp b/src/states_screens/help_screen_7.hpp new file mode 100644 index 000000000..387b8eee4 --- /dev/null +++ b/src/states_screens/help_screen_7.hpp @@ -0,0 +1,49 @@ +// SuperTuxKart - a fun racing game with go-kart +// Copyright (C) 2016 C. Michael Murphey +// +// 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_HELP_SCREEN_7_HPP +#define HEADER_HELP_SCREEN_7_HPP + +#include "guiengine/screen.hpp" + +namespace GUIEngine { class Widget; } + +/** + * \brief Help screen, part 7 + * \ingroup states_screens + */ +class HelpScreen7 : public GUIEngine::Screen, public GUIEngine::ScreenSingleton +{ + friend class GUIEngine::ScreenSingleton; + + HelpScreen7(); + +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