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 editing for place names #184

Merged
merged 3 commits into from
May 14, 2023
Merged

Conversation

jonko0493
Copy link
Member

Closes #95.

image

@jonko0493 jonko0493 requested a review from WiIIiam278 May 14, 2023 02:56
@jonko0493 jonko0493 self-assigned this May 14, 2023
Copy link
Member

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

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

Works great!

src/SerialLoops/Editors/PlaceEditor.cs Show resolved Hide resolved
string spaceAdjustedText = PlaceName.Replace(" ", " ");
SKBitmap newPlaceBitmap = new(PlaceGraphic.Width, PlaceGraphic.Height);
SKCanvas canvas = new(newPlaceBitmap);
SKColor bgColor = new SKColor(0, 249, 0);
Copy link
Member

Choose a reason for hiding this comment

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

It might be nice to add a bool ("preview") flag to this method -- if set, instead of painting the BG green it'll just be transparent. That way, this can be passed to render a preview without the green BG, while the method can be passed without the preview bool to get the real image.

Copy link
Member Author

Choose a reason for hiding this comment

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

I kind of disagree here tbh, bc GetNewPlaceGraphic shouldn't be used for previews, imo. There's a separate GetPreview method that does that; GetNewPlaceGraphic should only be used for replacing the place graphic.

@jonko0493
Copy link
Member Author

Going to merge for now, but willing to change my mind on some feedback with further discussion!

@jonko0493 jonko0493 merged commit 13ede7b into haroohie-club:main May 14, 2023
@jonko0493 jonko0493 deleted the PlaceNameEditing branch May 14, 2023 18:20
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.

Make place items editable
2 participants