Fix overworld trophy points not being displayed in mobile STK
This commit is contained in:
parent
06500e18ca
commit
01de29670a
@ -683,7 +683,7 @@ namespace GUIEngine
|
||||
#include "modes/demo_world.hpp"
|
||||
#include "modes/cutscene_world.hpp"
|
||||
#include "modes/world.hpp"
|
||||
#include "states_screens/race_gui_base.hpp"
|
||||
#include "states_screens/race_gui_overworld.hpp"
|
||||
#include "tips/tips_manager.hpp"
|
||||
#include "utils/debug.hpp"
|
||||
#include "utils/string_utils.hpp"
|
||||
@ -1335,6 +1335,13 @@ namespace GUIEngine
|
||||
if (rg != NULL) rg->renderGlobal(elapsed_time);
|
||||
}
|
||||
|
||||
if (gamestate == GAME && ModalDialog::isADialogActive() && World::getWorld())
|
||||
{
|
||||
// Show trophy points when paused
|
||||
RaceGUIOverworld* rgo = dynamic_cast<RaceGUIOverworld*>(World::getWorld()->getRaceGUI());
|
||||
if (rgo && rgo->getMultitouchGUI())
|
||||
rgo->drawTrophyPoints();
|
||||
}
|
||||
if (gamestate != GAME || is_loading)
|
||||
{
|
||||
Screen* screen = getCurrentScreen();
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "graphics/material.hpp"
|
||||
#include "graphics/material_manager.hpp"
|
||||
#include "graphics/referee.hpp"
|
||||
#include "guiengine/modaldialog.hpp"
|
||||
#include "guiengine/scalable_font.hpp"
|
||||
#include "io/file_manager.hpp"
|
||||
#include "items/attachment_manager.hpp"
|
||||
@ -573,7 +574,7 @@ void RaceGUIBase::renderPlayerView(const Camera *camera, float dt)
|
||||
const AbstractKart* kart = camera->getKart();
|
||||
if(!kart) return;
|
||||
|
||||
if (m_multitouch_gui != NULL)
|
||||
if (m_multitouch_gui != NULL && !GUIEngine::ModalDialog::isADialogActive())
|
||||
{
|
||||
m_multitouch_gui->draw(kart, viewport, scaling);
|
||||
}
|
||||
|
@ -34,7 +34,6 @@ using namespace irr;
|
||||
#include "items/powerup.hpp"
|
||||
#include "karts/abstract_kart.hpp"
|
||||
#include "karts/controller/kart_control.hpp"
|
||||
#include "modes/world.hpp"
|
||||
#include "network/protocols/client_lobby.hpp"
|
||||
#include "states_screens/race_gui_base.hpp"
|
||||
|
||||
|
@ -105,7 +105,6 @@ private:
|
||||
|
||||
/** Display items that are shown once only (for all karts). */
|
||||
void drawGlobalMiniMap ();
|
||||
void drawTrophyPoints ();
|
||||
|
||||
public:
|
||||
|
||||
@ -128,7 +127,7 @@ public:
|
||||
{ return core::dimension2du(m_map_width, m_map_height); }
|
||||
virtual void calculateMinimapSize();
|
||||
virtual void initSize();
|
||||
|
||||
void drawTrophyPoints();
|
||||
}; // RaceGUI
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user