Skip to content

Improve controller editor visibility and Xbox shoulder labels#1697

Open
Nightwalker743 wants to merge 1 commit into
utkarshdalal:masterfrom
Nightwalker743:feature/controller-editor-transparent-grid-xbox-labels-pr
Open

Improve controller editor visibility and Xbox shoulder labels#1697
Nightwalker743 wants to merge 1 commit into
utkarshdalal:masterfrom
Nightwalker743:feature/controller-editor-transparent-grid-xbox-labels-pr

Conversation

@Nightwalker743

@Nightwalker743 Nightwalker743 commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Description

These are requested features here: https://discord.com/channels/1378308569287622737/1524983521926709298/1524983631284670658

Adds a translucent edit-mode background so the game remains visible behind the on-screen controller editor. Purpose is so users can see the game while placing on-screen buttons to avoid putting them over in-game UI.

Renames displayed gamepad shoulder/trigger labels from PlayStation-style L1/R1/L2/R2 to Xbox-style LB/RB/LT/RT since our gamepad uses A,B,X,Y buttons so this makes more sense.

Recording

image

Type of Change

  • Bug fix
  • Performance / stability improvement
  • Compatibility improvements
  • Other (requires prior approval)

Checklist

  • If I have access to #code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.
  • This change aligns with the current project scope (core functionality, stability, or performance). If not, it has been explicitly approved beforehand.
  • I have attached a recording of the change.
  • I have read and agree to the contribution guidelines in CONTRIBUTING.md.

Summary by cubic

Adds a translucent backdrop to the controller editor so the game stays visible while placing on-screen controls. Updates shoulder/trigger labels to Xbox-style LB/RB/LT/RT across the UI.

  • New Features
    • Semi-transparent edit-mode overlay and softened grid colors to improve control placement visibility.
    • Xbox-style shoulder/trigger labels (LB/RB/LT/RT) in Binding.toString() and all localized strings.xml entries.

Written for commit 32625ef. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • UI Improvements
    • Simplified physical controller button labels to LB, RB, LT, and RT across supported languages.
    • Added clear names for shoulder and trigger bindings when displayed.
    • Improved grid visibility by using a partially transparent background and grid lines.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Updated gamepad shoulder and trigger labels to use LB/RB/LT/RT across localized resources, added explicit binding string mappings, and made input grid rendering semi-transparent.

Changes

Gamepad UI updates

Layer / File(s) Summary
Gamepad binding labels
app/src/main/java/com/winlator/inputcontrols/Binding.java, app/src/main/res/values*/strings.xml
Explicit L1/R1/L2/R2 mappings and localized labels now display LB/RB/LT/RT instead of combined names.
Input grid transparency
app/src/main/java/com/winlator/widget/InputControlsView.java
Grid background and line colors now use semi-transparent ARGB values.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

Suggested reviewers: phobos665, utkarshdalal

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: controller editor visibility and Xbox-style shoulder labels.
Description check ✅ Passed The PR description includes the required sections and enough context, though the recording is a static image rather than a GIF.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Nightwalker743 Nightwalker743 marked this pull request as ready for review July 11, 2026 04:49

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
app/src/main/java/com/winlator/widget/InputControlsView.java (1)

183-187: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Grid translucency is hardcoded instead of using the existing overlayOpacity setting.

The new semi-transparent colors (0x80000000, 0x80303030, 0x99424242) achieve the intended "see-through editor" effect, but they're fixed constants rather than derived from overlayOpacity, which already drives getPrimaryColor()/getSecondaryColor() for control elements elsewhere in this class. As a result, the edit-mode background/grid won't respect the user's configured "controls_opacity" preference the way the rest of the overlay does.

Consider deriving these alphas from overlayOpacity (or a dedicated named constant) for consistency and easier tuning.

Also applies to: 199-199

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@app/src/main/java/com/winlator/widget/InputControlsView.java` around lines
183 - 187, Replace the hardcoded alpha values used by the edit-mode background
and grid drawing in InputControlsView with values derived from the existing
overlayOpacity setting, consistent with getPrimaryColor() and
getSecondaryColor(). Update all affected color assignments, including the
additional color at the later grid-drawing location, while preserving the
intended RGB values and using a clear conversion or named opacity constants.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@app/src/main/java/com/winlator/widget/InputControlsView.java`:
- Around line 183-187: Replace the hardcoded alpha values used by the edit-mode
background and grid drawing in InputControlsView with values derived from the
existing overlayOpacity setting, consistent with getPrimaryColor() and
getSecondaryColor(). Update all affected color assignments, including the
additional color at the later grid-drawing location, while preserving the
intended RGB values and using a clear conversion or named opacity constants.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1b584f9a-99a6-48ff-ac94-fc96bba15242

📥 Commits

Reviewing files that changed from the base of the PR and between b6fd912 and 32625ef.

📒 Files selected for processing (17)
  • app/src/main/java/com/winlator/inputcontrols/Binding.java
  • app/src/main/java/com/winlator/widget/InputControlsView.java
  • app/src/main/res/values-da/strings.xml
  • app/src/main/res/values-de/strings.xml
  • app/src/main/res/values-es/strings.xml
  • app/src/main/res/values-fr/strings.xml
  • app/src/main/res/values-it/strings.xml
  • app/src/main/res/values-ja/strings.xml
  • app/src/main/res/values-ko/strings.xml
  • app/src/main/res/values-pl/strings.xml
  • app/src/main/res/values-pt-rBR/strings.xml
  • app/src/main/res/values-ro/strings.xml
  • app/src/main/res/values-ru/strings.xml
  • app/src/main/res/values-uk/strings.xml
  • app/src/main/res/values-zh-rCN/strings.xml
  • app/src/main/res/values-zh-rTW/strings.xml
  • app/src/main/res/values/strings.xml

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 17 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread app/src/main/java/com/winlator/widget/InputControlsView.java
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