libktx / ktx

Kotlin extensions for the libGDX game framework
https://libktx.github.io/
Creative Commons Zero v1.0 Universal
1.37k stars 74 forks source link

(#485) make drawable and drawableName optional for scene2d image factory #487

Closed Quillraven closed 3 months ago

Quillraven commented 3 months ago

PR for #485.

I did not adjust the factory methods for Texture, TextureRegion and NinePatch because I think they will throw an exception, but more importantly, I think in those cases it does not make sense. Drawable and drawable name do make sense because in a Skin, from what I know, you can reference Drawables and in the case of an image they are optional.

czyzby commented 3 months ago

Thanks for the PR, I left some minor comments.

Quillraven commented 3 months ago

Issues should be resolved now. Regarding .editorconfig: I had a quick look and I could only find that there are IntelliJ specific properties that are supported. I guess the "starimport" properties are the ones that would be needed. But since they have the prefix "ij" it will most likely only work in IntelliJ.

image

The thing that I did to solve it was a setting directly in IntelliJ: image

The default setting was "Use import with '*' when at least 5 names used / 3 names used

czyzby commented 3 months ago

Thanks, the changes should be available in the snapshot release shortly. I'll try to update the changelog and possibly push a new release over the weekend.

czyzby commented 3 months ago

Just wanted to say that automatic snapshot upload failed, since I had to regenerate an access token into Maven central repository. Should be fixed now.

Quillraven commented 3 months ago

Haha had the same issue with Fleks the last time. Welcome to the club 😉