gurkenlabs / litiengine

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

Add spritesheet import logic #813

Closed Hades948 closed 3 months ago

Hades948 commented 4 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.