Fixed compiler warnings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4302 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2009-12-16 01:44:16 +00:00
parent b65fbd8a23
commit 9b29581c4e
2 changed files with 5 additions and 5 deletions

View File

@ -1141,7 +1141,7 @@ void Skin::process3DPane(IGUIElement *element, const core::rect< s32 > &rect, co
const core::dimension2d<u32>& texture_size = texture->getSize();
const float aspectRatio = (float)texture_size.Width / (float)texture_size.Height;
const int h = std::min( rect.getHeight()/2 , (int)(texture_size.Height) );
int w = aspectRatio*h;
int w = (int)(aspectRatio*h);
const core::rect<s32> source_area = core::rect<s32>(0, 0, texture_size.Width, texture_size.Height);

View File

@ -162,8 +162,8 @@ void RibbonWidget::add()
// size of the image
video::ITexture* image = GUIEngine::getDriver()->getTexture((file_manager->getDataDir() + "/" + m_children[i].m_properties[PROP_ICON]).c_str());
float image_h = image->getSize().Height;
float image_w = image->getSize().Width;
float image_h = (float)image->getSize().Height;
float image_w = (float)image->getSize().Width;
//float image_w = image_h*imageRatio;
// if button too high to fit, scale down
@ -176,8 +176,8 @@ void RibbonWidget::add()
m_children[i].x = widget_x - (int)(image_w*zoom/2.0f);
m_children[i].y = button_y;
m_children[i].w = image_w*zoom;
m_children[i].h = image_h*zoom;
m_children[i].w = (int)(image_w*zoom);
m_children[i].h = (int)(image_h*zoom);
//std::wcout << L"Widget has text '" << m_children[i].m_text.c_str() << "'\n";