Search in sources :

Example 1 with HC_PointComp

use of eidolons.client.cc.gui.neo.points.HC_PointComp in project Eidolons by IDemiurge.

the class ClassBottomPanel method refresh.

@Override
public void refresh() {
    super.refresh();
    if (lastSelectedType != selectedType) {
        // selectedType.getProperty(PROPS.REQUIREMENTS)
        displayedMasteries.clear();
        for (String req : hero.getGame().getRequirementsManager().getRequirements(selectedType, 0).getReqMap().keySet()) {
            String[] parts = req.split(InfoMaster.PARAM_REASON_STRING);
            if (parts.length < 2) {
                continue;
            }
            PARAMETER param = ContentManager.getMastery(parts[0]);
            if (param != null) {
                if (param.isMastery()) {
                    displayedMasteries.add(param);
                }
            }
        }
        LogMaster.log(1, "displayedMasteries = " + displayedMasteries);
        // masteryCompsPanel.removeAll();
        for (PARAMETER p : displayedMasteries) {
            HC_PointComp comp = generateMasteryComp(p);
            // // wrap
            Object pos = "";
            // i++;
            masteryCompsPanel.add(comp, pos);
        }
    }
    super.refresh();
}
Also used : HC_PointComp(eidolons.client.cc.gui.neo.points.HC_PointComp) PARAMETER(main.content.values.parameters.PARAMETER)

Example 2 with HC_PointComp

use of eidolons.client.cc.gui.neo.points.HC_PointComp 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 3 with HC_PointComp

use of eidolons.client.cc.gui.neo.points.HC_PointComp in project Eidolons by IDemiurge.

the class PrinciplePanel method refresh.

@Override
public void refresh() {
    CharacterCreator.getPanel().getMiddlePanel().getScc().resetBuffer();
    for (HC_PointComp comp : pointComps) {
        comp.setEntity(getBuffer());
        comp.refresh();
    }
    pool.setEntity(getBuffer());
    pool.refresh();
    table.refresh();
}
Also used : HC_PointComp(eidolons.client.cc.gui.neo.points.HC_PointComp)

Aggregations

HC_PointComp (eidolons.client.cc.gui.neo.points.HC_PointComp)3 PARAMETER (main.content.values.parameters.PARAMETER)2 PoolComp (eidolons.client.cc.gui.misc.PoolComp)1 TextCompDC (eidolons.swing.components.panels.page.info.element.TextCompDC)1 MouseEvent (java.awt.event.MouseEvent)1