Example usage for com.badlogic.gdx.graphics.g2d NinePatch setMiddleWidth

List of usage examples for com.badlogic.gdx.graphics.g2d NinePatch setMiddleWidth

Introduction

In this page you can find the example usage for com.badlogic.gdx.graphics.g2d NinePatch setMiddleWidth.

Prototype

public void setMiddleWidth(float middleWidth) 

Source Link

Document

Set the width of the middle column of the patch.

Usage

From source file:de.cubicvoxel.openspacebox.ingame.ui.logbook.LogEntryView.java

License:Open Source License

private NinePatchDrawable createBackground() {
    NinePatch ninePatch = new NinePatch(OpenSpaceBox.getAsset(TextureAsset.UI_PANEL), 270, 270, 270, 270);
    ninePatch.setTopHeight(DRAWABLE_BORDER_THICKNESS);
    ninePatch.setBottomHeight(DRAWABLE_BORDER_THICKNESS);
    ninePatch.setLeftWidth(DRAWABLE_BORDER_THICKNESS);
    ninePatch.setRightWidth(DRAWABLE_BORDER_THICKNESS);
    ninePatch.setMiddleHeight(1);// w w w  .  j a  va2 s .  c o m
    ninePatch.setMiddleWidth(1);
    return new NinePatchDrawable(ninePatch);
}