Search in sources :

Example 1 with PoolComp

use of eidolons.client.cc.gui.misc.PoolComp in project Eidolons by IDemiurge.

the class OperationWindow method createComponent.

public Component createComponent() {
    panel = new G_Panel(getVisuals());
    operationsPool = new PoolComp(getPoolText(), getPoolTooltip(), false);
    // 
    CustomButton okButton = new CustomButton(OK) {

        public void handleClick() {
            done();
        }

        protected boolean isMoreY() {
            return true;
        }
    };
    CustomButton cancelButton = new CustomButton(CANCEL) {

        protected boolean isMoreY() {
            return true;
        }

        public void handleClick() {
            cancel();
        }
    };
    panel.add(getComponent(), "id tab, pos " + GuiManager.PANEL_FRAME_WIDTH + " " + GuiManager.PANEL_FRAME_HEIGHT);
    panel.add(okButton, "@id ok, pos max_right-" + GuiManager.PANEL_FRAME_WIDTH + " max_top-" + GuiManager.PANEL_FRAME_HEIGHT);
    panel.add(cancelButton, "@id cancel, pos max_right-" + GuiManager.PANEL_FRAME_WIDTH + " ok.y2");
    panel.add(operationsPool, "@id op, pos max_right-" + GuiManager.PANEL_FRAME_WIDTH + " cancel.y2");
    panel.setBackground(ColorManager.BACKGROUND);
    return panel;
}
Also used : PoolComp(eidolons.client.cc.gui.misc.PoolComp) G_Panel(main.swing.generic.components.G_Panel) CustomButton(eidolons.swing.components.buttons.CustomButton)

Example 2 with PoolComp

use of eidolons.client.cc.gui.misc.PoolComp 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 3 with PoolComp

use of eidolons.client.cc.gui.misc.PoolComp in project Eidolons by IDemiurge.

the class SkillBottomPanel method addSpecial.

protected void addSpecial() {
    freePoints = new TextCompDC(VISUALS.SPACE_SMALL) {

        protected String getText() {
            return "Skill Points: " + DC_MathManager.getFreeMasteryPoints(hero, (PARAMETER) arg);
        }
    };
    masteryScore = new TextCompDC(VISUALS.SPACE_SMALL) {

        protected String getText() {
            return "Final Score: " + hero.getIntParam(ContentManager.getMasteryScore((PARAMETER) arg));
        }
    };
    masteryPoints = new PoolComp(hero, PARAMS.MASTERY_POINTS, "Mastery Points", false);
    masteryComp = new HC_PointComp(true, hero, bufferType, (PARAMETER) arg, PARAMS.MASTERY_POINTS) {

        public void mouseClicked(MouseEvent e) {
            if (e.getSource() == upArrow) {
                // sound
                upClick();
                tree.refresh();
                refresh();
            } else if (e.getSource() == downArrow) {
                // sound
                downClick();
                // CharacterCreator.refreshGUI();
                tree.refresh();
            } else if (e.getSource() == lock) {
                lockClick(e);
            }
        }
    };
    // @center_x
    add(freePoints, "id points, pos @center_x-" + VISUALS.SPACE_SMALL.getWidth() / 2 + " 0");
    add(masteryScore, "id masteryScore, pos points.x2+1 points.y");
    add(masteryComp, "id masteryComp, pos 0 points.y2");
}
Also used : MouseEvent(java.awt.event.MouseEvent) PoolComp(eidolons.client.cc.gui.misc.PoolComp) HC_PointComp(eidolons.client.cc.gui.neo.points.HC_PointComp) TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC) PARAMETER(main.content.values.parameters.PARAMETER)

Example 4 with PoolComp

use of eidolons.client.cc.gui.misc.PoolComp in project Eidolons by IDemiurge.

the class StatsControlComponent method initPools.

protected void initPools() {
    attrPool = new PoolComp(bufferType, PARAMS.ATTR_POINTS, ATTR, false);
    mstrPool = new PoolComp(bufferType, PARAMS.MASTERY_POINTS, MSTR, false);
    xpPool = new PoolComp(bufferType, PARAMS.XP, XP, false);
    goldPool = new PoolComp(bufferType, PARAMS.GOLD, GOLD, false);
    String cost = DC_MathManager.getBuyCost(false, false, hero) + XP;
    mstrXpCostPool = new PoolComp(cost);
    cost = DC_MathManager.getBuyCost(false, true, hero) + GOLD;
    mstrGoldCostPool = new PoolComp(cost);
    cost = DC_MathManager.getBuyCost(true, false, hero) + XP;
    attrXpCostPool = new PoolComp(cost);
    cost = DC_MathManager.getBuyCost(true, true, hero) + GOLD;
    attrGoldCostPool = new PoolComp(cost);
}
Also used : PoolComp(eidolons.client.cc.gui.misc.PoolComp)

Example 5 with PoolComp

use of eidolons.client.cc.gui.misc.PoolComp in project Eidolons by IDemiurge.

the class ItemsTab method initPoolComp.

protected void initPoolComp() {
    poolComp = new PoolComp(getWeightString());
    poolComp.setVisuals(VISUALS.POOL);
    poolComp.setToolTipText(POOL);
    updatePoolComp();
}
Also used : PoolComp(eidolons.client.cc.gui.misc.PoolComp)

Aggregations

PoolComp (eidolons.client.cc.gui.misc.PoolComp)8 G_Panel (main.swing.generic.components.G_Panel)2 HC_PointComp (eidolons.client.cc.gui.neo.points.HC_PointComp)1 CustomButton (eidolons.swing.components.buttons.CustomButton)1 DC_PagedInfoPanel (eidolons.swing.components.panels.page.info.DC_PagedInfoPanel)1 TextCompDC (eidolons.swing.components.panels.page.info.element.TextCompDC)1 MouseEvent (java.awt.event.MouseEvent)1 PRINCIPLES (main.content.enums.entity.HeroEnums.PRINCIPLES)1 PARAMETER (main.content.values.parameters.PARAMETER)1 Entity (main.entity.Entity)1