Search in sources :

Example 1 with CompVisuals

use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.

the class IconTextComp method init.

public void init() {
    int width = image.getWidth(null);
    int height = image.getHeight(null);
    setVisuals(new CompVisuals(image));
    graphicComp = createGraphicComponent();
    add(graphicComp, "pos 0 0");
    String relativeX = "@centered_x";
    String relativeY = "@centered_y";
    int x = 0;
    int y = 0;
    if (BooleanMaster.isTrue(textDirection.growX)) {
        relativeX = "icon.x2";
        x = textOffset;
    }
    if (BooleanMaster.isFalse(textDirection.growX)) {
        relativeX = "";
        x = -textOffset;
    }
    if (BooleanMaster.isTrue(textDirection.growY)) {
        relativeY = "icon.y2";
        y = textOffset;
    }
    if (BooleanMaster.isFalse(textDirection.growY)) {
        relativeY = "";
        y = -textOffset;
    }
    String pos = "pos " + relativeX + "+" + x + " " + relativeY + "+" + y;
    textComp = createTextComp();
    add(textComp, pos);
    setPanelSize(new Dimension(width, height));
}
Also used : CompVisuals(main.swing.generic.components.CompVisuals)

Example 2 with CompVisuals

use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.

the class DungeonChoiceView method itemSelected.

@Override
public void itemSelected(ObjType i) {
    super.itemSelected(i);
    setVisuals(new CompVisuals(GuiManager.DEF_DIMENSION, getSelectedItem().getProperty(PROPS.MAP_BACKGROUND)));
    init();
    refresh();
// background
}
Also used : CompVisuals(main.swing.generic.components.CompVisuals)

Example 3 with CompVisuals

use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.

the class GatewayWindow method initBackgroundPanel.

private G_Panel initBackgroundPanel() {
    Image img = getBackgroundPicture();
    G_Panel panel = new G_Panel(new CompVisuals(img));
    // img = DC_GameGUI.createBackgroundOverlay();
    panel.add(new JLabel(new ImageIcon(img)));
    return panel;
}
Also used : G_Panel(main.swing.generic.components.G_Panel) CompVisuals(main.swing.generic.components.CompVisuals)

Example 4 with CompVisuals

use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.

the class HT_ControlPanel method addControls.

private void addControls() {
    viewModeButton = new CustomButton(new CompVisuals(STD_IMAGES.SEARCH.getImage())) {

        @Override
        public void handleClick() {
            handleControl(VIEW_MODE);
        }
    };
    viewModeButton.removeMouseListener(viewModeButton);
    viewModeButton.addMouseListener(view);
    add(viewModeButton);
}
Also used : CustomButton(eidolons.swing.components.buttons.CustomButton) CompVisuals(main.swing.generic.components.CompVisuals)

Example 5 with CompVisuals

use of main.swing.generic.components.CompVisuals in project Eidolons by IDemiurge.

the class HT_View method initTabPanel.

protected HC_TabPanel initTabPanel(List<HC_Tab> tabList) {
    HC_TabPanel tabPanel = new HC_TabPanel(tabList) {

        @Override
        public void notifyListener() {
            listener.tabSelected(getSelectedTabName());
        }

        @Override
        public Component generateEmptyTabComp() {
            return new GraphicComponent(ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompHeight()));
        }

        @Override
        protected STD_SOUNDS getClickSound() {
            return STD_SOUNDS.ON_OFF;
        // return STD_SOUNDS.DIS__OPEN_MENU;
        }

        @Override
        public Component getSelectedTabComponent() {
            return super.getSelectedTabComponent();
        }

        @Override
        public ComponentVisuals getTAB() {
            // empty
            if (TAB == null) {
                TAB = new CompVisuals(ImageManager.getNewBufferedImage(getTabCompWidth(), getTabCompHeight()));
            }
            return TAB;
        }

        public int getPageSize() {
            return getTabPageSize();
        }
    };
    tabPanel.setChangeListener(this);
    return tabPanel;
}
Also used : GraphicComponent(main.swing.generic.components.misc.GraphicComponent) HC_TabPanel(eidolons.client.cc.gui.neo.tabs.HC_TabPanel) CompVisuals(main.swing.generic.components.CompVisuals)

Aggregations

CompVisuals (main.swing.generic.components.CompVisuals)5 HC_TabPanel (eidolons.client.cc.gui.neo.tabs.HC_TabPanel)1 CustomButton (eidolons.swing.components.buttons.CustomButton)1 G_Panel (main.swing.generic.components.G_Panel)1 GraphicComponent (main.swing.generic.components.misc.GraphicComponent)1