private void prepareNinepatch(AssetsInterface assets, float sizeMult) { TextureAtlas atlas = assets.getTextureAtlas(this.atlasName); TextureAtlas.AtlasRegion ninePatchTexture = atlas.findRegion(progressImageFrame); NinePatch patch = new NinePatch(ninePatchTexture, this.ninePatchLeft, this.ninePatchRight, 0, 0); NinePatchDrawable ninePatchDrawable = new NinePatchDrawable(patch); ninePatchDrawable.setMinWidth(ninePatchDrawable.getMinWidth() * sizeMult); ninePatchDrawable.setMinHeight(ninePatchDrawable.getMinHeight() * sizeMult); TextButton.TextButtonStyle textButtonStyle = new TextButton.TextButtonStyle(ninePatchDrawable, ninePatchDrawable, ninePatchDrawable, assets.getFont(this.fontName)); this.progressBarNinePatch = new TextButton("", textButtonStyle); this.progressBarNinePatch.setWidth(ninePatchTexture.originalWidth); this.progressBarOriginalWidth = ninePatchTexture.originalWidth; this.progressBarNinePatch.setX(this.progressImagePaddingLeft); }