Added option for turn on/off smooth scroll
This commit is contained in:
@ -238,6 +238,7 @@ void GameRenderer::renderPlayingState(
|
||||
}
|
||||
|
||||
bool allowActivePieceRender = true;
|
||||
const bool smoothScrollEnabled = Settings::instance().isSmoothScrollEnabled();
|
||||
|
||||
auto computeFallOffset = [&]() -> float {
|
||||
if (game->isPaused()) {
|
||||
@ -257,7 +258,7 @@ void GameRenderer::renderPlayingState(
|
||||
return progress * finalBlockSize;
|
||||
};
|
||||
|
||||
float activePieceOffset = (!game->isPaused()) ? computeFallOffset() : 0.0f;
|
||||
float activePieceOffset = (!game->isPaused() && smoothScrollEnabled) ? computeFallOffset() : 0.0f;
|
||||
if (activePieceOffset > 0.0f) {
|
||||
const auto& boardRef = game->boardRef();
|
||||
const Game::Piece& piece = game->current();
|
||||
|
||||
Reference in New Issue
Block a user