Commit 305e91c9 authored by Aloshi's avatar Aloshi

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.
parent dd0c37ac
......@@ -40,7 +40,7 @@ public:
{
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));
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);
if(mImage.hasImage())
target = mImage.getPosition();
target << mImage.getCenter().x(), mImage.getCenter().y(), 0;
mWindow->getViewController()->launch(game, target);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment