-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix: ObjectAlignment
enum names
#74
fix: ObjectAlignment
enum names
#74
Conversation
This reverts commit c8eb735.
Would you want to leave the enum symbols in |
The lint warning were not for the enum change, but I made the change anyways 🙂 |
@spydon I noticed that the Most of the warning are easily fixable, but these two seem to be from flame_lint:
|
ObjectAlignment
enum valuesObjectAlignment
enum values
ObjectAlignment
enum valuesObjectAlignment
enum names
@ufrshubham aah yes, that is needed for the "new" Melos version. You can fix them in this PR if it is easier for you. If you upgrade flame_lint to 1.1.1 the warning should go away. |
/// Returns the [ObjectAlignment] based on given [name]. | ||
/// | ||
/// Throws an [ArgumentError] if no match is found. | ||
static ObjectAlignment byName(String name) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
static ObjectAlignment byName(String name) { | |
static ObjectAlignment fromName(String name) { |
Maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to fromName
Haha aah, unlucky with one line going past 80 now 😅 |
Description
Name of some of the enum values of
ObjectAlignment
were not matching the values from Tiled. As a result, tilesets withtopLeft
,topRight
,bottomLeft
andbottomRight
alignment couldn't be parsed. https://doc.mapeditor.org/en/stable/reference/tmx-map-format/#tmx-tilesetAnother problem that was discovered after fixing the names was with the
byName
method from theEnumByName
extension. That method was not using names fromObjectAlignmentExtension
that Tiled defines. To fix that, this PR adds abyName
static method forObjectAlignment
which uses the correct names.Checklist
fix:
,feat:
,docs:
etc).docs
and added dartdoc comments with///
.examples
.Breaking Change
Related Issues