gurkenlabs / litiengine

LITIENGINE 🕹 The pure 2D java game engine.
https://litiengine.com/
MIT License
741 stars 93 forks source link

Add spritesheet import logic #813

Closed Hades948 closed 8 months ago

Hades948 commented 8 months ago

Add logic to the SpritesheetImportPanel that automatically sets the default columns/rows if the file width is divisible by the file height.

This new logic does not apply when opening the spritesheet from a SpritesheetResource. The user could, for example, have a 64x16 spritesheet that they have already set to be one row and two columns. The new logic would change the number of columns to 4 when opening the spritesheet from a SpritesheetResource. This is likely not what the user would want, so the new logic is not applied in this case.