Skip to content

Token layout tab - nerfed version #5360

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

Merged
merged 51 commits into from
Apr 20, 2025

Conversation

bubblobill
Copy link
Collaborator

@bubblobill bubblobill commented Apr 13, 2025

Identify the Bug or Feature request

resolves #5097

Description of the Change

Cut down version of the changes in #5104

This PR makes no changes to the token class and does not implement independant scaling by axes or rotation of the token image.

Possible Drawbacks

It is lame

Documentation Notes

Moved token layout panel to its own tab

Release Notes

Moved token layout panel to its own tab


This change is Reviewable

clean up some property names, e.g. isFlippedIso to flippedIso so that getter becomes isFlippedIso().

Unnecessary Token removed from property tokenOpacity. Now just opacity.

Reordered to keep layout props together.
Added new layout prop imageRotation

Updated tokenLayoutProp macro functions
Token drawing moved to TokenRenderer
Facing-arrow painting moved to FacingArrowRenderer
Some functionality moved to ImageUtils
Remove old layout panel
Icons embedded
@github-actions github-actions bot added the feature Adding functionality that adds value label Apr 13, 2025
@bubblobill bubblobill requested review from kwvanderlinde and cwisniew and removed request for kwvanderlinde April 14, 2025 08:15
@bubblobill bubblobill self-assigned this Apr 14, 2025
Fixed problem with slider not updating in SpinnerSliderPaired with
mouse wheel event
Copy link
Collaborator

@kwvanderlinde kwvanderlinde left a comment

Choose a reason for hiding this comment

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

I like how it looks. There's just one bug to chase down yet before merging.

When I set offsets, the selection box for the token is offset by the expected amount, but the token image is offset by twice that amount. E.g., if I place a token here on a 100x100 grid:
image

Then set the offsets to -50, -50, this is what happens
image

And this is what should happen, and which is what happens on 1.16.2:
image

@bubblobill
Copy link
Collaborator Author

Then set the offsets to -50, -50, this is what happens
image

Which is mostly right because this ->

And this is what should happen, and which is what happens on 1.16.2:
image

is wrong. What you should be seeing is this

image

The token layout should primarily be used for correcting the image placement within the cell, i.e. its apparent position. example, a little zoom and some offset makes this guy fill the space and leaves his arm out in the cold.:
image

Changing the actual position of the token is not related to the layout.

Changing the actual position of the token relative to its footprint should be handled in footprints. Part of a whole bundle of follow-on improvements to go with implementing the new footprint stuff.

Check the new commit which leaves the selection marquee where it belongs.

@bubblobill bubblobill removed the request for review from cwisniew April 20, 2025 10:56
@kwvanderlinde kwvanderlinde added this pull request to the merge queue Apr 20, 2025
Merged via the queue into RPTools:develop with commit d5d7b05 Apr 20, 2025
4 checks passed
@kwvanderlinde kwvanderlinde linked an issue May 16, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Adding functionality that adds value
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Move token layout panel to its own tab in edit token dialogue [Feature]: Improved and enhanced token layout options
2 participants