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;
}
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";
}
Aggregations