Search in sources :

Example 16 with CustomButton

use of eidolons.swing.components.buttons.CustomButton in project Eidolons by IDemiurge.

the class DivinationPanel method addButton.

private void addButton() {
    CustomButton divinationButton = new CustomButton(VISUALS.DIVINATION, "") {

        @Override
        public void handleClick() {
            divine();
        }

        @Override
        protected void playClickSound() {
            DC_SoundMaster.playStandardSound(STD_SOUNDS.SPELL_ACTIVATE);
        }
    };
    add(divinationButton, "@pos center_x-4 0");
    setComponentZOrder(divinationButton, 0);
    setComponentZOrder(list, 1);
}
Also used : CustomButton(eidolons.swing.components.buttons.CustomButton)

Example 17 with CustomButton

use of eidolons.swing.components.buttons.CustomButton in project Eidolons by IDemiurge.

the class DebugGui method init.

public void init() {
    pages = new PagedDebugPanel();
    valueButton = new CustomButton(VISUALS.HAMMER) {

        public void handleClick() {
            editValue();
        }
    };
    functionButton = new CustomButton(VISUALS.GEARS) {

        public void handleClick() {
            enterFunction();
        }
    };
    // initial index?
    pages.refresh();
    add(pages, "pos 0 0");
    int x = DebugGuiPage.BUTTON_VISUALS.getWidth() * 2 + DebugGuiPage.gapX;
    int y = pages.getArrowHeight() + VISUALS.MENU_BUTTON.getHeight();
    add(valueButton, "id value,pos " + x + " " + y);
    add(// +
    functionButton, // +
    " pos " + x + " value.y2");
    setComponentZOrder(functionButton, 0);
    setComponentZOrder(valueButton, 1);
    setComponentZOrder(pages, 2);
    panelSize = new Dimension(732, 132);
}
Also used : CustomButton(eidolons.swing.components.buttons.CustomButton)

Aggregations

CustomButton (eidolons.swing.components.buttons.CustomButton)17 G_Panel (main.swing.generic.components.G_Panel)6 TextCompDC (eidolons.swing.components.panels.page.info.element.TextCompDC)2 PoolComp (eidolons.client.cc.gui.misc.PoolComp)1 PortraitComp (eidolons.client.cc.gui.neo.header.PortraitComp)1 HT_Node (eidolons.client.cc.gui.neo.tree.HT_Node)1 ActionButtonEnum (eidolons.swing.components.buttons.ActionButtonEnum)1 PhaseAnimation (eidolons.system.graphics.PhaseAnimation)1 ObjType (main.entity.type.ObjType)1 Coordinates (main.game.bf.Coordinates)1 TASK_COMMAND (main.gui.sub.TaskComponent.TASK_COMMAND)1 ImageButton (main.swing.components.ImageButton)1 CompVisuals (main.swing.generic.components.CompVisuals)1 VISUALS (main.swing.generic.components.G_Panel.VISUALS)1 ANIM (main.system.graphics.ANIM)1 LogEntryNode (main.system.text.LogEntryNode)1 MigLayout (net.miginfocom.swing.MigLayout)1