small fix of kart color slider and kart icon in result screen (#4454)
* use default kart color instead of 100 in kart color slider * scale kart icon in race results * prevent using font->getDimension
This commit is contained in:
parent
5f6eb5e440
commit
ad5ffc4900
@ -168,7 +168,7 @@ void KartColorSliderDialog::toggleSlider()
|
|||||||
if (m_toggle_slider->getValue() == 1)
|
if (m_toggle_slider->getValue() == 1)
|
||||||
{
|
{
|
||||||
m_color_slider->setActive(true);
|
m_color_slider->setActive(true);
|
||||||
m_color_slider->setValue(100);
|
m_color_slider->setValue(int(m_player_profile->getDefaultKartColor() * 100.0f));
|
||||||
m_model_view->getModelViewRenderInfo()->setHue(1.0f);
|
m_model_view->getModelViewRenderInfo()->setHue(1.0f);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -681,8 +681,8 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
source_rect = core::recti(core::vector2di(0, 0), kart_icon->getSize());
|
source_rect = core::recti(core::vector2di(0, 0), kart_icon->getSize());
|
||||||
irr::u32 offset_x =
|
irr::u32 offset_x =
|
||||||
(irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
(irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
||||||
dest_rect = core::recti(current_x - offset_x - 30, current_y,
|
dest_rect = core::recti(current_x - offset_x - m_width_icon, current_y,
|
||||||
current_x - offset_x, current_y + 30);
|
current_x - offset_x, current_y + m_width_icon);
|
||||||
draw2DImage(kart_icon, dest_rect, source_rect, NULL, NULL, true);
|
draw2DImage(kart_icon, dest_rect, source_rect, NULL, NULL, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -729,8 +729,8 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
source_rect = core::recti(core::vector2di(0, 0), kart_icon->getSize());
|
source_rect = core::recti(core::vector2di(0, 0), kart_icon->getSize());
|
||||||
irr::u32 offset_x = (irr::u32)
|
irr::u32 offset_x = (irr::u32)
|
||||||
(font->getDimension(result_text.c_str()).Width / 1.5f);
|
(font->getDimension(result_text.c_str()).Width / 1.5f);
|
||||||
dest_rect = core::recti(current_x - offset_x - 30, current_y,
|
dest_rect = core::recti(current_x - offset_x - m_width_icon, current_y,
|
||||||
current_x - offset_x, current_y + 30);
|
current_x - offset_x, current_y + m_width_icon);
|
||||||
draw2DImage(kart_icon, dest_rect, source_rect, NULL, NULL, true);
|
draw2DImage(kart_icon, dest_rect, source_rect, NULL, NULL, true);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1505,7 +1505,8 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
{
|
{
|
||||||
source_rect = core::recti(core::vector2di(0, 0), scorer_icon->getSize());
|
source_rect = core::recti(core::vector2di(0, 0), scorer_icon->getSize());
|
||||||
irr::u32 offset_x = (irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
irr::u32 offset_x = (irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
||||||
core::recti r = core::recti(current_x - offset_x - 30, current_y, current_x - offset_x, current_y + 30);
|
core::recti r = core::recti(current_x - offset_x - m_width_icon, current_y,
|
||||||
|
current_x - offset_x, current_y + m_width_icon);
|
||||||
draw2DImage(scorer_icon, r, source_rect,
|
draw2DImage(scorer_icon, r, source_rect,
|
||||||
NULL, NULL, true);
|
NULL, NULL, true);
|
||||||
}
|
}
|
||||||
@ -1566,7 +1567,8 @@ void RaceResultGUI::displayCTFResults()
|
|||||||
{
|
{
|
||||||
source_rect = core::recti(core::vector2di(0, 0), scorer_icon->getSize());
|
source_rect = core::recti(core::vector2di(0, 0), scorer_icon->getSize());
|
||||||
irr::u32 offset_x = (irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
irr::u32 offset_x = (irr::u32)(font->getDimension(result_text.c_str()).Width / 1.5f);
|
||||||
core::recti r = core::recti(current_x - offset_x - 30, current_y, current_x - offset_x, current_y + 30);
|
core::recti r = core::recti(current_x - offset_x - m_width_icon, current_y,
|
||||||
|
current_x - offset_x, current_y + m_width_icon);
|
||||||
draw2DImage(scorer_icon, r, source_rect,
|
draw2DImage(scorer_icon, r, source_rect,
|
||||||
NULL, NULL, true);
|
NULL, NULL, true);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user