mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-26 16:15:39 +00:00
Fixed detailed view launch animation targetting wrong point when game
image is not at origin 0.5 0.5. Tweaked launch animation to zoom a little faster so that images that the camera doesn't overstep the bounds of the UI when the image is closer to the edge.
This commit is contained in:
parent
dd0c37ac23
commit
305e91c9f8
|
@ -40,7 +40,7 @@ public:
|
||||||
{
|
{
|
||||||
cameraOut = Eigen::Affine3f::Identity();
|
cameraOut = Eigen::Affine3f::Identity();
|
||||||
|
|
||||||
float zoom = lerp<float>(1.0, 3.0, t*t);
|
float zoom = lerp<float>(1.0, 4.25f, t*t);
|
||||||
cameraOut.scale(Eigen::Vector3f(zoom, zoom, 1));
|
cameraOut.scale(Eigen::Vector3f(zoom, zoom, 1));
|
||||||
|
|
||||||
const float sw = (float)Renderer::getScreenWidth() / zoom;
|
const float sw = (float)Renderer::getScreenWidth() / zoom;
|
||||||
|
|
|
@ -205,7 +205,7 @@ void DetailedGameListView::launch(FileData* game)
|
||||||
{
|
{
|
||||||
Eigen::Vector3f target(Renderer::getScreenWidth() / 2.0f, Renderer::getScreenHeight() / 2.0f, 0);
|
Eigen::Vector3f target(Renderer::getScreenWidth() / 2.0f, Renderer::getScreenHeight() / 2.0f, 0);
|
||||||
if(mImage.hasImage())
|
if(mImage.hasImage())
|
||||||
target = mImage.getPosition();
|
target << mImage.getCenter().x(), mImage.getCenter().y(), 0;
|
||||||
|
|
||||||
mWindow->getViewController()->launch(game, target);
|
mWindow->getViewController()->launch(game, target);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue