Changes to API

Should make integration with game engines easier in general.

Puts the burden of color parsing on Pytiled. As well as formatting layer data into a two dimensional list from a straight one dimensional.
This commit is contained in:
Darren Eberly
2021-02-21 00:58:30 -05:00
parent ed825c5b71
commit 674b4b50c4
24 changed files with 700 additions and 738 deletions

View File

@@ -261,7 +261,7 @@ RECTANGLES = [
coordinates=common_types.OrderedPair(39.0678640445606, 131.826759122428),
properties={
"bool property": False,
"color property": common_types.Color("#ffaa0000"),
"color property": common_types.Color(255, 170, 0, 0),
"file property": Path("../../../../../../dev/null"),
"float property": 42.1,
"int property": 8675309,
@@ -1044,7 +1044,7 @@ TEXTS = [
rotation=0,
text="Hello World",
wrap=True,
color="#aa0000",
color=common_types.Color(170, 0, 0, 255),
type="text",
visible=True,
size=common_types.Size(92.375, 19),