use of eidolons.libgdx.gui.tooltips.ValueTooltip in project Eidolons by IDemiurge.
the class RadialManager method addSimpleTooltip.
public static void addSimpleTooltip(RadialValueContainer el, String name) {
ValueTooltip tooltip = new ValueTooltip();
tooltip.setUserObject(Arrays.asList(new ValueContainer(name, "")));
for (com.badlogic.gdx.scenes.scene2d.EventListener sub : el.getListeners()) {
if (!(sub instanceof ClickListener))
el.removeListener(sub);
}
el.addListener(tooltip.getController());
}
use of eidolons.libgdx.gui.tooltips.ValueTooltip 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.tooltips.ValueTooltip 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.tooltips.ValueTooltip 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.tooltips.ValueTooltip 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