Commit 61d45532 authored by Aloshi's avatar Aloshi

Only show 1 logo in carousel when there's 1 system.

Don't animate SystemView or ViewController when destination == current position.
Fade transition no longer gets triggered when pressing left/right with a single system.
parent cf269641
......@@ -153,6 +153,10 @@ void SystemView::onCursorChanged(const CursorState& state)
if(abs(target - posMax - startPos) < dist)
endPos = target - posMax; // loop around the start (max - 1 -> -1)
// no need to animate, we're not going anywhere (probably mEntries.size() == 1)
if(endPos == mCamOffset && endPos == mExtrasCamOffset)
return;
Animation* anim;
if(Settings::getInstance()->getString("TransitionStyle") == "fade")
{
......@@ -248,6 +252,9 @@ void SystemView::render(const Eigen::Affine3f& parentTrans)
int logoCount = (int)(mSize.x() / logoSizeX) + 2; // how many logos we need to draw
int center = (int)(mCamOffset);
if(mEntries.size() == 1)
logoCount = 1;
// draw background extras
Eigen::Affine3f extrasTrans = trans;
int extrasCenter = (int)mExtrasCamOffset;
......
......@@ -89,6 +89,10 @@ void ViewController::playViewTransition()
if(mCurrentView)
target = mCurrentView->getPosition();
// no need to animate, we're not going anywhere (probably goToNextGamelist() or goToPrevGamelist() when there's only 1 system)
if(target == -mCamera.translation())
return;
if(Settings::getInstance()->getString("TransitionStyle") == "fade")
{
// fade
......
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