mirror of
https://github.com/ARMSX2/ARMSX3.git
synced 2026-08-24 16:58:52 -07:00
Reach All Core Settings from the in-game menu
It was reachable only from the library drawer, which is a global screen. That put the moment a core node is actually worth touching, a game that needs one while that game is loaded, in the one place it could not be set without setting it for every other game too. Add it to the Options pane beside All Settings, opening over the paused game like the other manager screens. Scope and serial come from the overlay's own scope state, resolved for the running title when the menu opened, so an edit made mid-session is remembered for that title alone.
This commit is contained in:
@@ -27,7 +27,9 @@ import com.armsx2.runtime.MainActivityRuntime
|
||||
import kotlinx.coroutines.flow.first
|
||||
|
||||
/** A full manager screen shown as an overlay over the paused game (in-game menu). */
|
||||
enum class InGameScreen { Settings, Achievements, Memcard, Patches, Controls, Skins, Textures, SaveState, LoadState }
|
||||
enum class InGameScreen {
|
||||
Settings, CoreSettings, Achievements, Memcard, Patches, Controls, Skins, Textures, SaveState, LoadState
|
||||
}
|
||||
|
||||
object WindowImpl {
|
||||
val toolbarVisible = mutableStateOf(true)
|
||||
@@ -160,6 +162,16 @@ object WindowImpl {
|
||||
game = MainActivityRuntime.currentGame.value,
|
||||
onBack = dismiss,
|
||||
)
|
||||
// Every core node, over the paused game. Scope and serial come from the
|
||||
// overlay's own scope state, which InGameOverlay.open() resolves for the
|
||||
// running title, so an edit made mid-session is remembered for that title
|
||||
// instead of following the next game that boots. The drawer route stays
|
||||
// global (see AppNavigation).
|
||||
InGameScreen.CoreSettings -> com.armsx2.ui.settings.CoreSettingsScreen(
|
||||
onBack = dismiss,
|
||||
scope = InGameOverlay.settingsScope.value,
|
||||
serial = InGameOverlay.currentSerial.value,
|
||||
)
|
||||
InGameScreen.Achievements -> com.armsx2.ui.achievements.AchievementsScreen(onBack = dismiss)
|
||||
InGameScreen.Memcard -> com.armsx2.ui.memorycards.MemoryCardScreen(
|
||||
game = MainActivityRuntime.currentGame.value,
|
||||
|
||||
@@ -1154,6 +1154,13 @@ private fun OptionsPane(state: EmulationMenuUiState, viewModel: EmulationMenuVie
|
||||
// OSD, Skins, Audio, Hotkeys, Network, Recompiler, ...).
|
||||
CompactAction(str("action.allSettings"), "⚙", Modifier.fillMaxWidth(), viewModel::openFullSettings)
|
||||
Spacer(Modifier.height(6.dp))
|
||||
// ...and the whole core config beneath it, scoped to this game. The rows in this pane are
|
||||
// the handful of RPCS3 switches worth flipping mid-session; everything else lived behind
|
||||
// the library drawer, where it could only be set globally.
|
||||
// Glyph is one already proven to render in the shipped font: "▩" (U+25A9) and "⏻" (U+23FB)
|
||||
// come out as tofu boxes on device, while "▣" is used by the BIOS/onboarding screens.
|
||||
CompactAction(str("core.settings.title"), "▣", Modifier.fillMaxWidth(), viewModel::openCoreSettings)
|
||||
Spacer(Modifier.height(6.dp))
|
||||
// In-game access to the manager screens. Memory cards and PNACH are gone
|
||||
// (no PS3 equivalent); patches now have their own per-game list above.
|
||||
Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(6.dp)) {
|
||||
|
||||
@@ -188,6 +188,14 @@ class EmulationMenuViewModel(application: Application) : AndroidViewModel(applic
|
||||
*/
|
||||
fun openFullSettings() = com.armsx2.ui.WindowImpl.openInGameScreen(com.armsx2.ui.InGameScreen.Settings)
|
||||
|
||||
/**
|
||||
* All Core Settings, scoped to the running title. The screen was reachable only from the
|
||||
* library drawer, which is global, so the one place where a core node is worth touching at
|
||||
* all (a game that needs it, while that game is loaded) was also the one place it could not
|
||||
* be set without setting it for everything else.
|
||||
*/
|
||||
fun openCoreSettings() = com.armsx2.ui.WindowImpl.openInGameScreen(com.armsx2.ui.InGameScreen.CoreSettings)
|
||||
|
||||
/** In-game access to the manager screens the library drawer exposes. */
|
||||
fun openMemcard() = com.armsx2.ui.WindowImpl.openInGameScreen(com.armsx2.ui.InGameScreen.Memcard)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user