Problem
Hello, I've looked through the repository, and couldn't find example, which showcases how to load a collection of texture atlas layouts into a HashMap. I've found example for loading into a vector, but that's not what I wanted.
Current solution
({
"layouts": [
TextureAtlasLayout (
tile_size_x: 32.,
tile_size_y: 32.,
columns: 12,
rows: 12,
),
TextureAtlasLayout (
tile_size_x: 32.,
tile_size_y: 64.,
columns: 12,
rows: 6,
),
TextureAtlasLayout (
tile_size_x: 64.,
tile_size_y: 32.,
columns: 6,
rows: 12,
),
],
})
I want that each texture atlas layout had a string key, which I could use to access the layout inside the map.
Workaround
I already thought of writing my own RON parser into a HashMap, but that's not the greatest solution.
Also I can map vector indices into string names, but that will be also a bad idea.
Problem
Hello, I've looked through the repository, and couldn't find example, which showcases how to load a collection of texture atlas layouts into a HashMap. I've found example for loading into a vector, but that's not what I wanted.
Current solution
({ "layouts": [ TextureAtlasLayout ( tile_size_x: 32., tile_size_y: 32., columns: 12, rows: 12, ), TextureAtlasLayout ( tile_size_x: 32., tile_size_y: 64., columns: 12, rows: 6, ), TextureAtlasLayout ( tile_size_x: 64., tile_size_y: 32., columns: 6, rows: 12, ), ], })I want that each texture atlas layout had a string key, which I could use to access the layout inside the map.
Workaround
I already thought of writing my own RON parser into a HashMap, but that's not the greatest solution.
Also I can map vector indices into string names, but that will be also a bad idea.