Search in sources :

Example 1 with TextCompDC

use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.

the class HT_View method resetTree.

public void resetTree(String name, boolean forceRebuild) {
    panel.removeAll();
    panel.setAutoZOrder(true);
    if (forceRebuild) {
        treeCache.remove(getArg(name));
    }
    tree = getTree(name);
    Component bottom = null;
    int bottomY = 45;
    int bottomX = 40;
    if (!CoreEngine.isArcaneVault()) {
        try {
            bottom = initBottomPanel();
        } catch (Exception e) {
            main.system.ExceptionMaster.printStackTrace(e);
        }
    } else {
        if (bottomPanel == null) {
            bottom = new TreeControlPanel(this);
            bottomY += 15;
        } else {
            bottom = bottomPanel;
        }
    }
    if (bottom != null) {
        panel.add(bottom, "pos " + bottomX + " tree.y2-" + bottomY);
    // panel.setComponentZOrder(bottom, i);
    // i++;
    }
    tree.refresh();
    panel.add(tree.getPanel(), "id tree, pos 40 50");
    panel.add(new TextCompDC() {

        @Override
        protected Font getDefaultFont() {
            return FontMaster.getFont(FONT.AVQ, 18, Font.PLAIN);
        }

        protected String getText() {
            // .replace(" Mastery", "")
            return arg.toString();
        }
    }, "id text, pos 45 10");
    // panel.setComponentZOrder(controlPanel, 1);
    // panel.setComponentZOrder(tree.getPanel(), i);
    // i++;
    // panel.add(controlPanel, "id cp, pos 70 90");
    panel.refreshComponents();
    panel.revalidate();
// refreshButtomPanel();
}
Also used : TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC) G_Component(main.swing.generic.components.G_Component) GraphicComponent(main.swing.generic.components.misc.GraphicComponent)

Example 2 with TextCompDC

use of eidolons.swing.components.panels.page.info.element.TextCompDC 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");
}
Also used : MouseEvent(java.awt.event.MouseEvent) PoolComp(eidolons.client.cc.gui.misc.PoolComp) HC_PointComp(eidolons.client.cc.gui.neo.points.HC_PointComp) TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC) PARAMETER(main.content.values.parameters.PARAMETER)

Example 3 with TextCompDC

use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.

the class UnlockDialog method createComponent.

@Override
public Component createComponent() {
    G_Panel panel = new G_Panel(PANEL_WIDE);
    CustomButton xpButton = new UnlockButton(true);
    xpButton.setToolTipText(XP);
    xpButton.setText(xpCost + " xp");
    CustomButton goldButton = new UnlockButton(false);
    goldButton.setText(goldCost + " gold");
    goldButton.setToolTipText(GOLD);
    CustomButton cancelButton = new CustomButton(VISUALS.CANCEL) {

        @Override
        public void handleClick() {
            cancel();
        }
    };
    TextCompDC label = new TextCompDC(VISUALS.PROP_BOX);
    label.setText("Unlock " + param.getName());
    panel.add(label, "pos 20 50");
    if (xpCost > 0) {
        panel.add(xpButton, "pos 50 100");
    }
    panel.add(cancelButton, "pos 300 50");
    if (goldCost > 0) {
        panel.add(goldButton, "pos 300 100");
    }
    return panel;
}
Also used : G_Panel(main.swing.generic.components.G_Panel) CustomButton(eidolons.swing.components.buttons.CustomButton) TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC)

Example 4 with TextCompDC

use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.

the class DirectionHeader method addText.

private void addText() {
    TextCompDC textComp = new TextCompDC(null, session.getName(), getFontSize(), FONT.AVQ, getTextColor());
    textComp.setDefaultSize(panelSize);
    add(textComp, "pos @centered_x centered_y");
}
Also used : TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC)

Example 5 with TextCompDC

use of eidolons.swing.components.panels.page.info.element.TextCompDC in project Eidolons by IDemiurge.

the class ListChoiceView method getListCellRendererComponent.

@Override
public Component getListCellRendererComponent(JList<? extends String> list, String value, int index, boolean isSelected, boolean cellHasFocus) {
    // size
    int fontSize = 16;
    int style = Font.PLAIN;
    if (isSelected) {
        fontSize++;
        style = Font.BOLD;
    }
    // box vs hl_box ++ size
    // flexibility/independence?
    TextCompDC comp = new TextCompDC(V, value);
    comp.setFont(FontMaster.getFont(FONT.NYALA, fontSize, style));
    return comp;
}
Also used : TextCompDC(eidolons.swing.components.panels.page.info.element.TextCompDC)

Aggregations

TextCompDC (eidolons.swing.components.panels.page.info.element.TextCompDC)9 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)3 CustomButton (eidolons.swing.components.buttons.CustomButton)2 PoolComp (eidolons.client.cc.gui.misc.PoolComp)1 SpecialValueBar (eidolons.client.cc.gui.neo.bars.SpecialValueBar)1 HC_PointComp (eidolons.client.cc.gui.neo.points.HC_PointComp)1 WrappedTextComp (eidolons.swing.components.panels.page.log.WrappedTextComp)1 MouseEvent (java.awt.event.MouseEvent)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