Search in sources :

Example 16 with PARAMETER

use of main.content.values.parameters.PARAMETER 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 17 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class SkillTabNew method getData.

private ArrayList<ObjType> getData(SKILL_DISPLAY_GROUPS g) {
    ArrayList<PARAMETER> list = new ArrayList<>(Arrays.asList(g.getMasteries()));
    ArrayList<ObjType> data = new ArrayList<>();
    for (ObjType type : this.data) {
        PARAMETER mastery = ContentManager.getPARAM(type.getProperty(G_PROPS.MASTERY));
        if (list.contains(mastery)) {
            data.add(type);
        }
    }
    return data;
}
Also used : ObjType(main.entity.type.ObjType) ArrayList(java.util.ArrayList) PARAMETER(main.content.values.parameters.PARAMETER)

Example 18 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class HC_PointView method addComps.

private void addComps() {
    paramBonusInfoComp = new WrappedTextComp(null, // VISUALS.OPTION_PANEL_3
    false) {

        @Override
        public Dimension getPanelSize() {
            return new Dimension(400, 140);
        }
    };
    // wtc.setPanelSize(size)
    paramBonusInfoComp.setDefaultSize(new Dimension(400, getDefaultY() - 15));
    paramBonusInfoComp.setDefaultFont(FontMaster.getFont(FONT.AVQ, 18, Font.PLAIN));
    // centering?
    add(paramBonusInfoComp, "id wtc, pos " + 0 + " " + 0);
    add(new GraphicComponent(VISUALS.DRAGON_DIVIDER.getImage()), "id div, @pos center_x+24 wtc.y2-24");
    // DIVIDER
    X = getDefaultX();
    Y = getDefaultY();
    i = 0;
    if (!attributes) {
        if (editable) {
            DC_ContentManager.sortMasteries(hero, params);
        }
    }
    for (PARAMETER p : params) {
        boolean editable = isEditable(p);
        HC_PointComp comp = new HC_PointComp(editable, hero, buffer, p, (attributes) ? PARAMS.ATTR_POINTS : PARAMS.MASTERY_POINTS);
        addComponent(comp, p);
    }
}
Also used : GraphicComponent(main.swing.generic.components.misc.GraphicComponent) WrappedTextComp(eidolons.swing.components.panels.page.log.WrappedTextComp) PARAMETER(main.content.values.parameters.PARAMETER)

Example 19 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class SkillTreeView method initTabList.

protected List<HC_Tab> initTabList() {
    List<HC_Tab> tabList = new ArrayList<>();
    // 'mine only' mode
    // for (SKILL_DISPLAY_GROUPS group : SKILL_DISPLAY_GROUPS.values())
    PARAMETER[] array = getParamsFromMasteryWorkspaceArray();
    if (array == null) {
        array = ValuePages.MASTERIES;
    }
    List<PARAMETER> masteries = new ArrayList<>(Arrays.asList(array));
    if (mineOnly) {
        masteries = DC_MathManager.getUnlockedMasteries(hero);
    }
    DC_ContentManager.sortMasteries(hero, masteries);
    for (final PARAMETER mastery : masteries) {
        // DC_ContentManager.getMasteries()
        HC_Tab tab = tabMap.get(mastery);
        if (tab == null) {
            G_Component comp = new G_Panel(getPanelVisuals());
            int index = 0;
            tab = new HC_Tab(mastery.getName(), comp, index) {

                @Override
                public Component generateTabComp(HC_TabPanel panel) {
                    return new GraphicComponent(ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompWidth())) {

                        public Image getImg() {
                            boolean locked = !DC_MathManager.isMasteryUnlocked(hero, mastery);
                            try {
                                image = HC_Master.generateValueIcon(mastery, isSelected(), locked, true);
                            } catch (Exception e) {
                                main.system.ExceptionMaster.printStackTrace(e);
                                image = ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompWidth());
                            }
                            return image;
                        }
                    };
                }
            };
        }
        tabList.add(tab);
        tabMap.put(mastery, tab);
    }
    return tabList;
}
Also used : G_Panel(main.swing.generic.components.G_Panel) HC_Tab(eidolons.client.cc.gui.neo.tabs.HC_Tab) ArrayList(java.util.ArrayList) G_Component(main.swing.generic.components.G_Component) HC_TabPanel(eidolons.client.cc.gui.neo.tabs.HC_TabPanel) GraphicComponent(main.swing.generic.components.misc.GraphicComponent) G_Component(main.swing.generic.components.G_Component) GraphicComponent(main.swing.generic.components.misc.GraphicComponent) PARAMETER(main.content.values.parameters.PARAMETER)

Example 20 with PARAMETER

use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.

the class MasteryIconColumn method mouseClicked.

@Override
public void mouseClicked(MouseEvent e) {
    PARAMETER param = (PARAMETER) ((GraphicComponent) e.getSource()).getDataObject();
    HC_Master.setLastClickedMastery(param);
    if (e.getClickCount() > 1 || e.isAltDown()) {
        HC_Master.goToSkillTree(param);
    }
    refresh();
}
Also used : PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

PARAMETER (main.content.values.parameters.PARAMETER)136 PROPERTY (main.content.values.properties.PROPERTY)22 ObjType (main.entity.type.ObjType)13 ArrayList (java.util.ArrayList)12 Formula (main.system.math.Formula)12 Ref (main.entity.Ref)9 VALUE (main.content.VALUE)7 Obj (main.entity.obj.Obj)7 PARAMS (eidolons.content.PARAMS)6 ModifyValueEffect (eidolons.ability.effects.common.ModifyValueEffect)5 Cost (main.elements.costs.Cost)5 DC_ActiveObj (eidolons.entity.active.DC_ActiveObj)4 G_Panel (main.swing.generic.components.G_Panel)4 Node (org.w3c.dom.Node)4 AddBuffEffect (eidolons.ability.effects.attachment.AddBuffEffect)3 HashMap (java.util.HashMap)3 DAMAGE_TYPE (main.content.enums.GenericEnums.DAMAGE_TYPE)3 Costs (main.elements.costs.Costs)3 Entity (main.entity.Entity)3 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)3