character preview working

actorid
scrawl 12 years ago
parent d90af9c524
commit 5155339cb6

@ -102,12 +102,10 @@ namespace MWGui
_sender->getSize().height-44 ); _sender->getSize().height-44 );
drawItems(); drawItems();
MyGUI::IntSize size = mAvatarImage->getSize(); MyGUI::IntSize size = mAvatar->getSize();
std::cout << "dims " << size.width << " " << size.height << std::endl;
MWBase::Environment::get().getWorld()->updateCharacterPreview (size.width, size.height); MWBase::Environment::get().getWorld()->updateCharacterPreview (size.width, size.height);
mAvatarImage->setSize(MyGUI::IntSize(std::max(mAvatar->getSize().width, 512), std::max(mAvatar->getSize().height, 1024)));
mAvatarImage->setImageCoord (MyGUI::IntCoord(0,0,size.width, size.height));
} }
void InventoryWindow::onFilterChanged(MyGUI::Widget* _sender) void InventoryWindow::onFilterChanged(MyGUI::Widget* _sender)
@ -267,9 +265,11 @@ namespace MWGui
else else
mWindowManager.setSelectedWeapon(*weaponSlot, 100); /// \todo track weapon durability mWindowManager.setSelectedWeapon(*weaponSlot, 100); /// \todo track weapon durability
MyGUI::IntSize size = mAvatarImage->getSize(); MyGUI::IntSize size = mAvatar->getSize();
mAvatarImage->setImageCoord (MyGUI::IntCoord(0,0,size.width, size.height));
MWBase::Environment::get().getWorld()->updateCharacterPreview (size.width, size.height); MWBase::Environment::get().getWorld()->updateCharacterPreview (size.width, size.height);
mAvatarImage->setSize(MyGUI::IntSize(512, 1024));
} }
void InventoryWindow::pickUpObject (MWWorld::Ptr object) void InventoryWindow::pickUpObject (MWWorld::Ptr object)

@ -42,7 +42,7 @@ namespace MWRender
{ {
bool wasVisible = mNode->getParentSceneNode()->getAttachedObject(0)->getVisible (); bool wasVisible = mNode->getParentSceneNode()->getAttachedObject(0)->getVisible ();
mNode->getParentSceneNode()->setVisible(true, false); mNode->getParentSceneNode()->setVisible(true, false);
//mViewport->setDimensions (0, 0, float(sizeX) / float(512), float(sizeY) / float(1024)); mViewport->setDimensions (0, 0, std::min(1.f, float(sizeX) / float(512)), std::min(1.f, float(sizeY) / float(1024)));
mRenderTarget->update(); mRenderTarget->update();

@ -15,9 +15,9 @@
<Widget type="ImageBox" skin="ImageBox" position="0 0 212 185" align="Stretch" name="AvatarImage"> <Widget type="ImageBox" skin="ImageBox" position="0 0 212 185" align="Stretch" name="AvatarImage">
<Property key="ImageTexture" value="CharacterPreview"/> <Property key="ImageTexture" value="CharacterPreview"/>
<Property key="NeedMouse" value="false"/> <Property key="NeedMouse" value="false"/>
<Widget type="TextBox" skin="ProgressText" position="0 150 212 24" align="HCenter Bottom" name="ArmorRating"> </Widget>
<Property key="Caption" value="Armor Rating"/> <Widget type="TextBox" skin="ProgressText" position="0 150 212 24" align="HCenter Bottom" name="ArmorRating">
</Widget> <Property key="Caption" value="Armor Rating"/>
</Widget> </Widget>
</Widget> </Widget>

Loading…
Cancel
Save