Skip to content

Gmcm controls and responsive UI#239

Open
rodolfonobrega wants to merge 7 commits intoaedenthorn:masterfrom
rodolfonobrega:gmcm-controls-and-responsive-ui
Open

Gmcm controls and responsive UI#239
rodolfonobrega wants to merge 7 commits intoaedenthorn:masterfrom
rodolfonobrega:gmcm-controls-and-responsive-ui

Conversation

@rodolfonobrega
Copy link
Contributor

@rodolfonobrega rodolfonobrega commented Mar 4, 2026

Summary

This PR fixes multiple usability and stability issues in All Chests Menu, focused on controller navigation, split-
screen responsiveness, and control configuration clarity.

The changes were split into three commits to keep review focused:

  1. Improve controller navigation and responsive layout in menu UI
  2. Split keyboard and controller open-menu settings
  3. Revise GMCM labels and localization for new control model

———

Problems Addressed

1. Controller navigation could not reliably reach filter controls

Players using gamepad had trouble moving focus to the filter UI (text filters and location dropdown), and interaction
was inconsistent.

2. UI broke in narrow/split-screen viewports

In split-screen or smaller viewports, the menu could overflow/crop horizontally (especially chest columns on the
right), making part of the UI inaccessible.

3. Control settings were coupled and confusing

Keyboard and controller “open menu” logic shared modifier behavior, which prevented independent setups (e.g. require
modifier on keyboard but not on controller).

4. Menu open regression / crash

A NullReferenceException occurred during menu construction because inventory neighbor links were being assigned before
filter components were initialized.

———

Root Cause

  • Snappy navigation graph did not fully include filter/dropdown components.
  • Layout logic still assumed 2-column behavior in some narrow viewport paths.
  • Config model mixed keyboard/controller open conditions under shared fields.
  • SetPlayerInventoryNeighbours() depended on filter clickables that were null early in constructor flow.

———

What Was Changed

Controller navigation and interaction

  • Added filter fields and location dropdown to the clickable/snappy graph.
  • Rebuilt clickable component registration to include dynamic filter/dropdown state.
  • Added gamepad A-button activation for the currently focused component.
  • Improved neighbor links so focus traversal works consistently across top/bottom areas.

Responsive and split-screen behavior

  • Layout now uses the effective viewport dimensions for sizing/placement.
  • One-column chest layout is now properly honored in narrow/split viewports.
  • Neighbor links for chest headers/widgets were updated for 1-column mode.
  • Added compact-mode behavior for small viewports (reduced spacing/control sizing) to improve fit without breaking
    interactions.

Keyboard vs controller config independence

  • Introduced independent open conditions:
    • KeyboardRequireModifierToOpen + KeyboardOpenModifierKey
    • ControllerRequireModifierToOpen + ControllerOpenModifierButton
  • Updated open-menu logic to evaluate keyboard and controller conditions separately.
  • Kept transfer modifier behavior separate from open-menu modifiers.
  • Added legacy config migration from older fields (MenuKey, ModToOpen) and persisted migrated values.

GMCM structure and localization

  • Controls section now has separate Keyboard and Controller subsections.
  • Reordered options so “require modifier” checkbox appears before modifier binding in each subsection.
  • Improved naming clarity for settings/tooltips in localization files.
  • Replaced hardcoded controller-keyboard option text with localization keys.
  • Shortened PT-BR modifier labels to avoid checkbox/text overlap in GMCM.

Stability fix

  • Added safe fallback IDs in SetPlayerInventoryNeighbours() so menu construction no longer crashes when filter
    clickables are not yet initialized.

———

Validation

  • Project builds successfully after each change set.
  • Verified no compile errors (0 errors, 0 warnings during final build runs).
  • Branch pushed and ready for review.

Adaptive layout (visual example)

The menu layout adapts to the available viewport size. When the game window is resized or when playing in split-screen, the UI reorganizes itself (including switching to a one-column chest layout) to prevent elements from being cropped.

Below are examples of the menu adjusting to different viewport sizes.

image image

Consolidate items:

image

Multi Location Filtering:

image

New Settings Window:

image

I've been using it for a week and it's been great.

- Integrate filter fields and location dropdown into snappy gamepad navigation.
- Add A-button activation for focused components to improve gamepad interaction.
- Rebuild clickable component registration so filters/dropdown participate in focus traversal.
- Fix inventory neighbor mapping to avoid null reference during menu construction.
- Honor one-column chest layout in narrow/split viewports and adjust neighbor links.
- Add compact mode for small viewports by reducing bottom panel spacing and control sizes.
- Add independent keyboard/controller toggles for requiring modifiers when opening the menu.
- Add dedicated keyboard and controller modifier bindings used only for opening.
- Keep transfer modifier key separate from open-menu modifiers.
- Update Input.ButtonPressed logic to evaluate keyboard and controller open conditions independently.
- Improve legacy config migration from old MenuKey/ModToOpen fields and persist migrated values.
- Add localization strings for separate Keyboard and Controller sections in GMCM.
- Add labels/tooltips for independent modifier requirements and modifier bindings per device.
- Rename transfer-related key label for clarity.
- Replace hardcoded controller keyboard text with localized entries.
- Shorten PT-BR modifier requirement labels to avoid checkbox/text overlap in GMCM.
- Resolved merge conflicts against latest upstream master.
- Kept AllChestsMenu branch behavior for controller navigation, responsive layout, and independent keyboard/controller controls.
- Validated AllChestsMenu builds successfully after conflict resolution.
- Renames controller open modifier label to a shorter PT-BR variant.
- Prevents text overlap with keybind field in Generic Mod Config Menu on narrower layouts.
- No behavior changes; localization-only adjustment.
@rodolfonobrega
Copy link
Contributor Author

If you find any issue you can talk to me and i can fix it.

Sign up for free to 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