Android: New/improved ingame pause menu

This commit is contained in:
Connor McLaughlin
2021-05-02 14:59:58 +10:00
parent 19b84cbe4d
commit 70aae89219
27 changed files with 951 additions and 693 deletions

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,16.5c-2.49,0 -4.5,-2.01 -4.5,-4.5S9.51,7.5 12,7.5s4.5,2.01 4.5,4.5 -2.01,4.5 -4.5,4.5zM12,11c-0.55,0 -1,0.45 -1,1s0.45,1 1,1 1,-0.45 1,-1 -0.45,-1 -1,-1z"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M20,11H7.83l5.59,-5.59L12,4l-8,8 8,8 1.41,-1.41L7.83,13H20v-2z"/>
</vector>

View File

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M10.09,15.59L11.5,17l5,-5 -5,-5 -1.41,1.41L12.67,11H3v2h9.67l-2.58,2.59zM19,3H5c-1.11,0 -2,0.9 -2,2v4h2V5h14v14H5v-4H3v4c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V5c0,-1.1 -0.9,-2 -2,-2z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M4,18l8.5,-6L4,6v12zM13,6v12l8.5,-6L13,6z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M11,18L11,6l-8.5,6 8.5,6zM11.5,12l8.5,6L20,6l-8.5,6z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z"/>
</vector>

View File

@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M12,5V2L8,6l4,4V7c3.31,0 6,2.69 6,6c0,2.97 -2.17,5.43 -5,5.91v2.02c3.95,-0.49 7,-3.85 7,-7.93C20,8.58 16.42,5 12,5z"/>
<path
android:fillColor="@android:color/white"
android:pathData="M6,13c0,-1.65 0.67,-3.15 1.76,-4.24L6.34,7.34C4.9,8.79 4,10.79 4,13c0,4.08 3.05,7.44 7,7.93v-2.02C8.17,18.43 6,15.97 6,13z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M7,20h4c0,1.1 -0.9,2 -2,2S7,21.1 7,20zM5,19h8v-2H5V19zM16.5,9.5c0,3.82 -2.66,5.86 -3.77,6.5H5.27C4.16,15.36 1.5,13.32 1.5,9.5C1.5,5.36 4.86,2 9,2S16.5,5.36 16.5,9.5zM21.37,7.37L20,8l1.37,0.63L22,10l0.63,-1.37L24,8l-1.37,-0.63L22,6L21.37,7.37zM19,6l0.94,-2.06L22,3l-2.06,-0.94L19,0l-0.94,2.06L16,3l2.06,0.94L19,6z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M9,11.24V7.5C9,6.12 10.12,5 11.5,5S14,6.12 14,7.5v3.74c1.21,-0.81 2,-2.18 2,-3.74C16,5.01 13.99,3 11.5,3S7,5.01 7,7.5C7,9.06 7.79,10.43 9,11.24zM18.84,15.87l-4.54,-2.26c-0.17,-0.07 -0.35,-0.11 -0.54,-0.11H13v-6C13,6.67 12.33,6 11.5,6S10,6.67 10,7.5v10.74c-3.6,-0.76 -3.54,-0.75 -3.67,-0.75c-0.31,0 -0.59,0.13 -0.79,0.33l-0.79,0.8l4.94,4.94C9.96,23.83 10.34,24 10.75,24h6.79c0.75,0 1.33,-0.55 1.44,-1.28l0.75,-5.27c0.01,-0.07 0.02,-0.14 0.02,-0.2C19.75,16.63 19.37,16.09 18.84,15.87z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M19,5h-2V3H7v2H5C3.9,5 3,5.9 3,7v1c0,2.55 1.92,4.63 4.39,4.94c0.63,1.5 1.98,2.63 3.61,2.96V19H7v2h10v-2h-4v-3.1c1.63,-0.33 2.98,-1.46 3.61,-2.96C19.08,12.63 21,10.55 21,8V7C21,5.9 20.1,5 19,5zM5,8V7h2v3.82C5.84,10.4 5,9.3 5,8zM19,8c0,1.3 -0.84,2.4 -2,2.82V7h2V8z"/>
</vector>

View File

@ -0,0 +1,107 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#99111111"
android:orientation="horizontal">
<ImageView
android:id="@+id/cover_image"
android:layout_width="60dp"
android:layout_height="60dp"
android:background="?android:attr/selectableItemBackground"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="4dp"
android:layout_marginTop="4dp"
android:text="Title"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
android:scrollHorizontally="true"
android:ellipsize="end"
android:maxLines="1"
app:layout_constraintEnd_toStartOf="@id/button_container"
app:layout_constraintStart_toEndOf="@id/cover_image"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginEnd="4dp"
android:layout_marginBottom="4dp"
android:text="Code - Path"
android:scrollHorizontally="true"
android:ellipsize="end"
android:maxLines="1"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
app:layout_constraintEnd_toStartOf="@id/button_container"
app:layout_constraintStart_toEndOf="@id/cover_image"
app:layout_constraintTop_toBottomOf="@id/title" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/button_container"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/menu"
android:layout_width="40dp"
android:layout_height="60dp"
android:layout_marginEnd="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="Pause Menu"
android:src="@drawable/ic_baseline_menu_24" />
<ImageButton
android:id="@+id/controller_settings"
android:layout_width="40dp"
android:layout_height="60dp"
android:layout_marginEnd="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="Controller Settings"
android:src="@drawable/ic_baseline_gamepad_24" />
<ImageButton
android:id="@+id/settings"
android:layout_width="40dp"
android:layout_height="60dp"
android:layout_marginEnd="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="Settings"
android:src="@drawable/ic_baseline_settings_24" />
<ImageButton
android:id="@+id/quit"
android:layout_width="40dp"
android:layout_height="60dp"
android:layout_marginEnd="5dp"
android:background="?android:attr/selectableItemBackground"
android:contentDescription="Quit"
android:src="@drawable/ic_baseline_exit_to_app_24" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<FrameLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>

View File

@ -75,22 +75,6 @@
<item>Tarjeta separada por juego (Código)</item>
<item>Tarjeta separada por juego (Título)</item>
</string-array>
<string-array name="emulation_menu">
<item>Cargar Estado</item>
<item>Guardar Estado</item>
<item>Activar Avance rápido</item>
<item>Logros</item>
<item>Más Opciones</item>
<item>Salir</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Reiniciar</item>
<item>Código de trucos</item>
<item>Cambiar disco</item>
<item>Cambiar control de pantalla tactil</item>
<item>Configuración del control</item>
<item>Configuraciones</item>
</string-array>
<string-array name="settings_cdrom_read_speedup_entries">
<item>Ninguno (Velocidad doble)</item>
<item>2x (Velocidad cuádruple)</item>

View File

@ -75,22 +75,6 @@
<item>MC separata per ogni gioco (Codice Gioco)</item>
<item>MC separata per ogni gioco (Titolo Gioco)</item>
</string-array>
<string-array name="emulation_menu">
<item>Carica Stato</item>
<item>Salva Stato</item>
<item>Abilita/Disabilita Avanti Veloce</item>
<item>Achievements</item>
<item>Altre Opzioni</item>
<item>Esci</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Reset</item>
<item>Codici Patch</item>
<item>Cambia Disco</item>
<item>Cambia Controller Touchscreen</item>
<item>Controller Settings</item>
<item>Impostazioni</item>
</string-array>
<string-array name="settings_cdrom_read_speedup_entries">
<item>Nessuna Velocità Doppia)</item>
<item>2x (Velocità Quadrupla</item>

View File

@ -75,22 +75,6 @@
<item>Aparte Kaart Per Spel (Spelcode)</item>
<item>Aparte Kaart Per Spel (Speltitel)</item>
</string-array>
<string-array name="emulation_menu">
<item>Staat Laden</item>
<item>Staat Opslaan</item>
<item>Doorspoelen aan/uitzetten</item>
<item>Achievements</item>
<item>Meer Opties</item>
<item>Afsluiten</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Resetten</item>
<item>Patch Codes</item>
<item>Disc Veranderen</item>
<item>Touchscreen Controller Aanpassen</item>
<item>Controller Settings</item>
<item>Instellingen</item>
</string-array>
<string-array name="settings_cdrom_read_speedup_entries">
<item>Geen (Dubbele Snelheid)</item>
<item>2x (Vierdubbele Snelheid)</item>

View File

@ -75,23 +75,7 @@
<item>Separado Por Jogo (Cód. Jogo)</item>
<item>Separado Por Jogo (Título Jogo)</item>
</string-array>
<string-array name="emulation_menu">
<item>Carregar Estado</item>
<item>Salvar Estado</item>
<item>Avanço (Fixo)</item>
<item>Achievements</item>
<item>Mais Opções</item>
<item>Sair</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Reiniciar</item>
<item>Trapaças</item>
<item>Mudar Disco</item>
<item>Mudar controle em Tela</item>
<item>Controller Settings</item>
<item>Configurações</item>
</string-array>
<string-array name="emulation_touchscreen_menu">
<string-array name="emulation_touchscreen_menu">
<item>Mudar</item>
<item>Ajustar Visibilidade</item>
<item>Adicionar/Remover botões</item>

View File

@ -75,22 +75,6 @@
<item>Своя карта для каждой игры (по коду)</item>
<item>Своя карта для каждой игры (по названию)</item>
</string-array>
<string-array name="emulation_menu">
<item>Загрузить состояние</item>
<item>Сохранить состояние</item>
<item>Включить ускорение</item>
<item>Достижения</item>
<item>Опции</item>
<item>Выход</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Сброс</item>
<item>Чит-коды</item>
<item>Сменить диск</item>
<item>Экранный геймпад</item>
<item>Управление</item>
<item>Настройки</item>
</string-array>
<string-array name="emulation_touchscreen_menu">
<item>Сменить вид</item>
<item>Настроить видимость</item>

View File

@ -151,22 +151,6 @@
<item>PerGame</item>
<item>PerGameTitle</item>
</string-array>
<string-array name="emulation_menu">
<item>Load State</item>
<item>Save State</item>
<item>Toggle Fast Forward</item>
<item>Achievements</item>
<item>More Options</item>
<item>Quit</item>
</string-array>
<string-array name="emulation_more_menu">
<item>Reset</item>
<item>Patch Codes</item>
<item>Change Disc</item>
<item>Change Touchscreen Controller</item>
<item>Controller Settings</item>
<item>Settings</item>
</string-array>
<string-array name="emulation_touchscreen_menu">
<item>Change Type</item>
<item>Change Opacity</item>

View File

@ -7,4 +7,6 @@
<color name="black_overlay">#66000000</color>
<color name="fab_background">#ffffffff</color>
<color name="settings_overlay_background">#dd111111</color>
</resources>

View File

@ -336,4 +336,13 @@
<string name="settings_category_achievements">Achievement Settings</string>
<string name="settings_multitap_mode">Multitap Mode</string>
<string name="settings_touchscreen_controller_port">Touchscreen Controller Port</string>
<string name="emulation_menu_load_state">Load State</string>
<string name="emulation_menu_save_state">Save State</string>
<string name="emulation_menu_toggle_fast_forward">Toggle Fast Forward</string>
<string name="emulation_menu_achievements">Achievements</string>
<string name="emulation_menu_patch_codes">Patch Codes</string>
<string name="emulation_menu_change_disc">Change Disc</string>
<string name="emulation_menu_touchscreen_controller_settings">Touchscreen Controller Settings</string>
<string name="emulation_menu_toggle_analog_mode">Toggle Controller Analog Mode</string>
<string name="emulation_menu_reset_console">Reset Console</string>
</resources>

View File

@ -35,4 +35,13 @@
<item name="android:textAllCaps">false</item>
</style>
<style name="EmulationActivityOverlay" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@android:style/Animation.Dialog</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:backgroundDimAmount">0.8</item>
</style>
</resources>