nicer-looking tooltips
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8019 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
28aaaf4f5b
commit
1ba3e60baa
@ -185,7 +185,12 @@ when the border that intersect at this corner are enabled.
|
||||
<element type="window" image="glass/dialog.png"
|
||||
left_border="7" right_border="7" top_border="50" bottom_border="50"
|
||||
hborder_out_portion="1.0" vborder_out_portion="0.2" />
|
||||
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="tooltip" image="glass/tooltip.png"
|
||||
left_border="10" right_border="10" top_border="10" bottom_border="10"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0" />
|
||||
|
||||
<!-- Colors -->
|
||||
<color type="text" state="neutral" r="0" g="0" b="0" />
|
||||
<color type="brighttext" state="neutral" r="255" g="145" b="0" />
|
||||
|
@ -185,7 +185,12 @@ when the border that intersect at this corner are enabled.
|
||||
<element type="window" image="ocean/dialog.png"
|
||||
left_border="7" right_border="7" top_border="50" bottom_border="50"
|
||||
hborder_out_portion="1.0" vborder_out_portion="0.2" />
|
||||
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="tooltip" image="ocean/tooltip.png"
|
||||
left_border="10" right_border="10" top_border="10" bottom_border="10"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0" />
|
||||
|
||||
<!-- Colors -->
|
||||
<color type="text" state="neutral" r="0" g="0" b="0" />
|
||||
<color type="brighttext" state="neutral" r="28" g="176" b="255" />
|
||||
|
@ -185,7 +185,12 @@ when the border that intersect at this corner are enabled.
|
||||
<element type="window" image="peach/dialog.png"
|
||||
left_border="7" right_border="7" top_border="50" bottom_border="50"
|
||||
hborder_out_portion="1.0" vborder_out_portion="0.2" />
|
||||
|
||||
|
||||
<!-- Stateless -->
|
||||
<element type="tooltip" image="peach/tooltip.png"
|
||||
left_border="10" right_border="10" top_border="10" bottom_border="10"
|
||||
hborder_out_portion="1.0" vborder_out_portion="1.0" />
|
||||
|
||||
<!-- Colors -->
|
||||
<color type="text" state="neutral" r="0" g="0" b="0" />
|
||||
<color type="brighttext" state="neutral" r="255" g="145" b="0" />
|
||||
|
BIN
data/gui/skins/glass/tooltip.png
Normal file
BIN
data/gui/skins/glass/tooltip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
data/gui/skins/ocean/tooltip.png
Normal file
BIN
data/gui/skins/ocean/tooltip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
BIN
data/gui/skins/peach/tooltip.png
Normal file
BIN
data/gui/skins/peach/tooltip.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
@ -1396,6 +1396,8 @@ void Skin::drawTooltips()
|
||||
|
||||
void Skin::drawTooltip(Widget* widget, bool atMouse)
|
||||
{
|
||||
if (widget->getTooltipText().size() == 0) return;
|
||||
|
||||
irr::gui::ScalableFont* font = GUIEngine::getSmallFont();
|
||||
core::dimension2d<u32> size = font->getDimension(widget->getTooltipText().c_str());
|
||||
core::position2di pos(widget->m_x + 15, widget->m_y + widget->m_h);
|
||||
@ -1406,7 +1408,9 @@ void Skin::drawTooltip(Widget* widget, bool atMouse)
|
||||
}
|
||||
|
||||
core::rect<s32> r(pos, size);
|
||||
GUIEngine::getDriver()->draw2DRectangle( video::SColor(255, 200, 200, 200), r );
|
||||
//GUIEngine::getDriver()->draw2DRectangle( video::SColor(255, 200, 200, 200), r );
|
||||
drawBoxFromStretchableTexture(widget, r,
|
||||
SkinConfig::m_render_params["tooltip::neutral"]);
|
||||
font->draw(widget->getTooltipText(), r, video::SColor(255, 0, 0, 0), false, false);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user