Search in sources :

Example 1 with CLASS_GROUP

use of main.content.enums.entity.HeroEnums.CLASS_GROUP in project Eidolons by IDemiurge.

the class ClassTreeView method initTabList.

@Override
protected List<HC_Tab> initTabList() {
    List<HC_Tab> tabList = new ArrayList<>();
    List<CLASS_GROUP> classes = new ArrayList<>(Arrays.asList(HeroEnums.CLASS_GROUP.values()));
    // }
    for (final CLASS_GROUP classGroup : classes) {
        if (classGroup == HeroEnums.CLASS_GROUP.MULTICLASS) {
            continue;
        }
        HC_Tab tab = tabMap.get(classGroup);
        if (tab == null) {
            G_Component comp = new G_Panel(getPanelVisuals()) {

                public boolean isBackgroundVisuals() {
                    return !super.isBackgroundVisuals();
                }
            };
            int index = 0;
            tab = new HC_Tab(classGroup.getName(), comp, index) {

                @Override
                public Component generateTabComp(HC_TabPanel panel) {
                    return new GraphicComponent(ImageManager.getNewBufferedImage(isSelected() ? getSelectedTabCompWidth() : getTabCompWidth(), getTabCompHeight())) {

                        public Image getImg() {
                            boolean locked = !hasClass(classGroup);
                            try {
                                image = HC_Master.generateClassIcon(classGroup, isSelected(), locked, hero);
                            } catch (Exception e) {
                                main.system.ExceptionMaster.printStackTrace(e);
                                image = ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompWidth());
                            }
                            setCompSize(new Dimension(image.getWidth(null), image.getHeight(null)));
                            return image;
                        }
                    };
                }
            };
        }
        tabList.add(tab);
        tabMap.put(classGroup, tab);
    }
    return tabList;
}
Also used : CLASS_GROUP(main.content.enums.entity.HeroEnums.CLASS_GROUP) 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)

Example 2 with CLASS_GROUP

use of main.content.enums.entity.HeroEnums.CLASS_GROUP in project Eidolons by IDemiurge.

the class HC_Tree method getGroupBackgroundPath.

private String getGroupBackgroundPath() {
    String imageName;
    if (arg instanceof CLASS_GROUP) {
        CLASS_GROUP group = (CLASS_GROUP) arg;
        // morph based on highest class?
        imageName = getBgImageForClass(group);
    } else {
        imageName = ContentManager.getMasteryGroup((PARAMETER) arg);
        switch(imageName) {
            case "Heavy":
                imageName = "war";
                break;
            case "Combat":
                imageName = "combat";
                break;
            case "Weapons":
                imageName = "weapons";
                break;
            case "Misc":
                imageName = "misc";
                break;
            case "Stealth":
                imageName = "stealth";
                break;
        }
        if (imageName.isEmpty()) {
            switch((PARAMS) arg) {
                case ARMORER_MASTERY:
                    imageName = "war";
                    break;
                case BLADE_MASTERY:
                case POLEARM_MASTERY:
                case BLUNT_MASTERY:
                case AXE_MASTERY:
                    imageName = "weapons";
                    break;
            }
        }
    }
    return "big\\trees\\" + imageName + ".jpg";
}
Also used : CLASS_GROUP(main.content.enums.entity.HeroEnums.CLASS_GROUP) PARAMS(eidolons.content.PARAMS) PARAMETER(main.content.values.parameters.PARAMETER)

Aggregations

CLASS_GROUP (main.content.enums.entity.HeroEnums.CLASS_GROUP)2 HC_Tab (eidolons.client.cc.gui.neo.tabs.HC_Tab)1 HC_TabPanel (eidolons.client.cc.gui.neo.tabs.HC_TabPanel)1 PARAMS (eidolons.content.PARAMS)1 ArrayList (java.util.ArrayList)1 PARAMETER (main.content.values.parameters.PARAMETER)1 G_Component (main.swing.generic.components.G_Component)1 G_Panel (main.swing.generic.components.G_Panel)1 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)1