Renamed StoryModeLobby to UserScreen.

This commit is contained in:
hiker 2014-05-05 21:17:46 +10:00
parent 6010831654
commit d847e8de00
8 changed files with 35 additions and 35 deletions

View File

@ -187,9 +187,9 @@
#include "race/race_manager.hpp"
#include "replay/replay_play.hpp"
#include "replay/replay_recorder.hpp"
#include "states_screens/story_mode_lobby.hpp"
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/user_screen.hpp"
#include "states_screens/dialogs/message_dialog.hpp"
#include "tracks/track.hpp"
#include "tracks/track_manager.hpp"
@ -1287,7 +1287,7 @@ int main(int argc, char *argv[] )
if(!UserConfigParams::m_no_start_screen)
{
StateManager::get()->pushScreen(StoryModeLobbyScreen::getInstance());
StateManager::get()->pushScreen(UserScreen::getInstance());
#ifdef ENABLE_WIIUSE
// Show a dialog to allow connection of wiimotes. */
if(WiimoteManager::isEnabled())

View File

@ -27,8 +27,8 @@
#include "online/online_profile.hpp"
#include "online/profile_manager.hpp"
#include "online/servers_manager.hpp"
#include "states_screens/story_mode_lobby.hpp"
#include "states_screens/online_profile_friends.hpp"
#include "states_screens/user_screen.hpp"
#include "states_screens/dialogs/change_password_dialog.hpp"
#include "states_screens/dialogs/notification_dialog.hpp"
#include "states_screens/dialogs/user_info_dialog.hpp"
@ -143,7 +143,7 @@ namespace Online
{
PlayerManager::getCurrentPlayer()->signIn(isSuccess(), getXMLData());
GUIEngine::Screen *screen = GUIEngine::getCurrentScreen();
StoryModeLobbyScreen *login = dynamic_cast<StoryModeLobbyScreen*>(screen);
UserScreen *login = dynamic_cast<UserScreen*>(screen);
if(login)
{
if(isSuccess())

View File

@ -45,7 +45,7 @@
#include "states_screens/online_screen.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/story_mode_lobby.hpp"
#include "states_screens/user_screen.hpp"
#if DEBUG_MENU_ITEM
#include "states_screens/feature_unlocked.hpp"
#include "states_screens/grand_prix_lose.hpp"
@ -425,7 +425,7 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
StateManager::get()->pushScreen(OnlineScreen::getInstance());
else
{
StoryModeLobbyScreen *login = StoryModeLobbyScreen::getInstance();
UserScreen *login = UserScreen::getInstance();
login->setIsPopup(true);
StateManager::get()->pushScreen(login);
}

View File

@ -35,7 +35,7 @@
#include "states_screens/options_screen_video.hpp"
#include "states_screens/options_screen_ui.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/story_mode_lobby.hpp"
#include "states_screens/user_screen.hpp"
#include <IGUIButton.h>
@ -186,7 +186,7 @@ void OptionsScreenPlayers::eventCallback(Widget* widget, const std::string& name
{
race_manager->clearKartLastPositionOnOverworld();
PlayerManager::get()->setCurrentPlayer(NULL,false);
StateManager::get()->pushScreen(StoryModeLobbyScreen::getInstance());
StateManager::get()->pushScreen(UserScreen::getInstance());
}
} // eventCallback

View File

@ -28,7 +28,7 @@
#include "states_screens/dialogs/message_dialog.hpp"
#include "states_screens/main_menu_screen.hpp"
#include "states_screens/state_manager.hpp"
#include "states_screens/story_mode_lobby.hpp"
#include "states_screens/user_screen.hpp"
#include "utils/log.hpp"
#include "utils/translation.hpp"
@ -187,7 +187,7 @@ void RegisterScreen::eventCallback(Widget* widget, const std::string& name,
((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER);
StateManager *sm = StateManager::get();
if (selection == "tab_login")
sm->replaceTopMostScreen(StoryModeLobbyScreen::getInstance());
sm->replaceTopMostScreen(UserScreen::getInstance());
}
else if (name=="options")
{

View File

@ -15,7 +15,7 @@
// 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/story_mode_lobby.hpp"
#include "states_screens/user_screen.hpp"
#include "audio/sfx_manager.hpp"
#include "challenges/unlock_manager.hpp"
@ -34,25 +34,25 @@
using namespace GUIEngine;
DEFINE_SCREEN_SINGLETON( StoryModeLobbyScreen );
DEFINE_SCREEN_SINGLETON( UserScreen );
// ----------------------------------------------------------------------------
StoryModeLobbyScreen::StoryModeLobbyScreen() : Screen("story_mode_lobby.stkgui")
UserScreen::UserScreen() : Screen("user_screen.stkgui")
{
m_is_popup_window = false;
} // StoryModeLobbyScreen
} // UserScreen
// ----------------------------------------------------------------------------
void StoryModeLobbyScreen::loadedFromFile()
void UserScreen::loadedFromFile()
{
} // loadedFromFile
// ----------------------------------------------------------------------------
void StoryModeLobbyScreen::init()
void UserScreen::init()
{
m_login_successful = false;
m_online_cb = getWidget<CheckBoxWidget>("online");
@ -102,7 +102,7 @@ void StoryModeLobbyScreen::init()
// ----------------------------------------------------------------------------
void StoryModeLobbyScreen::tearDown()
void UserScreen::tearDown()
{
Screen::tearDown();
} // tearDown
@ -111,7 +111,7 @@ void StoryModeLobbyScreen::tearDown()
/** Called when a user is selected. It updates the online checkbox and
* entrye fields.
*/
void StoryModeLobbyScreen::selectUser(int index)
void UserScreen::selectUser(int index)
{
PlayerProfile *profile = PlayerManager::get()->getPlayer(index);
assert(profile);
@ -153,7 +153,7 @@ void StoryModeLobbyScreen::selectUser(int index)
* \param online Online state, which dicates if the entry fields are
* visible (true) or not.
*/
void StoryModeLobbyScreen::makeEntryFieldsVisible(bool online)
void UserScreen::makeEntryFieldsVisible(bool online)
{
getWidget<LabelWidget>("label_username")->setVisible(online);
m_username_tb->setVisible(online);
@ -164,7 +164,7 @@ void StoryModeLobbyScreen::makeEntryFieldsVisible(bool online)
// ----------------------------------------------------------------------------
/** Called when the user selects anything on the screen.
*/
void StoryModeLobbyScreen::eventCallback(Widget* widget,
void UserScreen::eventCallback(Widget* widget,
const std::string& name,
const int player_id)
{
@ -237,7 +237,7 @@ void StoryModeLobbyScreen::eventCallback(Widget* widget,
* \param remember_me True if the login details should be remembered,
* so that next time this menu can be skipped.
*/
void StoryModeLobbyScreen::login(bool remember_me)
void UserScreen::login(bool remember_me)
{
m_options_widget->setDeactivated();
@ -292,7 +292,7 @@ void StoryModeLobbyScreen::login(bool remember_me)
/** Called once every frame. It will replace this screen with the main menu
* screen if a successful login happened.
*/
void StoryModeLobbyScreen::onUpdate(float dt)
void UserScreen::onUpdate(float dt)
{
if (!m_options_widget->isActivated())
m_info_widget->setText(Online::Messages::loadingDots( _("Signing in")),
@ -313,7 +313,7 @@ void StoryModeLobbyScreen::onUpdate(float dt)
// ----------------------------------------------------------------------------
/** Callback from player profile if login was successful.
*/
void StoryModeLobbyScreen::loginSuccessful()
void UserScreen::loginSuccessful()
{
// The callback is done from the main thread, so no need to sync
// access to m_success
@ -324,7 +324,7 @@ void StoryModeLobbyScreen::loginSuccessful()
/** Callback from player profile if login was unsuccessful.
* \param error_message Contains the error message.
*/
void StoryModeLobbyScreen::loginError(const irr::core::stringw & error_message)
void UserScreen::loginError(const irr::core::stringw & error_message)
{
sfx_manager->quickSound("anvil");
m_info_widget->setErrorColor();
@ -333,7 +333,7 @@ void StoryModeLobbyScreen::loginError(const irr::core::stringw & error_message)
} // loginError
// ----------------------------------------------------------------------------
void StoryModeLobbyScreen::unloaded()
void UserScreen::unloaded()
{
} // unloaded
@ -343,7 +343,7 @@ void StoryModeLobbyScreen::unloaded()
* to open the next dialog, which is the one to create a new player (which
* is conventient on a first start).
*/
void StoryModeLobbyScreen::onDialogClose()
void UserScreen::onDialogClose()
{
// To allow players to exit the game without creating a player, we count
// how often this function was called. The first time is after the
@ -367,7 +367,7 @@ void StoryModeLobbyScreen::onDialogClose()
// ----------------------------------------------------------------------------
/** This is a callback from the new user dialog.
*/
void StoryModeLobbyScreen::onNewPlayerWithName(const core::stringw& new_name)
void UserScreen::onNewPlayerWithName(const core::stringw& new_name)
{
init();
// Select the newly added player

View File

@ -16,8 +16,8 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef __HEADER_STORY_MODE_LOBBY_HPP__
#define __HEADER_STORY_MODE_LOBBY_HPP__
#ifndef __HEADER_USER_SCREEN_HPP__
#define __HEADER_USER_SCREEN_HPP__
#include <string>
@ -37,11 +37,11 @@ namespace GUIEngine
* \brief Audio options screen
* \ingroup states_screens
*/
class StoryModeLobbyScreen : public GUIEngine::Screen,
class UserScreen : public GUIEngine::Screen,
public EnterPlayerNameDialog::INewPlayerListener,
public GUIEngine::ScreenSingleton<StoryModeLobbyScreen>
public GUIEngine::ScreenSingleton<UserScreen>
{
StoryModeLobbyScreen();
UserScreen();
private:
@ -78,7 +78,7 @@ private:
virtual void onUpdate(float dt) OVERRIDE;
public:
friend class GUIEngine::ScreenSingleton<StoryModeLobbyScreen>;
friend class GUIEngine::ScreenSingleton<UserScreen>;
/** \brief implement callback from parent class GUIEngine::Screen */
virtual void loadedFromFile();
@ -104,6 +104,6 @@ public:
/** True if this window is a popup window (i.e. it should not exit even if
* the current player exists. */
void setIsPopup(bool popup) { m_is_popup_window = popup; }
}; // class StoryModeLobby
}; // class UserScreen
#endif