Enchanting dialog: follow vanilla behavior more closely

deque
MiroslavR 11 years ago
parent e2f15181f9
commit e8a245bea3

@ -87,6 +87,7 @@ namespace MWGui
} }
else else
{ {
mName->setCaption(item.getClass().getName(item));
mItemBox->setItem(item); mItemBox->setItem(item);
mItemBox->setUserString ("ToolTipType", "ItemPtr"); mItemBox->setUserString ("ToolTipType", "ItemPtr");
mItemBox->setUserData(item); mItemBox->setUserData(item);
@ -208,6 +209,7 @@ namespace MWGui
else else
{ {
setItem(MWWorld::Ptr()); setItem(MWWorld::Ptr());
updateLabels();
} }
} }
@ -216,6 +218,7 @@ namespace MWGui
mItemSelectionDialog->setVisible(false); mItemSelectionDialog->setVisible(false);
setItem(item); setItem(item);
MWBase::Environment::get().getSoundManager()->playSound(item.getClass().getDownSoundId(item), 1, 1);
mEnchanting.nextCastStyle(); mEnchanting.nextCastStyle();
updateLabels(); updateLabels();
} }
@ -237,6 +240,7 @@ namespace MWGui
} }
setSoulGem(item); setSoulGem(item);
MWBase::Environment::get().getSoundManager()->playSound(item.getClass().getDownSoundId(item), 1, 1);
updateLabels(); updateLabels();
} }

@ -7,6 +7,9 @@
<Widget type="AutoSizedTextBox" skin="NormalText"> <Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sName}"/> <Property key="Caption" value="#{sName}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp8}"/>
</Widget> </Widget>
<Widget type="EditBox" skin="MW_TextEdit" position="0 0 30 30" name="NameEdit"> <Widget type="EditBox" skin="MW_TextEdit" position="0 0 30 30" name="NameEdit">
@ -25,6 +28,9 @@
<Widget type="AutoSizedTextBox" skin="NormalText"> <Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sItem}"/> <Property key="Caption" value="#{sItem}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp1}"/>
</Widget> </Widget>
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 50 50" name="ItemBox"> <Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 50 50" name="ItemBox">
</Widget> </Widget>
@ -33,6 +39,9 @@
<Widget type="AutoSizedTextBox" skin="NormalText"> <Widget type="AutoSizedTextBox" skin="NormalText">
<Property key="Caption" value="#{sSoulGem}"/> <Property key="Caption" value="#{sSoulGem}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp2}"/>
</Widget> </Widget>
<Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 50 50" name="SoulBox"> <Widget type="ItemWidget" skin="MW_ItemIconBox" position="0 0 50 50" name="SoulBox">
</Widget> </Widget>
@ -70,6 +79,9 @@
<!-- Available effects --> <!-- Available effects -->
<Widget type="TextBox" skin="NormalText" position="12 108 300 24"> <Widget type="TextBox" skin="NormalText" position="12 108 300 24">
<Property key="Caption" value="#{sMagicEffects}"/> <Property key="Caption" value="#{sMagicEffects}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp9}"/>
</Widget> </Widget>
<Widget type="MWList" skin="MW_SimpleList" position="12 136 202 209" name="AvailableEffects"> <Widget type="MWList" skin="MW_SimpleList" position="12 136 202 209" name="AvailableEffects">
</Widget> </Widget>
@ -77,6 +89,9 @@
<!-- Used effects --> <!-- Used effects -->
<Widget type="TextBox" skin="NormalText" position="226 108 300 24"> <Widget type="TextBox" skin="NormalText" position="226 108 300 24">
<Property key="Caption" value="#{sEffects}"/> <Property key="Caption" value="#{sEffects}"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp10}"/>
</Widget> </Widget>
<Widget type="Widget" skin="MW_Box" position="226 136 316 209"> <Widget type="Widget" skin="MW_Box" position="226 136 316 209">
<Widget type="ScrollView" skin="MW_ScrollViewH" position="4 4 308 201" name="UsedEffects"> <Widget type="ScrollView" skin="MW_ScrollViewH" position="4 4 308 201" name="UsedEffects">
@ -89,6 +104,9 @@
<Widget type="AutoSizedButton" skin="MW_Button" name="TypeButton"> <Widget type="AutoSizedButton" skin="MW_Button" name="TypeButton">
<Property key="Caption" value="Constant effect"/> <Property key="Caption" value="Constant effect"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp7}"/>
</Widget> </Widget>
<Widget type="Widget"> <Widget type="Widget">
@ -100,6 +118,9 @@
</Widget> </Widget>
<Widget type="AutoSizedTextBox" skin="SandText" name="PriceLabel"> <Widget type="AutoSizedTextBox" skin="SandText" name="PriceLabel">
<Property key="Caption" value="0"/> <Property key="Caption" value="0"/>
<UserString key="ToolTipType" value="Layout"/>
<UserString key="ToolTipLayout" value="TextToolTip"/>
<UserString key="Caption_Text" value="#{sEnchantmentHelp6}"/>
</Widget> </Widget>

Loading…
Cancel
Save