use of main.content.values.parameters.PARAMETER 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";
}
use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.
the class HT_View method added.
protected void added(ObjType type) {
PARAMETER mastery = ContentManager.getPARAM(type.getProperty(G_PROPS.MASTERY));
String aspect = type.getProperty(G_PROPS.SKILL_GROUP);
String rank = "";
// type.getIntParam(params.circle)>4
DC_SoundMaster.playSkillAddSound(type, mastery, aspect, rank);
tree.refresh();
tree.getPanel().repaint();
}
use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.
the class HC_PagedListPanel method paint.
@Override
public void paint(Graphics g) {
super.paint(g);
g.setFont(getFont());
g.setColor(ColorManager.GOLDEN_WHITE);
if (TYPE != null) {
if (list_type == HC_LISTS.VENDOR) {
if (img == null) {
PARAMETER mastery = ContentManager.getPARAM(listName);
if (mastery == null) {
mastery = ContentManager.getMastery(listName);
}
if (TYPE instanceof C_OBJ_TYPE) {
} else {
switch((DC_TYPE) TYPE) {
case SPELLS:
case SKILLS:
img = ImageManager.getValueIcon(mastery);
break;
case CLASSES:
}
}
int y = getTextY() - 5;
if (img != null) {
g.drawImage(img, 12, y, 28, 28, null);
g.drawImage(img, getWidth() - img.getWidth(null) - 12, y, 28, 28, null);
g.drawImage(img, (getWidth() - img.getWidth(null)) / 2, y, null);
}
}
}
}
if (getTextY() >= 0) {
g.drawString(listName, getTextX(), getTextY());
} else {
setToolTipText(listName);
}
}
use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.
the class SkillTabNew method initComps.
protected void initComps() {
listPages = new ArrayList<>();
for (SKILL_DISPLAY_GROUPS group : SKILL_DISPLAY_GROUPS.values()) {
ArrayList<PARAMETER> list = new ArrayList<>(Arrays.asList(group.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);
}
}
HC_SkillPagedListPanel pagedListPanel = new HC_SkillPagedListPanel(getTemplate(), hero, getItemManager(), data, group.getName());
listPages.add(pagedListPanel);
}
}
use of main.content.values.parameters.PARAMETER in project Eidolons by IDemiurge.
the class PointView method stateChanged.
@Override
public void stateChanged(ChangeEvent e) {
// subtract points from attr/mast? only down to X!
int newValue = (int) ((PointComp) e.getSource()).getValue();
PARAMETER param = ((PointComp) e.getSource()).getParam();
int oldValue = getBufferType().getIntParam(param);
int mod = newValue - oldValue;
int cost = PointMaster.getPointCost(Math.max(newValue, oldValue), hero, param);
if (mod < 0 || !checkCost(cost * mod)) {
((PointComp) e.getSource()).removeChangeListener(this);
((PointComp) e.getSource()).setValue(oldValue);
((PointComp) e.getSource()).addChangeListener(this);
return;
}
// CharacterCreator.getHeroManager().modifyHeroParam(hero, param, mod);
getBufferType().modifyParameter(param, mod);
modifyPool(-mod, cost);
}
Aggregations