1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00

color tooltip red when taking item would result in crime

This commit is contained in:
Jiří Kuneš 2015-07-18 16:56:57 +02:00
parent 111cf5462b
commit df077f8649
3 changed files with 29 additions and 0 deletions

View File

@ -369,6 +369,15 @@ namespace MWGui
MyGUI::IntSize ToolTips::createToolTip(const MWGui::ToolTipInfo& info)
{
mDynamicToolTipBox->setVisible(true);
if(checkOwned())
{
mDynamicToolTipBox->changeWidgetSkin("HUD_Box_NoTransp_R");
}
else
{
mDynamicToolTipBox->changeWidgetSkin("HUD_Box_NoTransp");
}
std::string caption = info.caption;
std::string image = info.icon;

View File

@ -31,5 +31,17 @@
<Child type="Widget" skin="MW_Box" offset="0 0 40 40" align="Left Stretch" name="Client"/>
</Resource>
<Resource type="ResourceSkin" name="HUD_Box_NoTransp_R" size="40 40">
<!-- The interior of the box -->
<Child type="Widget" skin="DialogBG_R" offset="0 0 40 40" align="Stretch" name="Client"/>
<!-- Borders -->
<Child type="Widget" skin="MW_Box" offset="0 0 40 40" align="Left Stretch" name="Client"/>
</Resource>
</MyGUI>

View File

@ -128,6 +128,14 @@
<State name="normal" offset="0 0 8 8"/>
</BasisSkin>
</Resource>
<!-- Defines a red background -->
<Resource type="ResourceSkin" name="DialogBG_R" size="8 8" texture="white">
<Property key="Colour" value="0.3 0 0 1"/>
<BasisSkin type="MainSkin" offset="0 0 8 8">
<State name="normal" offset="0 0 8 8"/>
</BasisSkin>
</Resource>
<!-- These define the dialog borders -->
<Resource type="ResourceSkin" name="DB_B" size="512 4" texture="textures\menu_thick_border_bottom.dds">