use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class UnitDataSource method getCounterPoints.
@Override
public ValueContainer getCounterPoints() {
int c = unit.getIntParam(PARAMS.C_N_OF_COUNTERS);
int m = unit.getIntParam(PARAMS.N_OF_COUNTERS);
final String value = c + "/" + m;
VerticalValueContainer container = new VerticalValueContainer(getOrCreateR(ImageManager.getValueIconPath(PARAMS.N_OF_COUNTERS)), value);
ValueTooltip toolTip = new ValueTooltip();
toolTip.setUserObject(Arrays.asList(new ValueContainer(PARAMS.N_OF_COUNTERS.getName(), value)));
container.addListener(toolTip.getController());
return container;
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class UnitDataSource method getActionPoints.
@Override
public ValueContainer getActionPoints() {
int c = unit.getIntParam(PARAMS.C_N_OF_ACTIONS);
int m = unit.getIntParam(PARAMS.N_OF_ACTIONS);
final String value = c + "/" + m;
VerticalValueContainer container = getValueContainer(PARAMS.N_OF_ACTIONS, value);
ValueTooltip toolTip = new ValueTooltip();
toolTip.setUserObject(Arrays.asList(new ValueContainer(PARAMS.N_OF_ACTIONS.getName(), value)));
container.addListener(toolTip.getController());
return container;
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class UnitDataSource method getStatsValueContainers.
private List<List<ValueContainer>> getStatsValueContainers(PARAMS[][] unitInfoParamsGeneral) {
List<List<ValueContainer>> values = new ArrayList<>();
Arrays.stream(unitInfoParamsGeneral).forEach(ps -> values.add(Arrays.stream(ps).map(p -> {
String value = unit.getStrParam(p);
String name = p.getName();
ValueContainer valueContainer = new ValueContainer(name, value);
ValueTooltip valueTooltip = new ValueTooltip();
valueTooltip.setUserObject(Arrays.asList(new ValueContainer(name, value)));
valueContainer.addListener(valueTooltip.getController());
return valueContainer;
}).collect(Collectors.toList())));
return values;
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class UnitDataSource method getParamValues.
@Override
public List<ValueContainer> getParamValues() {
final DC_ArmorObj armor = unit.getArmor();
List<ValueContainer> values = new ArrayList<>();
if (armor != null) {
final String cd = armor.getStrParam(PARAMS.C_DURABILITY);
final String d = armor.getStrParam(PARAMS.DURABILITY);
values.add(new ValueContainer(PARAMS.DURABILITY.getName(), cd + "/" + d));
final String cover = armor.getStrParam(PARAMS.COVER_PERCENTAGE);
values.add(new ValueContainer(PARAMS.COVER_PERCENTAGE.getName(), cover));
}
return values;
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class UnitDataSource method getValueContainer.
private VerticalValueContainer getValueContainer(String valueIconPath, String param, String paramName) {
final VerticalValueContainer container = new VerticalValueContainer(getOrCreateR(valueIconPath), param);
container.overrideImageSize(UiMaster.getSmallIconSize(), UiMaster.getSmallIconSize());
ValueTooltip tooltip = new ValueTooltip();
tooltip.setUserObject(Arrays.asList(new ValueContainer(paramName, param)));
container.addListener(tooltip.getController());
return container;
}
Aggregations