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

Minor sprite aligner enhancements #10249

Merged
merged 3 commits into from Dec 17, 2022
Merged

Conversation

PeterN
Copy link
Member

@PeterN PeterN commented Dec 17, 2022

Motivation / Problem

Using the debug sprite aligner tool does not give very useful feedback on what is happening when aligning a sprite.

Description

This PR adds two buttons:

  • Centre sprite toggles whether the sprite should be either centred within the panel, or drawn with the offset centred. This has the effect of reversing the visual operation of the nudge buttons, although their action doesn't change.
  • Crosshair toggles drawing a dotted crosshair at the sprite offset. This makes the offset clearly visible and so requires less fiddling with relative adjustments.

image

The wording and position of the buttons isn't all that great to be honest, but putting them there did mean that the window didn't need to be rearranged.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, gs_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@PeterN
Copy link
Member Author

PeterN commented Dec 17, 2022

Changed wording to make it not look like and action, and also improved the layout of the list.

image

@PeterN
Copy link
Member Author

PeterN commented Dec 17, 2022

Millions of force-pushes to satisfy the CI string linter :)

@2TallTyler 2TallTyler added size: small This Pull Request is small, and should be relative easy to process preview This PR is receiving preview builds labels Dec 17, 2022
@DorpsGek DorpsGek temporarily deployed to preview-pr-10249 December 17, 2022 13:42 Inactive
Copy link
Member

@2TallTyler 2TallTyler left a comment

Choose a reason for hiding this comment

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

I'm not sure the Offset/Sprite centred button should be be lowered depending on its setting. That implies an on/off toggle, not an A/B toggle. I could be easily convinced if there's a reason it's this way. 🙂

@PeterN
Copy link
Member Author

PeterN commented Dec 17, 2022

True, it was originally a toggle, then I decided to make it clearer with the text changing instead. I'll change it.

@PeterN
Copy link
Member Author

PeterN commented Dec 17, 2022

Hmm, actually that's how our buttons work, without it being lowered, the text wouldn't change. See the "Manual" / "Freeform" edges buttons on the terrain generator.

Copy link
Member

@2TallTyler 2TallTyler left a comment

Choose a reason for hiding this comment

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

In that case, looks fine to me!

@PeterN PeterN merged commit 5eb7e1d into OpenTTD:master Dec 17, 2022
@PeterN PeterN deleted the sprite-aligner branch December 17, 2022 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview This PR is receiving preview builds size: small This Pull Request is small, and should be relative easy to process
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants