Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ADD playdate.system.setMenuImage() #101

Merged
merged 25 commits into from
Feb 21, 2025

Conversation

ninovanhooff
Copy link
Collaborator

@ninovanhooff ninovanhooff commented Feb 13, 2025

This includes a refactor of lcdbtmap out of graphics.nim

It's a bit painful with the blunt visibility modifiers of Nim (404 on the internal keyword here),

I put it in domain/lcdbitmap.nim for now.

I need this separation because I added playdate.system.setMenuImage(), which takes an LCDBitmap and I don't want system to depend on graphics. Doing that would lead to the awkward situation where you can use logToConsole anymore in graphocs.nim (cyclic dependency). So now, system and graphics can both depend on lcdbitmap instead.

I'm very much open to suggestions on this one.

Regarding the commits: Github seems to not have caught up to the merge of the bin branch, or history got rewritten. I can squash merge this to muddy up the history

@ninovanhooff ninovanhooff requested a review from Nycto February 13, 2025 21:11
@ninovanhooff ninovanhooff changed the base branch from main to dev February 13, 2025 21:11
@ninovanhooff ninovanhooff marked this pull request as draft February 13, 2025 21:13
@ninovanhooff ninovanhooff removed the request for review from Nycto February 13, 2025 21:14
Because system can now be imported without dependency cycles again
@ninovanhooff ninovanhooff marked this pull request as ready for review February 14, 2025 11:57
@ninovanhooff ninovanhooff requested a review from Nycto February 14, 2025 11:57
@@ -6,6 +6,7 @@ import sequtils

import bindings/[api, types]
import bindings/system
import domain/lcdbitmap {.all.}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use privateAccess instead of all?

Copy link
Collaborator Author

@ninovanhooff ninovanhooff Feb 16, 2025

Choose a reason for hiding this comment

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

That seems not to work for fields, possibly only for procs

(I'm using it to access LCDBItmap.resource)

@ninovanhooff ninovanhooff requested a review from Nycto February 16, 2025 11:12
@ninovanhooff ninovanhooff merged commit 1c6f5bc into samdze:dev Feb 21, 2025
8 checks passed
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.

2 participants