Merge branch 'master' of https://github.com/supertuxkart/stk-code
This commit is contained in:
commit
9f0529f26f
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
<label width="100%"
|
<label width="100%"
|
||||||
I18N="In the player configuration screen"
|
I18N="In the player configuration screen"
|
||||||
text="Press enter or double-click on a player to edit him/her"
|
text="Press enter or double-click on a player to edit their settings"
|
||||||
text_align="center" />
|
text_align="center" />
|
||||||
|
|
||||||
<spacer width="5" height="20"/>
|
<spacer width="5" height="20"/>
|
||||||
|
@ -251,23 +251,30 @@ ChallengeData::ChallengeData(const std::string& filename)
|
|||||||
throw std::runtime_error("Unknown unlock entry");
|
throw std::runtime_error("Unknown unlock entry");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
core::stringw description;
|
|
||||||
if (track_node != NULL && m_minor!=RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
|
||||||
{
|
|
||||||
//I18N: number of laps to race in a challenge
|
|
||||||
description += _("Laps : %i", m_num_laps);
|
|
||||||
description += core::stringw(L"\n");
|
|
||||||
}
|
|
||||||
else if (track_node)
|
|
||||||
{
|
|
||||||
// Follow the leader mode:
|
|
||||||
description = _("Follow the leader");
|
|
||||||
}
|
|
||||||
|
|
||||||
m_challenge_description = description;
|
|
||||||
} // ChallengeData
|
} // ChallengeData
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
const irr::core::stringw ChallengeData::getChallengeDescription() const
|
||||||
|
{
|
||||||
|
core::stringw description;
|
||||||
|
if (!m_track_id.empty())
|
||||||
|
{
|
||||||
|
if (m_minor != RaceManager::MINOR_MODE_FOLLOW_LEADER)
|
||||||
|
{
|
||||||
|
//I18N: number of laps to race in a challenge
|
||||||
|
description += _("Laps: %i", m_num_laps);
|
||||||
|
description += core::stringw(L"\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Follow the leader mode:
|
||||||
|
description = _("Follow the leader");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return description;
|
||||||
|
} // getChallengeDescription
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void ChallengeData::error(const char *id) const
|
void ChallengeData::error(const char *id) const
|
||||||
{
|
{
|
||||||
|
@ -110,8 +110,6 @@ private:
|
|||||||
/** Number of trophies required to access this challenge */
|
/** Number of trophies required to access this challenge */
|
||||||
int m_num_trophies;
|
int m_num_trophies;
|
||||||
|
|
||||||
irr::core::stringw m_challenge_description;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ChallengeData(const std::string& filename);
|
ChallengeData(const std::string& filename);
|
||||||
|
|
||||||
@ -195,10 +193,7 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns the description of this challenge.
|
/** Returns the description of this challenge.
|
||||||
*/
|
*/
|
||||||
const irr::core::stringw& getChallengeDescription() const
|
const irr::core::stringw getChallengeDescription() const;
|
||||||
{
|
|
||||||
return m_challenge_description;
|
|
||||||
} // getChallengeDescription
|
|
||||||
|
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns the minimum position the player must have in order to win.
|
/** Returns the minimum position the player must have in order to win.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
//
|
//
|
||||||
// SuperTuxKart - A racing game
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
// Copyright (C) 2006-2016 SuperTuxKart Team
|
// Copyright (C) 2006-2016 SuperTuxKart-Team
|
||||||
// Modeled after Supertux's configfile.cpp
|
// Modeled after Supertux's configfile.cpp
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// SuperTuxKart - A racing game
|
// SuperTuxKart - a fun racing game with go-kart
|
||||||
// Copyright (C) 2004-2016 Steve Baker <sjbaker1@airmail.net>
|
// Copyright (C) 2004-2016 Steve Baker <sjbaker1@airmail.net>
|
||||||
// Copyright (C) 2006-2016 SuperTuxKart Team, Joerg Henrichs, Steve Baker
|
// Copyright (C) 2006-2016 SuperTuxKart-Team, Joerg Henrichs, Steve Baker
|
||||||
//
|
//
|
||||||
// This program is free software; you can redistribute it and/or
|
// This program is free software; you can redistribute it and/or
|
||||||
// modify it under the terms of the GNU General Public License
|
// modify it under the terms of the GNU General Public License
|
||||||
|
@ -277,7 +277,7 @@ void ArenasScreen::buildTrackList()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w->addItem( curr->getName(), curr->getIdent(), curr->getScreenshotFile(), 0,
|
w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
|
||||||
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
|
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -329,7 +329,7 @@ void ArenasScreen::buildTrackList()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w->addItem( curr->getName(), curr->getIdent(), curr->getScreenshotFile(), 0,
|
w->addItem( translations->fribidize(curr->getName()), curr->getIdent(), curr->getScreenshotFile(), 0,
|
||||||
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
|
IconButtonWidget::ICON_PATH_TYPE_ABSOLUTE );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#include "audio/sfx_manager.hpp"
|
#include "audio/sfx_manager.hpp"
|
||||||
#include "audio/sfx_base.hpp"
|
#include "audio/sfx_base.hpp"
|
||||||
#include "config/hardware_stats.hpp"
|
#include "config/hardware_stats.hpp"
|
||||||
|
#include "config/player_manager.hpp"
|
||||||
#include "config/user_config.hpp"
|
#include "config/user_config.hpp"
|
||||||
#include "font/bold_face.hpp"
|
#include "font/bold_face.hpp"
|
||||||
#include "font/regular_face.hpp"
|
#include "font/regular_face.hpp"
|
||||||
@ -284,8 +285,10 @@ void OptionsScreenUI::eventCallback(Widget* widget, const std::string& name, con
|
|||||||
{
|
{
|
||||||
stats->setVisible(false);
|
stats->setVisible(false);
|
||||||
stats_label->setVisible(false);
|
stats_label->setVisible(false);
|
||||||
|
PlayerProfile* profile = PlayerManager::getCurrentPlayer();
|
||||||
|
if (profile != NULL && profile->isLoggedIn())
|
||||||
|
profile->requestSignOut();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (name=="enable-hw-report")
|
else if (name=="enable-hw-report")
|
||||||
{
|
{
|
||||||
|
@ -108,6 +108,7 @@ RaceGUIOverworld::RaceGUIOverworld()
|
|||||||
m_string_lap = _("Lap");
|
m_string_lap = _("Lap");
|
||||||
m_string_rank = _("Rank");
|
m_string_rank = _("Rank");
|
||||||
|
|
||||||
|
m_active_challenge = NULL;
|
||||||
|
|
||||||
// Determine maximum length of the rank/lap text, in order to
|
// Determine maximum length of the rank/lap text, in order to
|
||||||
// align those texts properly on the right side of the viewport.
|
// align those texts properly on the right side of the viewport.
|
||||||
@ -528,7 +529,13 @@ void RaceGUIOverworld::drawGlobalMiniMap()
|
|||||||
|
|
||||||
pos.UpperLeftCorner.Y += GUIEngine::getTitleFontHeight();
|
pos.UpperLeftCorner.Y += GUIEngine::getTitleFontHeight();
|
||||||
pos.LowerRightCorner.Y = irr_driver->getActualScreenSize().Height;
|
pos.LowerRightCorner.Y = irr_driver->getActualScreenSize().Height;
|
||||||
GUIEngine::getFont()->draw(challenge->getChallengeDescription().c_str(),
|
|
||||||
|
if (m_active_challenge != challenge)
|
||||||
|
{
|
||||||
|
m_active_challenge = challenge;
|
||||||
|
m_challenge_description = challenge->getChallengeDescription();
|
||||||
|
}
|
||||||
|
GUIEngine::getFont()->draw(m_challenge_description,
|
||||||
pos, video::SColor(255,255,255,255),
|
pos, video::SColor(255,255,255,255),
|
||||||
false, false /* vcenter */, NULL);
|
false, false /* vcenter */, NULL);
|
||||||
|
|
||||||
|
@ -101,6 +101,11 @@ private:
|
|||||||
|
|
||||||
int m_trophy_points_width;
|
int m_trophy_points_width;
|
||||||
|
|
||||||
|
/** The latest challenge approached by the kart */
|
||||||
|
const ChallengeData* m_active_challenge;
|
||||||
|
|
||||||
|
core::stringw m_challenge_description;
|
||||||
|
|
||||||
/** The current challenge over which the mouse is hovering. */
|
/** The current challenge over which the mouse is hovering. */
|
||||||
const OverworldChallenge *m_current_challenge;
|
const OverworldChallenge *m_current_challenge;
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ void RaceSetupScreen::init()
|
|||||||
|
|
||||||
irr::core::stringw name5 = irr::core::stringw(
|
irr::core::stringw name5 = irr::core::stringw(
|
||||||
RaceManager::getNameOf(RaceManager::MINOR_MODE_SOCCER)) + L"\n";
|
RaceManager::getNameOf(RaceManager::MINOR_MODE_SOCCER)) + L"\n";
|
||||||
name5 += _("Push the ball to the opposite cage to score goals.");
|
name5 += _("Push the ball into the opposite cage to score goals.");
|
||||||
w2->addItem( name5, IDENT_SOCCER, RaceManager::getIconOf(RaceManager::MINOR_MODE_SOCCER));
|
w2->addItem( name5, IDENT_SOCCER, RaceManager::getIconOf(RaceManager::MINOR_MODE_SOCCER));
|
||||||
|
|
||||||
#define ENABLE_EASTER_EGG_MODE
|
#define ENABLE_EASTER_EGG_MODE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user