diff --git a/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt b/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt index 22f55da..18249de 100644 --- a/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt +++ b/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt @@ -238,8 +238,14 @@ class TitleScreen @JvmOverloads constructor( // Remove tetrominos that fell off the screen tetrominos.removeAll(tetrominosToRemove) - // Draw title with "mint" in mint color - val titleY = height * 0.4f + // Position title based on orientation for optimal positioning + val titleY = if (resources.configuration.orientation == android.content.res.Configuration.ORIENTATION_LANDSCAPE) { + // In landscape mode, position in upper third of screen + height * 0.3f + } else { + // In portrait mode, center above high scores + height * 0.35f + } // Measure each word without spaces val pixelWidth = titlePaint.measureText("pixel") @@ -271,7 +277,14 @@ class TitleScreen @JvmOverloads constructor( // Draw high scores using pre-allocated manager val highScores: List = highScoreManager.getHighScores() - val highScoreY = height * 0.5f + + // Adjust high scores position based on title position + val highScoreY = if (resources.configuration.orientation == android.content.res.Configuration.ORIENTATION_LANDSCAPE) { + height * 0.45f // In landscape, position high scores below title with more space + } else { + height * 0.5f // In portrait, keep in middle of screen + } + var lastHighScoreY = highScoreY if (highScores.isNotEmpty()) { // Calculate the starting X position to center the entire block of scores