use of eidolons.libgdx.gui.generic.ValueContainer 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);
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class HeroScreenDataSourceImpl method getUnlockedMasteries.
@Override
public List<ValueContainer> getUnlockedMasteries() {
List<ValueContainer> list = new ArrayList<>();
for (PARAMS params : DC_ContentManager.getMasteryParams()) {
Integer v = hero.getIntParam(params);
if (v > 0) {
TextureRegion texture = TextureCache.getOrCreateR(ImageManager.getValueIconPath(params));
list.add(new ValueContainer(texture, params.getName(), String.valueOf(v)));
}
}
return null;
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class InitiativePanel method init.
private void init() {
queue = new QueueViewContainer[maxSize];
queueGroup = new WidgetGroup();
queueGroup.setBounds(0, 0, imageSize * visualSize + (offset - 1) * visualSize, imageSize);
container = new Container<>(queueGroup);
container.setBounds(imageSize - offset, queueOffsetY, imageSize * visualSize + (offset - 1) * visualSize, imageSize);
container.left().bottom();
if (ExplorationMaster.isExplorationOn()) {
container.setY(imageSize);
container.setVisible(false);
}
addActor(container);
final TextureRegion textureRegion = getOrCreateR(StrPathBuilder.build("UI", "components", "2017", "panels", "initiativepanel", "initiativePanel plain.png"));
panelImage = new ValueContainer(textureRegion);
//
panelImage.setPosition(50, 25 + queueOffsetY);
// image.align(Align.bottomLeft);
// image.overrideImageSize(imageSize, imageSize);
// image.setSize(imageSize, imageSize);
ValueTooltip tooltip = new ValueTooltip();
tooltip.setUserObject(Arrays.asList(new ValueContainer("Good time to die!", "")));
panelImage.addListener(tooltip.getController());
addActor(panelImage);
// panelImage.setPosition(0, -textureRegion.getRegionHeight());
setBounds(0, 0, imageSize * visualSize + (offset - 1) * visualSize, // textureRegion.getRegionHeight()
imageSize + queueOffsetY);
light = new SuperContainer(new Image(TextureCache.getOrCreateR(SHADE_LIGHT.LIGHT_EMITTER.getTexturePath())), true);
clock = animatedClock ? createAnimatedClock() : new SuperContainer(new Image(TextureCache.getOrCreateR(StrPathBuilder.build("UI", "components", "2017", "panels", "initiativepanel", "clock.png"))), true) {
@Override
protected float getAlphaFluctuationMin() {
return 0.6f;
}
@Override
protected float getAlphaFluctuationPerDelta() {
return super.getAlphaFluctuationPerDelta() / 3;
}
};
clock.addListener(getClockListener());
addActor(light);
light.setPosition(-15, -14);
addActor(clock);
clock.setPosition(-23, -31);
timeLabel = new Label("Time", StyleHolder.getSizedLabelStyle(FONT.NYALA, 22));
addActor(timeLabel);
timeLabel.setPosition(15, 100);
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class BaseSlotPanel method addValueContainer.
protected void addValueContainer(TablePanel page, ValueContainer valueContainer, TextureRegion emptySlotTexture) {
if (valueContainer == null) {
valueContainer = new ValueContainer(emptySlotTexture);
}
if (imageSize > 0) {
valueContainer.overrideImageSize(imageSize, imageSize);
float scale = imageSize / valueContainer.getImageContainer().getActor().getWidth();
valueContainer.setScale(scale, scale);
}
page.add(valueContainer).left().bottom().size(imageSize);
}
use of eidolons.libgdx.gui.generic.ValueContainer in project Eidolons by IDemiurge.
the class OrbsPanel method addTooltip.
public static void addTooltip(OrbElement el, String name, String val) {
ValueTooltip tooltip = new ValueTooltip();
tooltip.setUserObject(Arrays.asList(new ValueContainer(el.getIconRegion(), name, val)));
el.addListener(tooltip.getController());
}
Aggregations