Search in sources :

Example 1 with DC_PagedInfoPanel

use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.

the class T3InfoPanel method init.

public void init() {
    Entity skill = null;
    try {
        skill = CharacterCreator.getHero().getSkills().get(flipped ? 1 : 0);
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    infoPanel = new DC_PagedInfoPanel(skill);
    ImageIcon icon = ImageManager.getEmptyItemIcon(flipped);
    if (skill != null) {
        icon = skill.getIcon();
    }
    label = new JLabel(icon);
    controlPanel = new G_Panel();
    controlPanel.setPanelSize(new Dimension(122, getPanelSize().height));
    costPool = new PoolComp(skill, PARAMS.XP_COST, "Experience cost", false);
    xpPool = new PoolComp(CharacterCreator.getHero(), PARAMS.XP, "Experience points", true) {
    };
    addComps();
}
Also used : Entity(main.entity.Entity) DC_PagedInfoPanel(eidolons.swing.components.panels.page.info.DC_PagedInfoPanel) PoolComp(eidolons.client.cc.gui.misc.PoolComp) G_Panel(main.swing.generic.components.G_Panel)

Example 2 with DC_PagedInfoPanel

use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.

the class ChoiceView method addInfoPanels.

protected void addInfoPanels() {
    Entity entity = null;
    if (data.size() > 0) {
        if (data.get(0) instanceof Entity) {
            entity = (Entity) data.get(0);
        }
    }
    infoPanel = new DC_PagedInfoPanel(entity);
    add(infoPanel, IP_POS);
    infoPanel.refresh();
}
Also used : Entity(main.entity.Entity) DC_PagedInfoPanel(eidolons.swing.components.panels.page.info.DC_PagedInfoPanel)

Example 3 with DC_PagedInfoPanel

use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.

the class HeroPanel method init.

private void init() {
    xpBar = new SpecialValueBar(false, PARAMS.XP);
    xpBar.setObj(hero);
    integrityBar = new SpecialValueBar(true, PARAMS.INTEGRITY);
    integrityBar.setObj(hero);
    values = new ValueIconPanel(hero);
    infoPanel = new DC_PagedInfoPanel(hero);
    buffPanel = new DC_PagedBuffPanel();
    buffPanel.setObj(hero);
    itemPanel = new DC_ItemPanel(hero.getGame(), true);
    itemPanel.setObj(hero);
    lowerPanel = new DC_PagedInfoPanel(hero);
    header = new HeroHeader(hero, this);
    comps = new G_Component[] { header, values, buffPanel, infoPanel, lowerPanel };
}
Also used : DC_PagedInfoPanel(eidolons.swing.components.panels.page.info.DC_PagedInfoPanel) DC_PagedBuffPanel(eidolons.swing.components.panels.page.small.DC_PagedBuffPanel) DC_ItemPanel(eidolons.swing.components.panels.DC_ItemPanel) ValueIconPanel(eidolons.swing.components.panels.ValueIconPanel) SpecialValueBar(eidolons.client.cc.gui.neo.bars.SpecialValueBar) HeroHeader(eidolons.client.cc.gui.neo.header.HeroHeader)

Example 4 with DC_PagedInfoPanel

use of eidolons.swing.components.panels.page.info.DC_PagedInfoPanel in project Eidolons by IDemiurge.

the class CharacterCreator method typeSelected.

public static void typeSelected(final Entity type) {
    if (type != null) {
        DC_Game.game.getValueHelper().setEntity(type);
    }
    if (Launcher.getView() == VIEWS.T3) {
        HC_Master.getT3View().selected(type);
        return;
    }
    DC_PagedInfoPanel firstPanel = getHeroPanel().getMiddlePanel().getUpperPanel();
    Entity entity = firstPanel.getEntity();
    firstPanel.setEntity(type);
    firstPanel.refresh();
    try {
        getHeroPanel().getMiddlePanel().getArc().getUpperIcon().setIcon(new ImageIcon(type.getImage()));
    } catch (Exception e) {
        main.system.ExceptionMaster.printStackTrace(e);
    }
    DC_PagedInfoPanel secondPanel = getHeroPanel().getMiddlePanel().getLowerPanel();
    if (secondPanel != null) {
        secondPanel.setEntity(entity);
        secondPanel.refresh();
        try {
            getHeroPanel().getMiddlePanel().getArc().getLowerIcon().setIcon(new ImageIcon(entity.getImage()));
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
    }
}
Also used : DC_PagedInfoPanel(eidolons.swing.components.panels.page.info.DC_PagedInfoPanel) Entity(main.entity.Entity)

Aggregations

DC_PagedInfoPanel (eidolons.swing.components.panels.page.info.DC_PagedInfoPanel)4 Entity (main.entity.Entity)3 PoolComp (eidolons.client.cc.gui.misc.PoolComp)1 SpecialValueBar (eidolons.client.cc.gui.neo.bars.SpecialValueBar)1 HeroHeader (eidolons.client.cc.gui.neo.header.HeroHeader)1 DC_ItemPanel (eidolons.swing.components.panels.DC_ItemPanel)1 ValueIconPanel (eidolons.swing.components.panels.ValueIconPanel)1 DC_PagedBuffPanel (eidolons.swing.components.panels.page.small.DC_PagedBuffPanel)1 G_Panel (main.swing.generic.components.G_Panel)1