/** Sets this drawable's ninepatch and set the min width, min height, top height, right width, bottom height, and left width to * the patch's padding. */ public void setPatch (NinePatch patch) { this.patch = patch; setMinWidth(patch.getTotalWidth()); setMinHeight(patch.getTotalHeight()); setTopHeight(patch.getPadTop()); setRightWidth(patch.getPadRight()); setBottomHeight(patch.getPadBottom()); setLeftWidth(patch.getPadLeft()); }
/** Sets this drawable's ninepatch and set the min width, min height, top height, right width, bottom height, and left width to * the patch's padding. */ public void setPatch (NinePatch patch) { this.patch = patch; setMinWidth(patch.getTotalWidth()); setMinHeight(patch.getTotalHeight()); setTopHeight(patch.getPadTop()); setRightWidth(patch.getPadRight()); setBottomHeight(patch.getPadBottom()); setLeftWidth(patch.getPadLeft()); }
/** Sets this drawable's ninepatch and set the min width, min height, top height, right width, bottom height, and left width to * the patch's padding. */ public void setPatch (NinePatch patch) { this.patch = patch; setMinWidth(patch.getTotalWidth()); setMinHeight(patch.getTotalHeight()); setTopHeight(patch.getPadTop()); setRightWidth(patch.getPadRight()); setBottomHeight(patch.getPadBottom()); setLeftWidth(patch.getPadLeft()); }
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); }