From e4800bc967a9f320cd4704db0c061d9db562cb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 17 Dec 2019 18:45:57 +0100 Subject: core:Assets : add getTextureRegion() --- core/src/ch/asynk/gdx/boardgame/Assets.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/ch/asynk/gdx/boardgame/Assets.java b/core/src/ch/asynk/gdx/boardgame/Assets.java index d065d76..690c547 100644 --- a/core/src/ch/asynk/gdx/boardgame/Assets.java +++ b/core/src/ch/asynk/gdx/boardgame/Assets.java @@ -6,6 +6,7 @@ import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.BitmapFont; import com.badlogic.gdx.graphics.g2d.NinePatch; import com.badlogic.gdx.graphics.g2d.TextureAtlas; +import com.badlogic.gdx.graphics.g2d.TextureRegion; public class Assets extends AssetManager { @@ -14,6 +15,11 @@ public class Assets extends AssetManager return get(assetName, Texture.class); } + public TextureRegion getTextureRegion(String assetName) + { + return new TextureRegion(get(assetName, Texture.class)); + } + public NinePatch getNinePatch(String assetName, int left, int right, int top, int bottom) { return new NinePatch(get(assetName, Texture.class), left, right, top, bottom); -- cgit v1.1-2-g2b99