Search in sources :

Example 1 with EffectsAndAbilitiesSource

use of eidolons.libgdx.gui.panels.dc.unitinfo.datasource.EffectsAndAbilitiesSource in project Eidolons by IDemiurge.

the class EffectAndAbilitiesPanel method updateAct.

@Override
public void updateAct(float delta) {
    clear();
    EffectsAndAbilitiesSource source = (EffectsAndAbilitiesSource) getUserObject();
    final int h = 3;
    final int w = 4;
    List<ValueContainer> effects = source.getBuffs();
    IconGrid effectsGrid = new IconGrid(effects, w, h);
    addElement(effectsGrid).size(32 * w, 32 * h);
    List<ValueContainer> abils = source.getAbilities();
    IconGrid abilsGrid = new IconGrid(abils, w, h);
    addElement(abilsGrid).size(32 * w, 32 * h);
}
Also used : EffectsAndAbilitiesSource(eidolons.libgdx.gui.panels.dc.unitinfo.datasource.EffectsAndAbilitiesSource) ValueContainer(eidolons.libgdx.gui.generic.ValueContainer)

Example 2 with EffectsAndAbilitiesSource

use of eidolons.libgdx.gui.panels.dc.unitinfo.datasource.EffectsAndAbilitiesSource in project Eidolons by IDemiurge.

the class EffectsPanel method updateAct.

@Override
public void updateAct(float delta) {
    clear();
    final EffectsAndAbilitiesSource source = (EffectsAndAbilitiesSource) getUserObject();
    source.getBuffs().forEach(el -> {
        el.overrideImageSize(32, 32);
        add(el).left().bottom();
    });
    row();
    source.getAbilities().forEach(el -> {
        el.overrideImageSize(32, 32);
        add(el).left().bottom();
    });
}
Also used : EffectsAndAbilitiesSource(eidolons.libgdx.gui.panels.dc.unitinfo.datasource.EffectsAndAbilitiesSource)

Aggregations

EffectsAndAbilitiesSource (eidolons.libgdx.gui.panels.dc.unitinfo.datasource.EffectsAndAbilitiesSource)2 ValueContainer (eidolons.libgdx.gui.generic.ValueContainer)1