List of usage examples for com.badlogic.gdx.graphics.g2d NinePatch setTopHeight
public void setTopHeight(float topHeight)
From source file:de.cubicvoxel.openspacebox.ingame.ui.hud.SectorButton.java
License:Open Source License
private static ImageButtonStyle createStyle() { val thickness = 25; NinePatch unselected = new NinePatch(OpenSpaceBox.getAsset(TextureAsset.UI_BOUNDINGBOX), 110, 110, 110, 110);/* w w w. j av a2 s. c o m*/ unselected.setRightWidth(thickness); unselected.setLeftWidth(thickness); unselected.setTopHeight(thickness); unselected.setBottomHeight(thickness); NinePatchDrawable unselectedDrawable = new NinePatchDrawable(unselected); NinePatch selected = new NinePatch(OpenSpaceBox.getAsset(TextureAsset.UI_BOUNDINGBOX_SELECTED), 128, 128, 128, 128); selected.setRightWidth(thickness); selected.setLeftWidth(thickness); selected.setTopHeight(thickness); selected.setBottomHeight(thickness); NinePatchDrawable selectedDrawable = new NinePatchDrawable(selected); ImageButtonStyle imageButtonStyle = new ImageButtonStyle(); imageButtonStyle.up = unselectedDrawable; imageButtonStyle.down = selectedDrawable; return imageButtonStyle; }
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);/*from w w w . j av a2s . com*/ ninePatch.setMiddleWidth(1); return new NinePatchDrawable(ninePatch); }
From source file:de.cubicvoxel.openspacebox.util.widget.OsbWindowStyle.java
License:Open Source License
public OsbWindowStyle() { titleFont = OpenSpaceBox.getAsset(FontAsset.WINDOW_TITLE); titleFont.getData().setScale(0.5f, 0.5f); NinePatch ninePatch = new NinePatch(OpenSpaceBox.getAsset(TextureAsset.UI_WINDOW), 610, 610, 610, 610); ninePatch.setTopHeight(BORDER_THICKNESS); ninePatch.setBottomHeight(BORDER_THICKNESS); ninePatch.setLeftWidth(BORDER_THICKNESS); ninePatch.setRightWidth(BORDER_THICKNESS); background = new NinePatchDrawable(ninePatch); }