Add hand-to-hand tooltip

deque
MiroslavR 10 years ago
parent 3823e36f05
commit fc21d898f2

@ -471,6 +471,7 @@ namespace MWGui
mWeaponSpellBox->setVisible(true);
}
mWeapBox->clearUserStrings();
mWeapBox->setUserString("ToolTipType", "ItemPtr");
mWeapBox->setUserData(item);
@ -515,12 +516,14 @@ namespace MWGui
MWWorld::Ptr player = world->getPlayerPtr();
mWeapImage->setItem(MWWorld::Ptr());
if (player.getClass().getNpcStats(player).isWerewolf())
mWeapImage->setIcon("icons\\k\\tx_werewolf_hand.dds");
else
mWeapImage->setIcon("icons\\k\\stealth_handtohand.dds");
std::string icon = (player.getClass().getNpcStats(player).isWerewolf()) ? "icons\\k\\tx_werewolf_hand.dds" : "icons\\k\\stealth_handtohand.dds";
mWeapImage->setIcon(icon);
mWeapBox->clearUserStrings();
mWeapBox->setUserString("ToolTipType", "Layout");
mWeapBox->setUserString("ToolTipLayout", "HandToHandToolTip");
mWeapBox->setUserString("Caption_HandToHandText", itemName);
mWeapBox->setUserString("ImageTexture_HandToHandImage", icon);
}
void HUD::setCrosshairVisible(bool visible)

@ -65,6 +65,24 @@
</Widget>
</Widget>
<!-- Hand-to-hand tooltip -->
<Widget type="HBox" skin="HUD_Box_NoTransp" position="0 0 300 300" align="Stretch" name="HandToHandToolTip">
<Property key="AutoResize" value="true"/>
<Property key="Padding" value="8"/>
<Widget type="VBox">
<UserString key="VStretch" value="true"/>
<Widget type="ImageBox" skin="ImageBox" position="8 8 32 32" align="Left Top" name="HandToHandImage"/>
<Widget type="Widget">
<UserString key="VStretch" value="true"/>
</Widget>
</Widget>
<Widget type="AutoSizedTextBox" skin="SandText" position="44 8 248 284" align="Left Top" name="HandToHandText">
<Property key="TextAlign" value="Center"/>
</Widget>
</Widget>
<!-- Health tooltip -->
<Widget type="HBox" skin="HUD_Box_NoTransp" position="0 0 300 300" align="Stretch" name="HealthToolTip">
<Property key="AutoResize" value="true"/>

Loading…
Cancel
Save