mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-17 21:05:20 +01:00
Hide all game UI elements on progression and game over screens
This commit is contained in:
parent
fad3e0863c
commit
3cd6080177
1 changed files with 37 additions and 2 deletions
|
@ -122,7 +122,14 @@ class MainActivity : AppCompatActivity(),
|
|||
// No matter what the result is, we just show the game over container
|
||||
progressionScreen.visibility = View.GONE
|
||||
binding.gameOverContainer.visibility = View.VISIBLE
|
||||
|
||||
// Keep all game UI elements hidden
|
||||
binding.gameControlsContainer.visibility = View.GONE
|
||||
binding.holdPieceView.visibility = View.GONE
|
||||
binding.nextPieceView.visibility = View.GONE
|
||||
binding.pauseButton.visibility = View.GONE
|
||||
binding.leftControlsPanel?.visibility = View.GONE
|
||||
binding.rightControlsPanel?.visibility = View.GONE
|
||||
}
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -171,7 +178,14 @@ class MainActivity : AppCompatActivity(),
|
|||
progressionScreen.onContinue = {
|
||||
progressionScreen.visibility = View.GONE
|
||||
binding.gameOverContainer.visibility = View.VISIBLE
|
||||
|
||||
// Keep all game UI elements hidden
|
||||
binding.gameControlsContainer.visibility = View.GONE
|
||||
binding.holdPieceView.visibility = View.GONE
|
||||
binding.nextPieceView.visibility = View.GONE
|
||||
binding.pauseButton.visibility = View.GONE
|
||||
binding.leftControlsPanel?.visibility = View.GONE
|
||||
binding.rightControlsPanel?.visibility = View.GONE
|
||||
|
||||
// Get all themes with "Theme" in their name
|
||||
val themeRewards = progressionManager.getUnlockedThemes().filter {
|
||||
|
@ -431,8 +445,15 @@ class MainActivity : AppCompatActivity(),
|
|||
Log.d("MainActivity", "Showing game over screen with score: $score")
|
||||
val gameTime = System.currentTimeMillis() - gameStartTime
|
||||
|
||||
// Hide game controls
|
||||
// Hide all game UI elements
|
||||
binding.gameControlsContainer.visibility = View.GONE
|
||||
binding.holdPieceView.visibility = View.GONE
|
||||
binding.nextPieceView.visibility = View.GONE
|
||||
binding.pauseButton.visibility = View.GONE
|
||||
|
||||
// Hide landscape panels if they exist
|
||||
binding.leftControlsPanel?.visibility = View.GONE
|
||||
binding.rightControlsPanel?.visibility = View.GONE
|
||||
|
||||
// Update session stats
|
||||
statsManager.updateSessionStats(
|
||||
|
@ -504,7 +525,14 @@ class MainActivity : AppCompatActivity(),
|
|||
// Just show game over screen normally
|
||||
progressionScreen.visibility = View.GONE
|
||||
binding.gameOverContainer.visibility = View.VISIBLE
|
||||
|
||||
// Keep all game UI elements hidden
|
||||
binding.gameControlsContainer.visibility = View.GONE
|
||||
binding.holdPieceView.visibility = View.GONE
|
||||
binding.nextPieceView.visibility = View.GONE
|
||||
binding.pauseButton.visibility = View.GONE
|
||||
binding.leftControlsPanel?.visibility = View.GONE
|
||||
binding.rightControlsPanel?.visibility = View.GONE
|
||||
|
||||
// Get all themes with "Theme" in their name
|
||||
val themeRewards = progressionManager.getUnlockedThemes().filter {
|
||||
|
@ -1279,8 +1307,15 @@ class MainActivity : AppCompatActivity(),
|
|||
// Apply theme before showing the screen
|
||||
progressionScreen.applyTheme(currentTheme)
|
||||
|
||||
// Hide game controls
|
||||
// Hide all game UI elements
|
||||
binding.gameControlsContainer.visibility = View.GONE
|
||||
binding.holdPieceView.visibility = View.GONE
|
||||
binding.nextPieceView.visibility = View.GONE
|
||||
binding.pauseButton.visibility = View.GONE
|
||||
|
||||
// Hide landscape panels if they exist
|
||||
binding.leftControlsPanel?.visibility = View.GONE
|
||||
binding.rightControlsPanel?.visibility = View.GONE
|
||||
|
||||
// Show the progression screen
|
||||
binding.gameOverContainer.visibility = View.GONE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue