use of ivorius.reccomplex.gui.table.cell.TitledCell in project RecurrentComplex by Ivorforce.
the class TableDataSourceStaticPattern method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
switch(segment) {
case 0:
{
if (index == 0) {
TableCellStringInt cell = new TableCellStringInt("repeatX", pattern.repeatX);
cell.addPropertyConsumer(val -> pattern.repeatX = val);
return new TitledCell(IvTranslations.get("reccomplex.generationInfo.static.pattern.repeat.x"), cell).withTitleTooltip(IvTranslations.getLines("reccomplex.generationInfo.static.pattern.repeat.tooltip"));
} else if (index == 1) {
TableCellStringInt cell = new TableCellStringInt("repeatZ", pattern.repeatZ);
cell.addPropertyConsumer(val -> pattern.repeatZ = val);
return new TitledCell(IvTranslations.get("reccomplex.generationInfo.static.pattern.repeat.z"), cell).withTitleTooltip(IvTranslations.getLines("reccomplex.generationInfo.static.pattern.repeat.tooltip"));
}
}
case 1:
{
if (index == 0) {
TableCellInteger cell = new TableCellInteger("shiftX", pattern.randomShiftX, 0, 10);
cell.addPropertyConsumer(val -> pattern.randomShiftX = val);
return new TitledCell(IvTranslations.get("reccomplex.generationInfo.static.pattern.rshift.x"), cell).withTitleTooltip(IvTranslations.getLines("reccomplex.generationInfo.static.pattern.rshift.tooltip"));
} else if (index == 1) {
TableCellInteger cell = new TableCellInteger("shiftZ", pattern.randomShiftZ, 0, 10);
cell.addPropertyConsumer(val -> pattern.randomShiftZ = val);
return new TitledCell(IvTranslations.get("reccomplex.generationInfo.static.pattern.rshift.z"), cell).withTitleTooltip(IvTranslations.getLines("reccomplex.generationInfo.static.pattern.rshift.tooltip"));
}
}
}
return super.cellForIndexInSegment(table, index, segment);
}
use of ivorius.reccomplex.gui.table.cell.TitledCell in project RecurrentComplex by Ivorforce.
the class TableDataSourceBlockPatternIngredient method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
if (segment == 0) {
TableCellString cell = new TableCellString("", ingredient.identifier);
cell.addPropertyConsumer(s -> ingredient.identifier = s);
return new TitledCell(IvTranslations.get("reccomplex.blockpattern.ingredient.identifier"), cell);
} else if (segment == 2) {
TableCellBoolean cell = new TableCellBoolean("", ingredient.delete);
cell.addPropertyConsumer(d -> ingredient.delete = d);
return new TitledCell(IvTranslations.get("reccomplex.blockpattern.ingredient.delete"), cell);
}
return super.cellForIndexInSegment(table, index, segment);
}
use of ivorius.reccomplex.gui.table.cell.TitledCell in project RecurrentComplex by Ivorforce.
the class TableDataSourceBlockSurfacePos method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
IntegerRange range;
int val;
String title;
switch(index) {
case 0:
range = rangeX;
val = coord.getX();
title = titleX;
break;
default:
range = rangeZ;
val = coord.getZ();
title = titleZ;
break;
}
if (range != null) {
TableCellInteger cell = new TableCellInteger(null, val, range.min, range.max);
cell.addPropertyConsumer(createConsumer(index));
return new TitledCell(title, cell);
} else {
TableCellStringInt cell = new TableCellStringInt(null, val);
cell.addPropertyConsumer(createConsumer(index));
return new TitledCell(title, cell);
}
}
use of ivorius.reccomplex.gui.table.cell.TitledCell in project RecurrentComplex by Ivorforce.
the class TableDataSourceInvGenMultiTag method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
if (segment == 0) {
if (index == 0) {
TableCellIntegerRange cell = new TableCellIntegerRange("itemCount", item.getGenerationCount(stack), 0, 64);
cell.addPropertyConsumer(range -> item.setGenerationCount(stack, range));
return new TitledCell(IvTranslations.get("reccomplex.gui.inventorygen.multi.count"), cell);
}
}
return null;
}
use of ivorius.reccomplex.gui.table.cell.TitledCell in project RecurrentComplex by Ivorforce.
the class TableDataSourceMazeRoom method cellForIndexInSegment.
@Override
public TableCell cellForIndexInSegment(GuiTable table, int index, int segment) {
IntegerRange range = ranges.get(index);
int val = room.getCoordinate(index);
String title = titles.get(index);
List<String> tooltip = tooltips.get(index);
if (range != null) {
TableCellInteger cell = new TableCellInteger(null, val, range.min, range.max);
cell.addPropertyConsumer(createConsumer(index));
return new TitledCell(title, cell).withTitleTooltip(tooltip);
} else {
TableCellStringInt cell = new TableCellStringInt(null, val);
cell.addPropertyConsumer(createConsumer(index));
return new TitledCell(title, cell).withTitleTooltip(tooltip);
}
}
Aggregations