use of games.rednblack.editor.plugin.tiled.view.Category in project HyperLap2D by rednblackgames.
the class OffsetPanel method initView.
private void initView() {
offsetAttributeX = new AttributeVO(TILE_OFFSET_X, true);
offsetAttributeY = new AttributeVO(TILE_OFFSET_Y, true);
Array<AttributeVO> attributeVOs = new Array<>();
attributeVOs.add(offsetAttributeX);
attributeVOs.add(offsetAttributeY);
offsetCategory = new Category(new CategoryVO("", attributeVOs));
mainTable.add(offsetCategory).pad(7).row();
VisTextButton addButton = new VisTextButton("Set");
addButton.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
Vector2 offset = new Vector2(offsetAttributeX.value, offsetAttributeY.value);
tiledPlugin.facade.sendNotification(TiledPlugin.TILE_GRID_OFFSET_ADDED, offset);
super.clicked(event, x, y);
}
});
mainTable.add(addButton);
}
use of games.rednblack.editor.plugin.tiled.view.Category in project HyperLap2D by rednblackgames.
the class SettingsTab method initView.
@Override
public void initView() {
Array<AttributeVO> gridAttributes = new Array<>();
gridAttributes.add(new AttributeVO("Width", currentParameters.gridWidth));
gridAttributes.add(new AttributeVO("Height", currentParameters.gridHeight));
CategoryVO gridVO = new CategoryVO("Grid size: ", gridAttributes);
grid = new Category(gridVO);
content.add(grid).expandX().colspan(2).padTop(10).left().top().row();
panel.tiledPlugin.dataToSave.setParameterVO(currentParameters);
VisTextButton okBtn = new VisTextButton("Save");
content.add(okBtn).width(70).pad(20).colspan(2).expandX().center().bottom().row();
okBtn.addListener(new ClickListener() {
@Override
public void clicked(InputEvent event, float x, float y) {
super.clicked(event, x, y);
currentParameters.gridWidth = grid.getAttributeVO("Width: ").value;
currentParameters.gridHeight = grid.getAttributeVO("Height: ").value;
panel.getFacade().sendNotification(OK_BTN_CLICKED, currentParameters);
}
});
}
Aggregations