color tooltip red when taking item would result in crime

sceneinput
Jiří Kuneš 10 years ago
parent 111cf5462b
commit df077f8649

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

@ -31,5 +31,17 @@
<Child type="Widget" skin="MW_Box" offset="0 0 40 40" align="Left Stretch" name="Client"/> <Child type="Widget" skin="MW_Box" offset="0 0 40 40" align="Left Stretch" name="Client"/>
</Resource> </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> </MyGUI>

@ -128,6 +128,14 @@
<State name="normal" offset="0 0 8 8"/> <State name="normal" offset="0 0 8 8"/>
</BasisSkin> </BasisSkin>
</Resource> </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 --> <!-- These define the dialog borders -->
<Resource type="ResourceSkin" name="DB_B" size="512 4" texture="textures\menu_thick_border_bottom.dds"> <Resource type="ResourceSkin" name="DB_B" size="512 4" texture="textures\menu_thick_border_bottom.dds">

Loading…
Cancel
Save