mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 11:09:21 +01:00
Smoother windows animation
This commit is contained in:
parent
33e6d7b107
commit
19a75d99a9
@ -4275,12 +4275,12 @@ function GUI.windowMaximize(window, animationDisabled)
|
|||||||
window:addAnimation(
|
window:addAnimation(
|
||||||
function(animation)
|
function(animation)
|
||||||
window.localX, window.localY =
|
window.localX, window.localY =
|
||||||
math.floor(fromX + (toX - fromX) * animation.position + 0.5),
|
math.floor(fromX + (toX - fromX) * animation.position),
|
||||||
math.floor(fromY + (toY - fromY) * animation.position + 0.5)
|
math.floor(fromY + (toY - fromY) * animation.position)
|
||||||
|
|
||||||
window:resize(
|
window:resize(
|
||||||
math.floor(fromWidth + (toWidth - fromWidth) * animation.position + 0.5),
|
math.floor(fromWidth + (toWidth - fromWidth) * animation.position),
|
||||||
math.floor(fromHeight + (toHeight - fromHeight) * animation.position + 0.5),
|
math.floor(fromHeight + (toHeight - fromHeight) * animation.position),
|
||||||
animation.position < 1
|
animation.position < 1
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user