Fixed help screen bug caused by the recent move of items. Also modifying the code to make it easier to debug such kind of problem in the future (print the details to stderr, don't just assert(false))

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@5262 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2010-04-25 17:14:10 +00:00
parent e24c8a235d
commit e2e442f756
2 changed files with 13 additions and 7 deletions

View File

@@ -20,39 +20,39 @@
<spacer height="25" width="10"/>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/bubblegum-icon.png"/>
<icon align="center" width="64" height="64" icon="models/bubblegum-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true" text="BubbleGum - leave a sticky pink puddle behind you"/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/cake-icon.png"/>
<icon align="center" width="64" height="64" icon="models/cake-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true"
text="Cake - thrown at the closest rival, best on short ranges and long straights"/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/plunger-icon.png"/>
<icon align="center" width="64" height="64" icon="models/plunger-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true" text="Plunger - throw straight to pull an opponent back, or throw while looking back to make one lose sight!"/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/bowling-icon.png"/>
<icon align="center" width="64" height="64" icon="models/bowling-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true"
text="Bowling Ball - bounces off walls. If you are looking back, it will be thrown backwards."/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/parachute-icon.png"/>
<icon align="center" width="64" height="64" icon="models/parachute-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true" text="Parachute - slows down all karts in a better position!"/>
</div>
<div width="100%" proportion="1" layout="horizontal-row">
<icon align="center" width="64" height="64" icon="textures/anchor-icon.png"/>
<icon align="center" width="64" height="64" icon="models/anchor-icon.png"/>
<spacer width="25" height="25"/>
<label proportion="1" height="100%" word_wrap="true" text="Anchor - slows down greatly the kart in the first position"/>
</div>

View File

@@ -50,7 +50,13 @@ void IconButtonWidget::add()
m_texture = irr_driver->getTexture((file_manager->getDataDir() + "/" +m_properties[PROP_ICON]).c_str());
}
assert(m_texture != NULL);
if (m_texture == NULL)
{
std::cerr << "IconButtonWidget::add() : error, cannot find texture "
<< m_properties[PROP_ICON].c_str() << std::endl;
assert(false); // catch this error in debug mode
return;
}
m_texture_w = m_texture->getSize().Width;
m_texture_h = m_texture->getSize().Height;