Search in sources :

Example 1 with VerticalValueContainer

use of eidolons.libgdx.gui.generic.VerticalValueContainer 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;
}
Also used : ValueTooltip(eidolons.libgdx.gui.tooltips.ValueTooltip) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer)

Example 2 with VerticalValueContainer

use of eidolons.libgdx.gui.generic.VerticalValueContainer 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;
}
Also used : ValueTooltip(eidolons.libgdx.gui.tooltips.ValueTooltip) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer)

Example 3 with VerticalValueContainer

use of eidolons.libgdx.gui.generic.VerticalValueContainer 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;
}
Also used : ValueTooltip(eidolons.libgdx.gui.tooltips.ValueTooltip) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) VerticalValueContainer(eidolons.libgdx.gui.generic.VerticalValueContainer) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer)

Aggregations

ValueContainer (eidolons.libgdx.gui.generic.ValueContainer)3 VerticalValueContainer (eidolons.libgdx.gui.generic.VerticalValueContainer)3 ValueTooltip (eidolons.libgdx.gui.tooltips.ValueTooltip)3