Skip to content

dual edge drawers - #715

Open
kingokksa wants to merge 7 commits into
WinNative-Emu:mainfrom
kingokksa:feature/dual-edge-drawers
Open

dual edge drawers#715
kingokksa wants to merge 7 commits into
WinNative-Emu:mainfrom
kingokksa:feature/dual-edge-drawers

Conversation

@kingokksa

Copy link
Copy Markdown
Contributor

Adds dual edge drawers to the in-game container overlay: the left drawer
and a new right drawer are each reachable with a side-aware edge swipe, and
every menu item / rail tab can be independently assigned to the left edge,
the right edge, or both. A new Drawer Layout dialog (in the main menu)
controls the per-item side assignment with radio buttons, split across two
tabs (Menu Items / Tabs).

Swipe from the left edge (rightward) opens the drawer from the left; from
the right edge (leftward) opens it from the right. Each drawer shows only
the menu items assigned to its side (LEFT/RIGHT/BOTH, default LEFT keeps
current behavior). A 'Drawer Layout' card opens a dialog to assign every
menu item to either side; choices persist in drawer_item_sides and apply
immediately. Both drawers keep their existing scrollable layout.
…rows
- Remember the last opened side so the sheet finishes its close animation
on the correct edge instead of flashing the opposite side.
- Narrow the edge-swipe zone (35 -> 12dp) and exclude BOTH edges from the
system back gesture so right-edge swipes open the right drawer.
- Drawer-layout dialog shows arrows (L/R/B -> arrow glyphs).
Fix right-drawer interactions: the host gesture treated the sheet as
left-anchored, so taps inside the right drawer counted as outside and
closed it; now the gesture zone/tap-outside check follow the open side.
Ensure the close animation always runs (no stuck open frame). Add per-side
assignment for the top tabs (rail panes) in the drawer-layout dialog,
persisted in drawer_pane_sides, filtered live by the open side.
…mpose
- Back closes overlay → pane → drawer in order and never opens the drawer;
with nothing open it defers to the default back behavior (exit/minimize)
instead of toggling the menu open.
- Edge swipe: widen the edge hot zone (12→24dp), shorten the open trigger
(32→16dp), relax the horizontal ratio (2f→1.5f) and the open-settle
threshold (0.4→0.3), and only cancel the gesture on an obviously vertical
drag (dy > dx*2) so a slightly short or diagonal swipe no longer bounces
back.
- DrawerLayoutDialog: rebuild the tabs-tab pane map instead of mutating a
plain MutableMap in place, so the radio buttons recompose and the visual
selection updates while the saved value is unchanged.
…claimed drag
- Back in the container/game is fully swallowed: it only closes overlay/pane/
drawer when one is open and otherwise does nothing, so a back press never
exits the game or opens the drawer.
- Open-side settle threshold is now 0 (was 0.3f). Settle compares
progress = draggedPx / drawerWidthPx (~300dp), so 0.3f still required
~90dp of drag to keep the drawer open and anything less bounced back.
With 0, any gesture already past the 16dp open trigger settles open.
The DrawerLayoutDialog title, tab labels (Menu Items / Tabs) previously
existed only in English and zh-rCN; every other locale fell back to
English. Add session_drawer_layout / _items / _tabs to all 21 remaining
locale files, inserted after session_drawer_touch.
Menu/tab row labels inside the dialog already reuse the existing
XServerDrawerItem titles (context.getString) and RAIL_PANES labelRes, so
no new keys are needed for the data lists.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@kingokksa