forked from mirror/openmw-tes3mp
Add hand-to-hand tooltip
This commit is contained in:
parent
3823e36f05
commit
fc21d898f2
2 changed files with 25 additions and 4 deletions
|
@ -471,6 +471,7 @@ namespace MWGui
|
||||||
mWeaponSpellBox->setVisible(true);
|
mWeaponSpellBox->setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mWeapBox->clearUserStrings();
|
||||||
mWeapBox->setUserString("ToolTipType", "ItemPtr");
|
mWeapBox->setUserString("ToolTipType", "ItemPtr");
|
||||||
mWeapBox->setUserData(item);
|
mWeapBox->setUserData(item);
|
||||||
|
|
||||||
|
@ -515,12 +516,14 @@ namespace MWGui
|
||||||
MWWorld::Ptr player = world->getPlayerPtr();
|
MWWorld::Ptr player = world->getPlayerPtr();
|
||||||
|
|
||||||
mWeapImage->setItem(MWWorld::Ptr());
|
mWeapImage->setItem(MWWorld::Ptr());
|
||||||
if (player.getClass().getNpcStats(player).isWerewolf())
|
std::string icon = (player.getClass().getNpcStats(player).isWerewolf()) ? "icons\\k\\tx_werewolf_hand.dds" : "icons\\k\\stealth_handtohand.dds";
|
||||||
mWeapImage->setIcon("icons\\k\\tx_werewolf_hand.dds");
|
mWeapImage->setIcon(icon);
|
||||||
else
|
|
||||||
mWeapImage->setIcon("icons\\k\\stealth_handtohand.dds");
|
|
||||||
|
|
||||||
mWeapBox->clearUserStrings();
|
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)
|
void HUD::setCrosshairVisible(bool visible)
|
||||||
|
|
|
@ -65,6 +65,24 @@
|
||||||
</Widget>
|
</Widget>
|
||||||
</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 -->
|
<!-- Health tooltip -->
|
||||||
<Widget type="HBox" skin="HUD_Box_NoTransp" position="0 0 300 300" align="Stretch" name="HealthToolTip">
|
<Widget type="HBox" skin="HUD_Box_NoTransp" position="0 0 300 300" align="Stretch" name="HealthToolTip">
|
||||||
<Property key="AutoResize" value="true"/>
|
<Property key="AutoResize" value="true"/>
|
||||||
|
|
Loading…
Reference in a new issue