mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-17 23:55:21 +01:00
Hide game controls on progression screen and game over
This commit is contained in:
parent
b60c106a08
commit
1f400238e5
1 changed files with 14 additions and 0 deletions
|
@ -121,6 +121,7 @@ class MainActivity : AppCompatActivity(),
|
||||||
// No matter what the result is, we just show the game over container
|
// No matter what the result is, we just show the game over container
|
||||||
progressionScreen.visibility = View.GONE
|
progressionScreen.visibility = View.GONE
|
||||||
binding.gameOverContainer.visibility = View.VISIBLE
|
binding.gameOverContainer.visibility = View.VISIBLE
|
||||||
|
binding.gameControlsContainer.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
@ -169,6 +170,12 @@ class MainActivity : AppCompatActivity(),
|
||||||
progressionScreen.onContinue = {
|
progressionScreen.onContinue = {
|
||||||
progressionScreen.visibility = View.GONE
|
progressionScreen.visibility = View.GONE
|
||||||
binding.gameOverContainer.visibility = View.VISIBLE
|
binding.gameOverContainer.visibility = View.VISIBLE
|
||||||
|
binding.gameControlsContainer.visibility = View.GONE
|
||||||
|
|
||||||
|
// Update theme selector if new themes were unlocked
|
||||||
|
if (newRewards.any { it.contains("Theme") }) {
|
||||||
|
updateThemeSelector()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load and apply theme preference
|
// Load and apply theme preference
|
||||||
|
@ -418,6 +425,9 @@ class MainActivity : AppCompatActivity(),
|
||||||
Log.d("MainActivity", "Showing game over screen with score: $score")
|
Log.d("MainActivity", "Showing game over screen with score: $score")
|
||||||
val gameTime = System.currentTimeMillis() - gameStartTime
|
val gameTime = System.currentTimeMillis() - gameStartTime
|
||||||
|
|
||||||
|
// Hide game controls
|
||||||
|
binding.gameControlsContainer.visibility = View.GONE
|
||||||
|
|
||||||
// Update session stats
|
// Update session stats
|
||||||
statsManager.updateSessionStats(
|
statsManager.updateSessionStats(
|
||||||
score = score,
|
score = score,
|
||||||
|
@ -488,6 +498,7 @@ class MainActivity : AppCompatActivity(),
|
||||||
// Just show game over screen normally
|
// Just show game over screen normally
|
||||||
progressionScreen.visibility = View.GONE
|
progressionScreen.visibility = View.GONE
|
||||||
binding.gameOverContainer.visibility = View.VISIBLE
|
binding.gameOverContainer.visibility = View.VISIBLE
|
||||||
|
binding.gameControlsContainer.visibility = View.GONE
|
||||||
|
|
||||||
// Update theme selector if new themes were unlocked
|
// Update theme selector if new themes were unlocked
|
||||||
if (newRewards.any { it.contains("Theme") }) {
|
if (newRewards.any { it.contains("Theme") }) {
|
||||||
|
@ -1257,6 +1268,9 @@ class MainActivity : AppCompatActivity(),
|
||||||
// Apply theme before showing the screen
|
// Apply theme before showing the screen
|
||||||
progressionScreen.applyTheme(currentTheme)
|
progressionScreen.applyTheme(currentTheme)
|
||||||
|
|
||||||
|
// Hide game controls
|
||||||
|
binding.gameControlsContainer.visibility = View.GONE
|
||||||
|
|
||||||
// Show the progression screen
|
// Show the progression screen
|
||||||
binding.gameOverContainer.visibility = View.GONE
|
binding.gameOverContainer.visibility = View.GONE
|
||||||
progressionScreen.visibility = View.VISIBLE
|
progressionScreen.visibility = View.VISIBLE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue