Move multitouch race gui creation.
It's to avoid duplicated buttons because result gui uses gui_base too.
This commit is contained in:
parent
ba55fc7d2e
commit
65363a2fa0
@ -87,6 +87,13 @@ RaceGUI::RaceGUI()
|
||||
const float map_size = 100.0f;
|
||||
const float top_margin = 3.5f * m_font_height;
|
||||
|
||||
if (UserConfigParams::m_multitouch_enabled &&
|
||||
UserConfigParams::m_multitouch_mode != 0 &&
|
||||
race_manager->getNumLocalPlayers() == 1)
|
||||
{
|
||||
m_multitouch_gui = new RaceGUIMultitouch(this);
|
||||
}
|
||||
|
||||
// Check if we have enough space for minimap when touch steering is enabled
|
||||
if (m_multitouch_gui != NULL)
|
||||
{
|
||||
@ -139,6 +146,7 @@ RaceGUI::RaceGUI()
|
||||
//-----------------------------------------------------------------------------
|
||||
RaceGUI::~RaceGUI()
|
||||
{
|
||||
delete m_multitouch_gui;
|
||||
} // ~Racegui
|
||||
|
||||
|
||||
|
@ -101,13 +101,6 @@ RaceGUIBase::RaceGUIBase()
|
||||
|
||||
m_referee = NULL;
|
||||
m_multitouch_gui = NULL;
|
||||
|
||||
if (UserConfigParams::m_multitouch_enabled &&
|
||||
UserConfigParams::m_multitouch_mode != 0 &&
|
||||
race_manager->getNumLocalPlayers() == 1)
|
||||
{
|
||||
m_multitouch_gui = new RaceGUIMultitouch(this);
|
||||
}
|
||||
} // RaceGUIBase
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -173,7 +166,6 @@ RaceGUIBase::~RaceGUIBase()
|
||||
// If the referee is currently being shown,
|
||||
// remove it from the scene graph.
|
||||
delete m_referee;
|
||||
delete m_multitouch_gui;
|
||||
} // ~RaceGUIBase
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -86,6 +86,13 @@ RaceGUIOverworld::RaceGUIOverworld()
|
||||
|
||||
float scaling = irr_driver->getFrameSize().Height / 420.0f;
|
||||
const float map_size = 250.0f;
|
||||
|
||||
if (UserConfigParams::m_multitouch_enabled &&
|
||||
UserConfigParams::m_multitouch_mode != 0 &&
|
||||
race_manager->getNumLocalPlayers() == 1)
|
||||
{
|
||||
m_multitouch_gui = new RaceGUIMultitouch(this);
|
||||
}
|
||||
|
||||
// Check if we have enough space for minimap when touch steering is enabled
|
||||
if (m_multitouch_gui != NULL)
|
||||
@ -156,6 +163,7 @@ RaceGUIOverworld::RaceGUIOverworld()
|
||||
//-----------------------------------------------------------------------------
|
||||
RaceGUIOverworld::~RaceGUIOverworld()
|
||||
{
|
||||
delete m_multitouch_gui;
|
||||
} // ~RaceGUIOverworld
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user