use of main.swing.renderers.SmartTextManager.VALUE_CASES in project Eidolons by IDemiurge.
the class DrawMaster method drawInfoIcons.
private void drawInfoIcons(Graphics g, Unit obj) {
if (obj.isBfObj()) {
return;
}
// DrawHelper.AP_ICON_SIZE * objSize
int size = 28;
Image image = ImageManager.getSizedVersion(STD_IMAGES.COUNTERS.getPath(), size).getImage();
// if (isMultiObj())
// size = size * getMultiObjSizeMod() / 100;
// DrawHelper.AP_ICON_X *
int x = getCompWidth() - size;
// DrawHelper.AP_ICON_Y *
int y = size;
drawImage(g, image, x, y);
VALUE_CASES CASE = SmartTextManager.getParamCase(PARAMS.C_N_OF_COUNTERS, obj);
String string = obj.getParam(PARAMS.C_N_OF_COUNTERS);
SmartText text = new SmartText(string, CASE.getColor());
Point c = // getHeight());
new Point(getCompWidth() - FontMaster.getStringWidth(text.getFont(), text.getText()), size + FontMaster.getFontHeight(text.getFont()));
drawText(g, text, c);
}
use of main.swing.renderers.SmartTextManager.VALUE_CASES in project Eidolons by IDemiurge.
the class DrawMaster method drawParamInfo.
private void drawParamInfo(Graphics g, Obj obj, PARAMETER p) {
if (obj.isFull(p)) {
return;
}
PARAMETER c_p = ContentManager.getCurrentParam(p);
VALUE_CASES CASE = SmartTextManager.getParamCase(c_p, obj);
String string = obj.getIntParam(c_p) + "/" + obj.getIntParam(p);
SmartText text = new SmartText(string, CASE.getColor());
Point c = DrawHelper.getPointForDisplayedParameter(p, text, compSize);
drawText(g, text, c);
}
use of main.swing.renderers.SmartTextManager.VALUE_CASES in project Eidolons by IDemiurge.
the class DrawMaster method drawActiveIcons.
private void drawActiveIcons(Graphics g, Obj obj) {
// DrawHelper.AP_ICON_SIZE * objSize
int size = 28;
Image image = ImageManager.getSizedVersion(STD_IMAGES.ACTIONS.getPath(), size).getImage();
// if (isMultiObj())
// size = size * getMultiObjSizeMod() / 100; // image itself will be
// sized along with the
// rest
// DrawHelper.AP_ICON_X *
int x = getCompWidth() - size;
// DrawHelper.AP_ICON_Y *
int y = getCompHeight() - size;
Point p = new Point(x, y);
g.drawImage(image, p.x, p.y, null);
PARAMETER c_p = ContentManager.getCurrentParam(PARAMS.N_OF_ACTIONS);
VALUE_CASES CASE = SmartTextManager.getParamCase(c_p, obj);
String string = obj.getParam(c_p);
SmartText text = new SmartText(string, CASE.getColor());
int width = getCompWidth();
int height = getCompHeight();
Point c = new Point(width - FontMaster.getStringWidth(text.getFont(), text.getText()), height - FontMaster.getFontHeight(text.getFont()) / 2);
drawText(g, text, c);
// TODO after sizing down stacked objects, this becomes invalid!!!
Rectangle rect = new Rectangle(x, y, size, size);
cellComp.getMouseMap().put(rect, INTERACTIVE_ELEMENT.AP);
}
Aggregations