Removed empty square which is displayed when no
items are collected (since it's confusing and looks like a bug, see r1143 on 0.3rc1 branch). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1144 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7e560d7ed8
commit
409447b2cd
@ -490,25 +490,15 @@ void RaceGUI::drawCollectableIcons ( Kart* player_kart, int offset_x,
|
|||||||
int offset_y, float ratio_x,
|
int offset_y, float ratio_x,
|
||||||
float ratio_y )
|
float ratio_y )
|
||||||
{
|
{
|
||||||
|
// If player doesn't have anything, do nothing.
|
||||||
|
Collectable* collectable=player_kart->getCollectable();
|
||||||
|
if(collectable->getType() == COLLECT_NOTHING) return;
|
||||||
|
|
||||||
// Originally the hardcoded sizes were 320-32 and 400
|
// Originally the hardcoded sizes were 320-32 and 400
|
||||||
int x1 = (int)((user_config->m_width/2-32) * ratio_x) + offset_x ;
|
int x1 = (int)((user_config->m_width/2-32) * ratio_x) + offset_x ;
|
||||||
int y1 = (int)(user_config->m_height*5/6 * ratio_y) + offset_y;
|
int y1 = (int)(user_config->m_height*5/6 * ratio_y) + offset_y;
|
||||||
|
|
||||||
int nSize=(int)(64.0f*std::min(ratio_x, ratio_y));
|
int nSize=(int)(64.0f*std::min(ratio_x, ratio_y));
|
||||||
// If player doesn't have anything, just let the transparent black square
|
|
||||||
Collectable* collectable=player_kart->getCollectable();
|
|
||||||
if(collectable->getType() == COLLECT_NOTHING)
|
|
||||||
{
|
|
||||||
glDisable(GL_TEXTURE_2D);
|
|
||||||
glBegin ( GL_QUADS ) ;
|
|
||||||
glColor4f ( 0.0f, 0.0f, 0.0f, 0.16f );
|
|
||||||
glVertex2i ( x1 , y1 );
|
|
||||||
glVertex2i ( x1+(int)(nSize), y1 );
|
|
||||||
glVertex2i ( x1+(int)(nSize), y1+(int)(nSize) );
|
|
||||||
glVertex2i ( x1 , y1+(int)(nSize) );
|
|
||||||
glEnd();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
collectable->getIcon()->apply();
|
collectable->getIcon()->apply();
|
||||||
|
|
||||||
int n = player_kart->getNumCollectables() ;
|
int n = player_kart->getNumCollectables() ;
|
||||||
|
Loading…
Reference in New Issue
Block a user