Skip to content

Fix end table clipping in tutorial overlay#184

Merged
candour merged 1 commit into
mainfrom
fix-end-table-clipping-nodpi-9663305868862948666
Jun 5, 2026
Merged

Fix end table clipping in tutorial overlay#184
candour merged 1 commit into
mainfrom
fix-end-table-clipping-nodpi-9663305868862948666

Conversation

@candour
Copy link
Copy Markdown
Owner

@candour candour commented Jun 5, 2026

The issue was caused by Android's automatic density scaling. When assets are placed in the default drawable/ folder, they are assumed to be mdpi (160dpi). On higher-density devices, Android scales them up automatically. Since the code in TutorialOverlay.kt and GameBoard.kt uses hardcoded pixel dimensions from SpriteConstants.kt to crop and draw these sprites, the scaling caused the coordinates to point to the wrong parts of the (now larger) bitmap, resulting in clipping or incorrect rendering.

Moving these assets to drawable-nodpi/ ensures they are loaded at their original resolution regardless of device density, which is standard practice for game assets intended for manual canvas drawing.


PR created automatically by Jules for task 9663305868862948666 started by @candour

Moved end_table.png and sprite_sheet.png to the drawable-nodpi folder.
This prevents Android from automatically scaling these bitmaps based on
screen density, ensuring that the pixel-based coordinates used for
rendering on the Canvas (e.g. in TutorialOverlay and GameBoard) match
the actual dimensions of the loaded bitmaps.

Co-authored-by: candour <4670475+candour@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (2)
  • app/src/main/res/drawable-nodpi/end_table.png is excluded by !**/*.png
  • app/src/main/res/drawable-nodpi/sprite_sheet.png is excluded by !**/*.png

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 623bff9a-5c5c-4a81-bd76-e8d204e16950

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-end-table-clipping-nodpi-9663305868862948666

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 and usage tips.

@candour candour merged commit da3a5ca into main Jun 5, 2026
3 checks passed
@candour candour deleted the fix-end-table-clipping-nodpi-9663305868862948666 branch June 5, 2026 05:39
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

Build Successful! 🚀

Download APK

Note: This link will be removed when the PR is closed.

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