Added a 4th help tab describing multiplayer play, after suggestion to do so on IRC
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6070 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
874e365661
commit
51b1ffcf85
@ -12,6 +12,8 @@
|
||||
I18N="Tab in help menu" text="Weapons"/>
|
||||
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
|
||||
I18N="Tab in help menu" text="Game Modes"/>
|
||||
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
|
||||
I18N="Tab in help menu" text="Multiplayer"/>
|
||||
</tabs>
|
||||
|
||||
<box proportion="1" width="100%" layout="vertical-row">
|
||||
|
@ -12,6 +12,8 @@
|
||||
I18N="Tab in help menu" text="Weapons"/>
|
||||
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
|
||||
I18N="Tab in help menu" text="Game Modes"/>
|
||||
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
|
||||
I18N="Tab in help menu" text="Multiplayer"/>
|
||||
</tabs>
|
||||
|
||||
<box proportion="1" width="100%" layout="vertical-row">
|
||||
|
@ -12,6 +12,8 @@
|
||||
I18N="Tab in help menu" text="Weapons"/>
|
||||
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
|
||||
I18N="Tab in help menu" text="Game Modes"/>
|
||||
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
|
||||
I18N="Tab in help menu" text="Multiplayer"/>
|
||||
</tabs>
|
||||
|
||||
<box proportion="1" width="100%" layout="vertical-row">
|
||||
|
46
data/gui/help4.stkgui
Normal file
46
data/gui/help4.stkgui
Normal file
@ -0,0 +1,46 @@
|
||||
<stkgui>
|
||||
|
||||
<div x="2%" y="2%" width="96%" height="96%" layout="vertical-row" >
|
||||
|
||||
<header align="center" width="100%" text="SuperTuxKart Help" text_align="center"/>
|
||||
<spacer height="15" width="10"/>
|
||||
|
||||
<tabs id="category" height="10%" max_height="110" width="100%" align="center">
|
||||
<icon-button id="page1" width="128" height="128" icon="gui/track_random.png"
|
||||
I18N="Tab in help menu" text="General"/>
|
||||
<icon-button id="page2" width="128" height="128" icon="gui/weapons.png"
|
||||
I18N="Tab in help menu" text="Weapons"/>
|
||||
<icon-button id="page3" width="128" height="128" icon="gui/mode_ftl.png"
|
||||
I18N="Tab in help menu" text="Game Modes"/>
|
||||
<icon-button id="page4" width="128" height="128" icon="gui/options_input.png"
|
||||
I18N="Tab in help menu" text="Multiplayer"/>
|
||||
</tabs>
|
||||
|
||||
<box proportion="1" width="100%" layout="vertical-row">
|
||||
<label align="center" text="SuperTuxKart can be played in multiplayer mode on the same computer"/>
|
||||
<label align="center" text="(network play is not yet available)"/>
|
||||
|
||||
<div width="100%" proportion="2" layout="horizontal-row">
|
||||
<icon align="center" width="64" height="64" icon="gui/options_input.png"/>
|
||||
<spacer width="25" height="25"/>
|
||||
<bubble proportion="1" height="100%"
|
||||
I18N="In the help menu"
|
||||
text="First, you will need several input devices (having multiple gamepads or joysticks is the best way to play with several people). Go in the input configuration screen and setup the gamepads. It is also possible to play on keyboard(s), however each player will need a different set of keys, and keep in mind that most keyboards are not appropriate for multiplayer gameplay because they do not support large number of keypresses."/>
|
||||
</div>
|
||||
|
||||
<div width="100%" proportion="2" layout="horizontal-row">
|
||||
<icon align="center" width="64" height="64" icon="gui/random_kart.png"/>
|
||||
<spacer width="25" height="25"/>
|
||||
<bubble proportion="1" height="100%"
|
||||
I18N="In the help menu"
|
||||
text="When input devices are configured, you are ready to play. Simply start a new race by selecting the race icon in the main menu. When it is time to choose a kart, each player can press on the 'fire' key of their gamepad or keyboard to join the game. Each player can use their input device to select their kart. The game continues when everyone selected their kart. Note that the mouse may not be used for this operation."/>
|
||||
</div>
|
||||
<spacer width="50" height="25" />
|
||||
</box>
|
||||
<spacer width="50" height="45" />
|
||||
</div>
|
||||
|
||||
<button id="back" x="20" y="-40" width="250" height="35" align="left"
|
||||
I18N="In the help menu, to return to the previous screen" text="Back"/>
|
||||
|
||||
</stkgui>
|
@ -306,6 +306,8 @@ supertuxkart_SOURCES = \
|
||||
states_screens/help_screen_2.hpp \
|
||||
states_screens/help_screen_3.cpp \
|
||||
states_screens/help_screen_3.hpp \
|
||||
states_screens/help_screen_4.cpp \
|
||||
states_screens/help_screen_4.hpp \
|
||||
states_screens/kart_selection.cpp \
|
||||
states_screens/kart_selection.hpp \
|
||||
states_screens/main_menu_screen.cpp \
|
||||
|
@ -7,6 +7,7 @@
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
95017B41124698C400C90D56 /* help_screen_4.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 95017B3F124698C400C90D56 /* help_screen_4.cpp */; };
|
||||
9507E9B70FC1CCE900BD2B92 /* stk.icns in Resources */ = {isa = PBXBuildFile; fileRef = 9507E9B60FC1CCE900BD2B92 /* stk.icns */; };
|
||||
9507E9D10FC1CDCE00BD2B92 /* Ogg.framework in Copy frameworks */ = {isa = PBXBuildFile; fileRef = 9551C7F90FC1B63C00DB481B /* Ogg.framework */; };
|
||||
9507E9D20FC1CDCE00BD2B92 /* OpenAL.framework in Copy frameworks */ = {isa = PBXBuildFile; fileRef = 9551C7FA0FC1B63C00DB481B /* OpenAL.framework */; };
|
||||
@ -318,6 +319,8 @@
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
95017B3F124698C400C90D56 /* help_screen_4.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = help_screen_4.cpp; path = ../../states_screens/help_screen_4.cpp; sourceTree = SOURCE_ROOT; };
|
||||
95017B40124698C400C90D56 /* help_screen_4.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = help_screen_4.hpp; path = ../../states_screens/help_screen_4.hpp; sourceTree = SOURCE_ROOT; };
|
||||
9505570E0F6963790056E88C /* file_manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_manager.cpp; path = ../../io/file_manager.cpp; sourceTree = SOURCE_ROOT; };
|
||||
9505570F0F6963790056E88C /* file_manager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = file_manager.hpp; path = ../../io/file_manager.hpp; sourceTree = SOURCE_ROOT; };
|
||||
9505574E0F69684D0056E88C /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
|
||||
@ -1349,6 +1352,8 @@
|
||||
9522F1E110795EFF0067ECF5 /* help_screen_2.hpp */,
|
||||
9522F1E410795EFF0067ECF5 /* help_screen_3.cpp */,
|
||||
9522F1E310795EFF0067ECF5 /* help_screen_3.hpp */,
|
||||
95017B3F124698C400C90D56 /* help_screen_4.cpp */,
|
||||
95017B40124698C400C90D56 /* help_screen_4.hpp */,
|
||||
958330C410122B4A00C5137E /* kart_selection.cpp */,
|
||||
958330C510122B4A00C5137E /* kart_selection.hpp */,
|
||||
9522F124107948AD0067ECF5 /* main_menu_screen.cpp */,
|
||||
@ -2654,6 +2659,7 @@
|
||||
9552C1FB1231249000347B6C /* world_with_rank.cpp in Sources */,
|
||||
956B0A9F1232D2E900767CCD /* bubble_widget.cpp in Sources */,
|
||||
954378D51238493C00F57707 /* confirm_dialog.cpp in Sources */,
|
||||
95017B41124698C400C90D56 /* help_screen_4.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "guiengine/widgets/ribbon_widget.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/state_manager.hpp"
|
||||
|
||||
using namespace GUIEngine;
|
||||
@ -51,6 +52,7 @@ void HelpScreen1::eventCallback(Widget* widget, const std::string& name, const i
|
||||
//else
|
||||
if (selection == "page2") StateManager::get()->replaceTopMostScreen(HelpScreen2::getInstance());
|
||||
else if (selection == "page3") StateManager::get()->replaceTopMostScreen(HelpScreen3::getInstance());
|
||||
else if(selection == "page4") StateManager::get()->replaceTopMostScreen(HelpScreen4::getInstance());
|
||||
}
|
||||
else if (name == "back")
|
||||
{
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||
#include "states_screens/help_screen_1.hpp"
|
||||
#include "states_screens/help_screen_3.hpp"
|
||||
#include "states_screens/help_screen_4.hpp"
|
||||
#include "states_screens/state_manager.hpp"
|
||||
|
||||
using namespace GUIEngine;
|
||||
@ -50,6 +51,7 @@ void HelpScreen2::eventCallback(Widget* widget, const std::string& name, const i
|
||||
if(selection == "page1") StateManager::get()->replaceTopMostScreen(HelpScreen1::getInstance());
|
||||
//else if(selection == "page2") StateManager::get()->replaceTopMostScreen(HelpScreen2::getInstance());
|
||||
else if(selection == "page3") StateManager::get()->replaceTopMostScreen(HelpScreen3::getInstance());
|
||||
else if(selection == "page4") StateManager::get()->replaceTopMostScreen(HelpScreen4::getInstance());
|
||||
}
|
||||
else if (name == "back")
|
||||
{
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "modes/world.hpp"
|
||||
#include "states_screens/help_screen_1.hpp"
|
||||
#include "states_screens/help_screen_2.hpp"
|
||||
#include "states_screens/help_screen_4.hpp"
|
||||
#include "states_screens/state_manager.hpp"
|
||||
|
||||
using namespace GUIEngine;
|
||||
@ -51,6 +52,7 @@ void HelpScreen3::eventCallback(Widget* widget, const std::string& name, const i
|
||||
if (selection == "page1") StateManager::get()->replaceTopMostScreen(HelpScreen1::getInstance());
|
||||
else if (selection == "page2") StateManager::get()->replaceTopMostScreen(HelpScreen2::getInstance());
|
||||
//else if(selection == "page3") StateManager::get()->replaceTopMostScreen(Help3Screen::getInstance());
|
||||
else if(selection == "page4") StateManager::get()->replaceTopMostScreen(HelpScreen4::getInstance());
|
||||
}
|
||||
else if (name == "back")
|
||||
{
|
||||
|
72
src/states_screens/help_screen_4.cpp
Normal file
72
src/states_screens/help_screen_4.cpp
Normal file
@ -0,0 +1,72 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2009 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/help_screen_4.hpp"
|
||||
|
||||
#include "guiengine/widget.hpp"
|
||||
#include "guiengine/widgets/ribbon_widget.hpp"
|
||||
#include "modes/world.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/state_manager.hpp"
|
||||
|
||||
using namespace GUIEngine;
|
||||
|
||||
DEFINE_SCREEN_SINGLETON( HelpScreen4 );
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
HelpScreen4::HelpScreen4() : Screen("help4.stkgui")
|
||||
{
|
||||
} // HelpScreen4
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void HelpScreen4::loadedFromFile()
|
||||
{
|
||||
} // loadedFromFile
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void HelpScreen4::eventCallback(Widget* widget, const std::string& name, const int playerID)
|
||||
{
|
||||
if (name == "category")
|
||||
{
|
||||
std::string selection = ((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER).c_str();
|
||||
|
||||
if (selection == "page1") StateManager::get()->replaceTopMostScreen(HelpScreen1::getInstance());
|
||||
else if (selection == "page2") StateManager::get()->replaceTopMostScreen(HelpScreen2::getInstance());
|
||||
else if(selection == "page3") StateManager::get()->replaceTopMostScreen(HelpScreen2::getInstance());
|
||||
}
|
||||
else if (name == "back")
|
||||
{
|
||||
StateManager::get()->escapePressed();
|
||||
}
|
||||
} // eventCallback
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
||||
|
||||
void HelpScreen4::init()
|
||||
{
|
||||
Screen::init();
|
||||
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
|
||||
|
||||
if (w != NULL) w->select( "page4", PLAYER_ID_GAME_MASTER );
|
||||
} // init
|
||||
|
||||
// ------------------------------------------------------------------------------------------------------
|
48
src/states_screens/help_screen_4.hpp
Normal file
48
src/states_screens/help_screen_4.hpp
Normal file
@ -0,0 +1,48 @@
|
||||
// SuperTuxKart - a fun racing game with go-kart
|
||||
// Copyright (C) 2009 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_HELP_SCREEN_4_HPP
|
||||
#define HEADER_HELP_SCREEN_4_HPP
|
||||
|
||||
#include "guiengine/screen.hpp"
|
||||
|
||||
namespace GUIEngine { class Widget; }
|
||||
|
||||
/**
|
||||
* \brief Help screen, part 4
|
||||
* \ingroup states_screens
|
||||
*/
|
||||
class HelpScreen4 : public GUIEngine::Screen, public GUIEngine::ScreenSingleton<HelpScreen4>
|
||||
{
|
||||
friend class GUIEngine::ScreenSingleton<HelpScreen4>;
|
||||
|
||||
HelpScreen4();
|
||||
|
||||
public:
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void loadedFromFile();
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void eventCallback(GUIEngine::Widget* widget, const std::string& name, const int playerID);
|
||||
|
||||
/** \brief implement callback from parent class GUIEngine::Screen */
|
||||
virtual void init();
|
||||
|
||||
};
|
||||
|
||||
#endif
|
Loading…
x
Reference in New Issue
Block a user