mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-13 12:40:04 +00:00
character preview working
This commit is contained in:
parent
d90af9c524
commit
5155339cb6
@ -102,12 +102,10 @@ namespace MWGui
|
||||
_sender->getSize().height-44 );
|
||||
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);
|
||||
|
||||
mAvatarImage->setImageCoord (MyGUI::IntCoord(0,0,size.width, size.height));
|
||||
mAvatarImage->setSize(MyGUI::IntSize(std::max(mAvatar->getSize().width, 512), std::max(mAvatar->getSize().height, 1024)));
|
||||
}
|
||||
|
||||
void InventoryWindow::onFilterChanged(MyGUI::Widget* _sender)
|
||||
@ -267,9 +265,11 @@ namespace MWGui
|
||||
else
|
||||
mWindowManager.setSelectedWeapon(*weaponSlot, 100); /// \todo track weapon durability
|
||||
|
||||
MyGUI::IntSize size = mAvatarImage->getSize();
|
||||
mAvatarImage->setImageCoord (MyGUI::IntCoord(0,0,size.width, size.height));
|
||||
MyGUI::IntSize size = mAvatar->getSize();
|
||||
|
||||
MWBase::Environment::get().getWorld()->updateCharacterPreview (size.width, size.height);
|
||||
|
||||
mAvatarImage->setSize(MyGUI::IntSize(512, 1024));
|
||||
}
|
||||
|
||||
void InventoryWindow::pickUpObject (MWWorld::Ptr object)
|
||||
|
@ -42,7 +42,7 @@ namespace MWRender
|
||||
{
|
||||
bool wasVisible = mNode->getParentSceneNode()->getAttachedObject(0)->getVisible ();
|
||||
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();
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
<Widget type="ImageBox" skin="ImageBox" position="0 0 212 185" align="Stretch" name="AvatarImage">
|
||||
<Property key="ImageTexture" value="CharacterPreview"/>
|
||||
<Property key="NeedMouse" value="false"/>
|
||||
<Widget type="TextBox" skin="ProgressText" position="0 150 212 24" align="HCenter Bottom" name="ArmorRating">
|
||||
<Property key="Caption" value="Armor Rating"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
<Widget type="TextBox" skin="ProgressText" position="0 150 212 24" align="HCenter Bottom" name="ArmorRating">
|
||||
<Property key="Caption" value="Armor Rating"/>
|
||||
</Widget>
|
||||
</Widget>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user