mirror of
https://github.com/cmclark00/mintris.git
synced 2025-05-20 19:15:20 +01:00
Add background music and fix pause menu: - Add GameMusic class for background music playback - Add music toggle button to UI - Fix resume button to properly resume game instead of restarting - Add volume control icons - Add proper music lifecycle management
This commit is contained in:
parent
fabb2742da
commit
a56f08afb9
7 changed files with 172 additions and 7 deletions
|
@ -225,6 +225,19 @@
|
|||
android:text="@string/sound_on"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/musicToggle"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/toggle_music"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_volume_up"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/pauseStartButton"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Add table
Add a link
Reference in a new issue