Add missing TextObject to test map

This commit is contained in:
Daniel Cronqvist 2025-04-26 21:34:24 +02:00
parent 5587aeed47
commit d86ad2dc10
3 changed files with 48 additions and 3 deletions

View file

@ -21,7 +21,7 @@ public partial class TestData
Version = "1.10", Version = "1.10",
TiledVersion = "1.11.2", TiledVersion = "1.11.2",
NextLayerID = 8, NextLayerID = 8,
NextObjectID = 7, NextObjectID = 8,
Tilesets = [ Tilesets = [
new Tileset new Tileset
{ {
@ -104,6 +104,25 @@ public partial class TestData
Y = 110.333f, Y = 110.333f,
Width = 64, Width = 64,
Height = 146 Height = 146
},
new TextObject
{
ID = 7,
Name = "Text1",
Rotation = 0,
Text = "Hello World!",
Visible = true,
Width = 116.869f,
Height = 19f,
X = 52.5197f,
Y = 4.0107f,
PixelSize = 18,
Wrap = true,
Bold = true,
Italic = true,
Underline = true,
Strikeout = true,
Kerning = false
} }
] ]
}, },

View file

@ -62,6 +62,29 @@
"width":64, "width":64,
"x":-35, "x":-35,
"y":110.333 "y":110.333
},
{
"height":19,
"id":7,
"name":"Text1",
"rotation":0,
"text":
{
"bold":true,
"italic":true,
"kerning":false,
"pixelsize":18,
"strikeout":true,
"text":"Hello World!",
"underline":true,
"wrap":true
},
"type":"",
"visible":true,
"width":116.869277732794,
"x":52.5197,
"y":4.0107
}], }],
"opacity":1, "opacity":1,
"type":"objectgroup", "type":"objectgroup",
@ -148,7 +171,7 @@
"y":0 "y":0
}], }],
"nextlayerid":8, "nextlayerid":8,
"nextobjectid":7, "nextobjectid":8,
"orientation":"orthogonal", "orientation":"orthogonal",
"renderorder":"right-down", "renderorder":"right-down",
"tiledversion":"1.11.2", "tiledversion":"1.11.2",

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="5" height="5" tilewidth="32" tileheight="32" infinite="0" nextlayerid="8" nextobjectid="7"> <map version="1.10" tiledversion="1.11.2" orientation="orthogonal" renderorder="right-down" width="5" height="5" tilewidth="32" tileheight="32" infinite="0" nextlayerid="8" nextobjectid="8">
<tileset firstgid="1" source="tileset.tsx"/> <tileset firstgid="1" source="tileset.tsx"/>
<group id="2" name="Root"> <group id="2" name="Root">
<objectgroup id="3" name="Objects"> <objectgroup id="3" name="Objects">
@ -12,6 +12,9 @@
</object> </object>
<object id="5" template="poly.tx" x="20.6667" y="114.667"/> <object id="5" template="poly.tx" x="20.6667" y="114.667"/>
<object id="6" name="TileObj" gid="7" x="-35" y="110.333" width="64" height="146"/> <object id="6" name="TileObj" gid="7" x="-35" y="110.333" width="64" height="146"/>
<object id="7" name="Text1" x="52.5197" y="4.0107" width="116.869" height="19">
<text pixelsize="18" wrap="1" bold="1" italic="1" underline="1" strikeout="1" kerning="0">Hello World!</text>
</object>
</objectgroup> </objectgroup>
<group id="5" name="Sub"> <group id="5" name="Sub">
<layer id="7" name="Tile 3" width="5" height="5"> <layer id="7" name="Tile 3" width="5" height="5">