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