Fix #166: minimal race gui shows item messages.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8782 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
13c166eae5
commit
430c86a020
@ -53,6 +53,9 @@ MinimalRaceGUI::MinimalRaceGUI()
|
||||
{
|
||||
m_enabled = true;
|
||||
|
||||
// Ignore item messages.
|
||||
ignoreUnimportantMessages();
|
||||
|
||||
// Originally m_map_height was 100, and we take 480 as minimum res
|
||||
const float scaling = irr_driver->getFrameSize().Height / 480.0f;
|
||||
// Marker texture has to be power-of-two for (old) OpenGL compliance
|
||||
|
@ -46,6 +46,7 @@
|
||||
|
||||
RaceGUIBase::RaceGUIBase()
|
||||
{
|
||||
m_ignore_unimportant_messages = false;
|
||||
m_lightning = 0.0f;
|
||||
m_max_font_height = GUIEngine::getFontHeight() + 10;
|
||||
m_small_font_max_height = GUIEngine::getSmallFontHeight() + 5;
|
||||
@ -204,9 +205,10 @@ void RaceGUIBase::drawAllMessages(const Kart* kart,
|
||||
const int x = (viewport.LowerRightCorner.X + viewport.UpperLeftCorner.X)/2;
|
||||
const int w = (viewport.LowerRightCorner.X - viewport.UpperLeftCorner.X);
|
||||
|
||||
// draw less important first, at the very bottom of the screen
|
||||
// Draw less important messages first, at the very bottom of the screen
|
||||
// unimportant messages are skipped in multiplayer, they take too much screen space
|
||||
if (race_manager->getNumLocalPlayers() < 2)
|
||||
if (race_manager->getNumLocalPlayers() < 2 &&
|
||||
!m_ignore_unimportant_messages)
|
||||
{
|
||||
for (AllMessageType::const_iterator i = m_messages.begin();
|
||||
i != m_messages.end(); ++i)
|
||||
|
@ -68,6 +68,10 @@ private:
|
||||
/** Delight in seconds between lightnings. */
|
||||
float m_lightning;
|
||||
|
||||
/** True if unimportant messags (like item messages) should not
|
||||
* be displayed. */
|
||||
bool m_ignore_unimportant_messages;
|
||||
|
||||
class TimedMessage
|
||||
{
|
||||
public:
|
||||
@ -147,6 +151,10 @@ protected:
|
||||
void drawGlobalMusicDescription();
|
||||
void drawGlobalReadySetGo ();
|
||||
|
||||
/** Instructs the base gui to ignore unimportant messages (like
|
||||
* item messages).
|
||||
*/
|
||||
void ignoreUnimportantMessages() { m_ignore_unimportant_messages = true; }
|
||||
public:
|
||||
|
||||
bool m_enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user