diff --git a/README.md b/README.md index eb42044..3e4bad7 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,7 @@ Pixelmint Drop features a comprehensive scoring system designed to reward skillf - **Swipe down quickly:** Hard drop (instant placement). - **Swipe down slowly:** Soft drop (faster downward movement). - **Single tap:** Rotate piece. +- **Swipe up:** Hold piece. ### Visual Effects - Silky-smooth piece movement animations. @@ -70,6 +71,8 @@ Pixelmint Drop features a comprehensive scoring system designed to reward skillf - Subtle block glow effects. - Clean grid lines for better visibility. - Engaging animated title screen featuring falling pieces. +- Multiple theme options with ability to change manually or enable Random Mode (unlocked when 2+ themes are available). +- In Random Mode, themes change automatically every 10 line clears (1 level). ## Technical Details diff --git a/app/build.gradle b/app/build.gradle index bcde979..0466731 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -11,8 +11,8 @@ android { applicationId "com.pixelmintdrop" minSdk 30 targetSdk 35 - versionCode 1 - versionName "1.0" + versionCode 2 + versionName "0.1" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt b/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt index 18249de..3fece82 100644 --- a/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt +++ b/app/src/main/java/com/pixelmintdrop/game/TitleScreen.kt @@ -238,13 +238,20 @@ class TitleScreen @JvmOverloads constructor( // Remove tetrominos that fell off the screen tetrominos.removeAll(tetrominosToRemove) + // 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 + } + // 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 + // In landscape mode, position halfway between top and high scores + highScoreY / 2 } else { - // In portrait mode, center above high scores - height * 0.35f + // In portrait mode, position halfway between top and high scores + highScoreY / 2 } // Measure each word without spaces @@ -259,7 +266,11 @@ class TitleScreen @JvmOverloads constructor( val totalWidth = pixelWidth + mintWidth + dropWidth + (wordSpacing * 2) // Start position for first word to center the entire title - val startX = width / 2f - totalWidth / 2 + val startX = if (resources.configuration.orientation == android.content.res.Configuration.ORIENTATION_LANDSCAPE) { + width / 2f - totalWidth / 2 // Center in landscape + } else { + width / 2f - totalWidth / 2 + 100f // Add offset to the right in portrait + } // Draw "pixel" in theme color canvas.drawText("pixel", startX, titleY, titlePaint) @@ -278,13 +289,6 @@ class TitleScreen @JvmOverloads constructor( // Draw high scores using pre-allocated manager val highScores: List = highScoreManager.getHighScores() - // 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 diff --git a/app/src/main/res/layout-land/high_score_entry.xml b/app/src/main/res/layout-land/high_score_entry.xml index a048da5..dd8f437 100644 --- a/app/src/main/res/layout-land/high_score_entry.xml +++ b/app/src/main/res/layout-land/high_score_entry.xml @@ -26,6 +26,15 @@ android:fontFamily="monospace" android:layout_marginBottom="24dp"/> + + + +