Removed empty 'online overview' page, show the achievements page instead.

This commit is contained in:
hiker 2014-10-02 07:59:24 +10:00
parent a643905053
commit de9a1f51a7
11 changed files with 14 additions and 147 deletions

View File

@ -9,9 +9,8 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_overview" width="128" height="128" icon="gui/options_ui.png" />
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_achievements" width="128" height="128" icon="gui/options_players.png" I18N="Section in the profile menu" text="Achievements"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_settings" width="128" height="128" icon="gui/main_options.png"/>
</tabs>

View File

@ -9,9 +9,8 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_overview" width="128" height="128" icon="gui/options_ui.png" />
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" I18N="Section in the profile menu" text="Friends"/>
<icon-button id="tab_achievements" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" I18N="Section in the profile menu" text="Friends"/>
<icon-button id="tab_settings" width="128" height="128" icon="gui/main_options.png"/>
</tabs>

View File

@ -9,9 +9,8 @@
<spacer height="25" width="10"/>
<tabs id="profile_tabs" height="10%" max_height="110" x="2%" width="98%" align="center">
<icon-button id="tab_overview" width="128" height="128" icon="gui/options_ui.png"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" />
<icon-button id="tab_achievements" width="128" height="128" icon="gui/options_players.png"/>
<icon-button id="tab_friends" width="128" height="128" icon="gui/options_players.png" />
<icon-button id="tab_settings" width="128" height="128" icon="gui/main_options.png" I18N="Section in the profile menu" text="Account Settings"/>
</tabs>

View File

@ -1,5 +1,5 @@
# Modify this file to change the last-modified date when you add/remove a file.
# This will then trigger a new cmake run automatically.
# This will then trigger a new cmake run automatically.
file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp")
file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp")
file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*")

View File

@ -21,8 +21,8 @@
#include "guiengine/dialog_queue.hpp"
#include "guiengine/engine.hpp"
#include "online/online_profile.hpp"
#include "states_screens/online_profile_achievements.hpp"
#include "states_screens/online_profile_friends.hpp"
#include "states_screens/online_profile_overview.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
@ -481,7 +481,7 @@ void UserInfoDialog::onUpdate(float dt)
{
ModalDialog::dismiss();
if (m_enter_profile)
StateManager::get()->replaceTopMostScreen(OnlineProfileOverview::getInstance());
StateManager::get()->replaceTopMostScreen(OnlineProfileAchievements::getInstance());
return;
}
} // onUpdate

View File

@ -42,7 +42,7 @@
#include "states_screens/grand_prix_editor_screen.hpp"
#include "states_screens/help_screen_1.hpp"
#include "states_screens/offline_kart_selection.hpp"
#include "states_screens/online_profile_overview.hpp"
#include "states_screens/online_profile_achievements.hpp"
#include "states_screens/online_screen.hpp"
#include "states_screens/options_screen_video.hpp"
#include "states_screens/state_manager.hpp"
@ -442,10 +442,10 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
}
if (PlayerManager::getCurrentOnlineId())
{
// For 0.8.2 disable the server menu, instead go to online profile
// For 0.8.2 disable the server menu, instead go to online profile
//OnlineScreen::getInstance()->push();
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
OnlineProfileOverview::getInstance()->push();
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
OnlineProfileAchievements::getInstance()->push();
}
else

View File

@ -24,7 +24,6 @@
#include "online/online_profile.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include "states_screens/online_profile_overview.hpp"
#include "states_screens/online_profile_friends.hpp"
#include "states_screens/online_profile_achievements.hpp"
#include "states_screens/online_profile_settings.hpp"
@ -52,9 +51,6 @@ void OnlineProfileBase::loadedFromFile()
m_header = getWidget<LabelWidget>("title");
assert(m_header != NULL);
m_overview_tab =
(IconButtonWidget *)m_profile_tabs->findWidgetNamed("tab_overview");
assert(m_overview_tab != NULL);
m_friends_tab =
(IconButtonWidget *) m_profile_tabs->findWidgetNamed("tab_friends");
assert(m_friends_tab != NULL);
@ -91,7 +87,6 @@ void OnlineProfileBase::init()
{
Screen::init();
m_overview_tab->setTooltip( _("Overview") );
m_friends_tab->setTooltip( _("Friends") );
m_achievements_tab->setTooltip( _("Achievements") );
m_settings_tab->setTooltip( _("Account Settings") );
@ -119,9 +114,7 @@ void OnlineProfileBase::eventCallback(Widget* widget, const std::string& name,
std::string selection =
((RibbonWidget*)widget)->getSelectionIDString(PLAYER_ID_GAME_MASTER);
StateManager *sm = StateManager::get();
if (selection == m_overview_tab->m_properties[PROP_ID])
sm->replaceTopMostScreen(OnlineProfileOverview::getInstance());
else if (selection == m_friends_tab->m_properties[PROP_ID])
if (selection == m_friends_tab->m_properties[PROP_ID])
sm->replaceTopMostScreen(OnlineProfileFriends::getInstance());
else if (selection == m_achievements_tab->m_properties[PROP_ID])
sm->replaceTopMostScreen(OnlineProfileAchievements::getInstance());

View File

@ -30,7 +30,7 @@ namespace GUIEngine { class Widget; }
/** Online profile base screen. Used for displaying friends, achievements,
* overview, and settings. It handles the tabs which are common to each
* and settings. It handles the tabs which are common to each
* of those screens, and keeps track of the profile to display.
* \ingroup states_screens
*/
@ -42,7 +42,6 @@ protected:
/** Pointer to the various widgets on the screen. */
GUIEngine::LabelWidget * m_header;
GUIEngine::RibbonWidget* m_profile_tabs;
GUIEngine::IconButtonWidget * m_overview_tab;
GUIEngine::IconButtonWidget * m_friends_tab;
GUIEngine::IconButtonWidget * m_achievements_tab;
GUIEngine::IconButtonWidget * m_settings_tab;

View File

@ -1,67 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2010 Glenn De Jonghe
//
// 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/online_profile_overview.hpp"
#include "guiengine/engine.hpp"
#include "guiengine/scalable_font.hpp"
#include "guiengine/screen.hpp"
#include "guiengine/widget.hpp"
#include "states_screens/state_manager.hpp"
#include "utils/translation.hpp"
#include <IGUIButton.h>
#include <iostream>
#include <sstream>
using namespace GUIEngine;
using namespace irr::core;
using namespace irr::gui;
using namespace Online;
DEFINE_SCREEN_SINGLETON( OnlineProfileOverview );
// -----------------------------------------------------------------------------
OnlineProfileOverview::OnlineProfileOverview() : OnlineProfileBase("online/profile_overview.stkgui")
{
} // OnlineProfileOverview
// -----------------------------------------------------------------------------
void OnlineProfileOverview::loadedFromFile()
{
OnlineProfileBase::loadedFromFile();
} // loadedFromFile
// -----------------------------------------------------------------------------
void OnlineProfileOverview::init()
{
OnlineProfileBase::init();
m_profile_tabs->select( m_overview_tab->m_properties[PROP_ID], PLAYER_ID_GAME_MASTER );
} // init
// -----------------------------------------------------------------------------
void OnlineProfileOverview::eventCallback(Widget* widget, const std::string& name, const int playerID)
{
OnlineProfileBase::eventCallback( widget, name, playerID);
} // eventCallback

View File

@ -1,55 +0,0 @@
// SuperTuxKart - a fun racing game with go-kart
// Copyright (C) 2013 Glenn De Jonghe
//
// 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_ONLINE_PROFILE_OVERVIEW_HPP__
#define __HEADER_ONLINE_PROFILE_OVERVIEW_HPP__
#include <string>
#include <irrString.h>
#include "guiengine/screen.hpp"
#include "guiengine/widgets.hpp"
#include "states_screens/online_profile_base.hpp"
namespace GUIEngine { class Widget; }
/**
* \brief Online profiel overview screen
* \ingroup states_screens
*/
class OnlineProfileOverview : public OnlineProfileBase, public GUIEngine::ScreenSingleton<OnlineProfileOverview>
{
protected:
OnlineProfileOverview();
public:
friend class GUIEngine::ScreenSingleton<OnlineProfileOverview>;
/** \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

View File

@ -40,7 +40,7 @@
#include "states_screens/networking_lobby.hpp"
#include "states_screens/server_selection.hpp"
#include "states_screens/create_server_screen.hpp"
#include "states_screens/online_profile_overview.hpp"
#include "states_screens/online_profile_achievements.hpp"
#include <string>
#include <iostream>
@ -233,7 +233,7 @@ void OnlineScreen::eventCallback(Widget* widget, const std::string& name,
else if (selection == m_profile_widget->m_properties[PROP_ID])
{
ProfileManager::get()->setVisiting(PlayerManager::getCurrentOnlineId());
OnlineProfileOverview::getInstance()->push();
OnlineProfileAchievements::getInstance()->push();
}
else if (selection == m_find_server_widget->m_properties[PROP_ID])
{