mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Make coordinate calculation more robust, implement Flex widget type
This commit is contained in:
parent
fbc84465c5
commit
788745e004
10 changed files with 181 additions and 25 deletions
|
@ -39,8 +39,7 @@ namespace LuaUi
|
|||
if (mCaption)
|
||||
mCaption->setCaption(propertyValue("caption", std::string()));
|
||||
mMoveResize = MyGUI::IntCoord();
|
||||
setForcedCoord(mMoveResize);
|
||||
|
||||
clearForced();
|
||||
WidgetExtension::updateProperties();
|
||||
}
|
||||
|
||||
|
@ -70,11 +69,8 @@ namespace LuaUi
|
|||
change.width *= (left - mPreviousMouse.left);
|
||||
change.height *= (top - mPreviousMouse.top);
|
||||
|
||||
mMoveResize = mMoveResize + change.size();
|
||||
setForcedCoord(mMoveResize);
|
||||
// position can change based on size changes
|
||||
mMoveResize = mMoveResize + change.point() + getPosition() - calculateCoord().point();
|
||||
setForcedCoord(mMoveResize);
|
||||
mMoveResize = mMoveResize + change;
|
||||
forceCoord(mMoveResize);
|
||||
updateCoord();
|
||||
|
||||
mPreviousMouse.left = left;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue