use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class UIItemCollapsibleProperties method createCollapsibleWidget.
private void createCollapsibleWidget() {
mainTable = new VisTable();
collapsibleWidget = new CollapsibleWidget(mainTable);
row();
add(collapsibleWidget).expand();
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class UIItemCollapsibleProperties method crateHeaderTable.
public Table crateHeaderTable() {
header = new VisTable();
header.setTouchable(Touchable.enabled);
header.setBackground(VisUI.getSkin().getDrawable("expandable-properties-active-bg"));
header.add(StandardWidgetsFactory.createLabel(title)).left().expandX().padRight(6).padLeft(8);
VisImageButton button = StandardWidgetsFactory.createImageButton("expandable-properties-button");
header.add(button).padRight(8);
header.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
collapse(header);
}
});
return header;
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class ProjectExportSettings method getDimensionsTable.
private Table getDimensionsTable() {
Integer[] data = { 512, 1024, 2048, 4096 };
VisTable dimensionsTable = new VisTable();
widthSelectBox.setItems(data);
dimensionsTable.add(new VisLabel("Width:")).left().padRight(3);
dimensionsTable.add(widthSelectBox).width(85).height(21).padRight(3);
dimensionsTable.row().padTop(10);
heightSelectBox.setItems(data);
dimensionsTable.add(new VisLabel("Height:")).left().padRight(3);
dimensionsTable.add(heightSelectBox).width(85).height(21).left();
return dimensionsTable;
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class AbstractGridTilesTab method initTiles.
private void initTiles(String tileName, int type) {
content.clear();
tiles.clear();
VisTable listTable = new VisTable();
pane = StandardWidgetsFactory.createScrollPane(listTable);
pane.setScrollingDisabled(true, false);
content.add(pane).padTop(10);
listTable.top();
if (tileIndex >= tilesCount && !tileName.equals("")) {
tilesCount = tileIndex + 1;
}
for (int i = 0; i < tilesCount + 1; i++) {
VisImageButton ct;
VisImageButton.VisImageButtonStyle imageBoxStyle = new VisImageButton.VisImageButtonStyle();
NinePatchDrawable inactive = new NinePatchDrawable(new NinePatch(resourcesManager.getPluginNinePatch("image-Box-inactive")));
NinePatchDrawable active = new NinePatchDrawable(new NinePatch(resourcesManager.getPluginNinePatch("image-Box-active")));
imageBoxStyle.up = inactive;
imageBoxStyle.down = active;
imageBoxStyle.checked = active;
imageBoxStyle.over = active;
Drawable tileDrawable = null;
if (i < savedTiles.size) {
int t = savedTiles.get(i).getEntityType();
if (t == SpineItemType.SPINE_TYPE) {
tileDrawable = resourcesManager.getSpineDrawable(savedTiles.get(i).getRegionName());
} else {
tileDrawable = new TextureRegionDrawable(resourcesManager.getTextureRegion(savedTiles.get(i).getRegionName(), t));
}
} else if (!tileName.equals("")) {
if (i == tileIndex) {
if (type == SpineItemType.SPINE_TYPE) {
tileDrawable = resourcesManager.getSpineDrawable(tileName);
} else {
tileDrawable = new TextureRegionDrawable(resourcesManager.getTextureRegion(tileName, type));
}
}
}
imageBoxStyle.imageUp = tileDrawable;
imageBoxStyle.imageDown = tileDrawable;
imageBoxStyle.imageChecked = tileDrawable;
imageBoxStyle.imageOver = tileDrawable;
ct = new VisImageButton(imageBoxStyle);
if (i < savedTiles.size) {
ct.setUserObject(savedTiles.get(i).getRegionName());
}
int index = i;
ct.addListener(getGridTabInputListener(index));
listTable.add(ct).width(40).height(40).pad(3);
if ((i + 1) % 4 == 0) {
listTable.row();
}
tiles.add(ct);
}
content.pack();
}
use of com.kotcrab.vis.ui.widget.VisTable in project HyperLap2D by rednblackgames.
the class UIAnimationsTab method crateScrollPane.
@Override
protected VisScrollPane crateScrollPane() {
animationsTable = new VisTable();
HyperLap2DFacade.getInstance().sendNotification(UIResourcesBoxMediator.ADD_RESOURCES_BOX_TABLE_SELECTION_MANAGEMENT, animationsTable);
VisScrollPane scrollPane = StandardWidgetsFactory.createScrollPane(animationsTable);
scrollPane.setScrollingDisabled(true, false);
return scrollPane;
}
Aggregations