mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-21 13:55:58 +00:00
feat(dev): preview states for the Library and the in-game menu (#2899)
* Developer tools: preview states for the Library and the in-game menu Settings › Developer gets a Preview states group (shown with developer tools on): - Library: nothing installed, signed out of every store, or sample games in every store (each store's storefront games passed off as owned, a few as installed). A pill on the Library says which preview is on and ends it. Nothing is installed, removed or signed out, and the preview is never saved, so a restart always turns it off. - In-game menu: opens the session menu over the launcher for Steam, Desktop or a game, without starting a session. Its switches change only the preview. LB/RB switch pages and B or Back closes it, as in a session. * Preview states: Back closes the menu preview; signed-out preview covers expired stores The launcher's exit gesture no longer takes Back while the in-game menu preview is open, so Back closes the preview. The signed-out Library preview shows the sign-in card for an expired store with cached games too. * Developer tools: a UI zoo sheet for previews; previews are read-only The Developer tab keeps one UI zoo row instead of the preview pickers. It opens a side sheet listing the in-game menu (Steam, Desktop, game) and the Library states; nothing shows until one is picked, and picking one closes the sheet. A Library preview switches to the Library on All games. While a Library preview is on, opening a game shows a short note instead of its page, which would act on the real install behind the preview. Size sorting uses the size a card shows, so a real install shown as not installed sorts by its catalog size. * Developer tools: preview shortcuts, a Library toolbar button for preview states An opt-in Preview shortcuts switch (off by default) puts a flask button in the Library's toolbar that picks the real library or a preview state in place, so a state is a tap away while using the launcher normally. The UI zoo stays the catalog of every preview. * Preview states: no real sign-in or sign-out from a Library preview The toolbar's sign-out button is hidden while a Library preview is on, and the sign-in card's button only says previews are read-only, so a preview never signs a real account in or out.
This commit is contained in:
1 parent
fc9ad2447d
commit
00557703da
9 files changed
+354
-20
No files matched your search
@@ -280,6 +280,12 @@ object SessionPrefs {
|
||||
prefs(context).edit().putBoolean("developerTools", on).apply()
|
||||
}
|
||||
|
||||
fun previewShortcuts(context: Context): Boolean = prefs(context).getBoolean("previewShortcuts", false)
|
||||
|
||||
fun setPreviewShortcuts(context: Context, on: Boolean) {
|
||||
prefs(context).edit().putBoolean("previewShortcuts", on).apply()
|
||||
}
|
||||
|
||||
fun fpsLimitKey(mode: String?, game: String?): String? = when (mode) {
|
||||
SessionService.MODE_RUN -> game?.trim()?.takeIf(com.droiddeck.launcher.frontend.GameLaunchLink::validId)?.let { "fpsLimit.game.$it" }
|
||||
SessionService.MODE_DESKTOP -> "fpsLimit.desktop"
|
||||
|
||||
Reference in new issue
Block a user