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

Added typed properties support and properties for TileMap and Layer #3

Merged
merged 7 commits into from
May 22, 2020
Merged

Conversation

klapacz
Copy link
Contributor

@klapacz klapacz commented Apr 18, 2020

No description provided.

lib/src/layer.dart Outdated Show resolved Hide resolved
lib/src/layer.dart Outdated Show resolved Hide resolved
lib/src/tile.dart Outdated Show resolved Hide resolved
lib/src/tile_map.dart Outdated Show resolved Hide resolved
final a = value.substring(1, 3);
final rgb = value.substring(3);

map[name] = '#' + rgb + a;
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what this color type entails but on Flame/Flutter we often use colors as ARGB, not RGBA. (eg Color class constructor)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there method to check if environment is web? And then optional parse to RGBA. In web ARGB is useless.

Copy link
Member

Choose a reason for hiding this comment

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

hum I thought dart would standardize that... let's leave this as is but please add a todo comment, it's clearly an edge case and we can study this later. but I prefer to follow dart conventions, flutter-web should be translating whatever it needs.

lib/src/tileset.dart Outdated Show resolved Hide resolved
lib/src/tmx_object.dart Outdated Show resolved Hide resolved
lib/src/tmx_object.dart Outdated Show resolved Hide resolved
Copy link
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

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

I have some comments!

@klapacz klapacz requested a review from luanpotter April 21, 2020 09:44
@klapacz
Copy link
Contributor Author

klapacz commented Apr 22, 2020

@luanpotter I added commit with changes.


properties = TileMapParser._parseProperties(
TileMapParser._getPropertyNodes(element),
);
Copy link
Member

Choose a reason for hiding this comment

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

it seems it would be useful to have a TileMapParser._parsePropertiesFromXML method to be used in 3 places

Copy link
Member

@luanpotter luanpotter left a comment

Choose a reason for hiding this comment

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

LGTM with one nit

lib/src/tile_map.dart Outdated Show resolved Hide resolved
Copy link
Member

@erickzanardo erickzanardo left a comment

Choose a reason for hiding this comment

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

We need to add an entry to the CHANGELOG and finish these missing comments by @luanpotter

@luanpotter luanpotter merged commit 4dc2630 into flame-engine:master May 22, 2020
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.

None yet

3 participants