Package codechicken.lib.vec

Examples of codechicken.lib.vec.Rectangle4i


        textField.onGuiClick(mousex, mousey);
    }

    @Override
    public List<String> handleTooltip(int mousex, int mousey, List<String> currenttip) {
        if (new Rectangle4i(10, 0, textField.x - 10, 20).contains(mousex, mousey)) {
            String tip = translateN(name + ".tip");
            if (!tip.equals(name + ".tip"))
                currenttip.add(tip);
        }
        return currenttip;
View Full Code Here


    public abstract void drawIcons();

    @Override
    public List<String> handleTooltip(int mousex, int mousey, List<String> currenttip) {
        if (new Rectangle4i(4, 4, 50, 20).contains(mousex, mousey))
            currenttip.add(translateN(name + ".tip"));
        int x = buttonX();
        for (String option : options) {
            if (new Rectangle4i(x, 0, 20, 20).contains(mousex, mousey))
                currenttip.add(translateN(name + "." + option));

            x += 24;
        }
        return currenttip;
View Full Code Here

    public boolean clickButton(int mousex, int mousey, int button) {
        int x = buttonX();
        List<String> values = values();
        for (int i = 0; i < options.size(); i++) {
            if (new Rectangle4i(x, 0, 20, 20).contains(mousex, mousey)) {
                String s = options.get(i);
                boolean set = values.contains(s);
                if (button == 0 && !set) {
                    setValue(s);
                    return true;
View Full Code Here

            o.draw(mx-24, my-2, frame);
            GL11.glTranslatef(-x-24, -y-2, 0);
        }

        public Rectangle4i worldButtonSize() {
            return new Rectangle4i(0, 2, 20, 20);
        }
View Full Code Here

        public Rectangle4i worldButtonSize() {
            return new Rectangle4i(0, 2, 20, 20);
        }

        private void drawWorldSelector(Option o, int mousex, int mousey) {
            Rectangle4i b = worldButtonSize();
            boolean set = o.hasWorldOverride();
            boolean mouseover = b.contains(mousex, mousey);
            GL11.glColor4f(1, 1, 1, 1);
            LayoutManager.drawButtonBackground(b.x, b.y, b.w, b.h, true, !set ? 0 : mouseover ? 2 : 1);
            drawStringC("W", b.x, b.y, b.w, b.h, -1);
        }
View Full Code Here

        drawString(renderName(), 10, 6, -1);
    }

    public Rectangle4i dumpButtonSize() {
        int width = 80;
        return new Rectangle4i(slot.slotWidth() - width, 0, width, 20);
    }
View Full Code Here

        return new Rectangle4i(slot.slotWidth() - width, 0, width, 20);
    }

    public Rectangle4i modeButtonSize() {
        int width = 60;
        return new Rectangle4i(slot.slotWidth() - width - 10 - dumpButtonSize().w, 0, width, 20);
    }
View Full Code Here

        return getTag().getIntValue(0);
    }

    public void drawModeButton(int mousex, int mousey) {
        GL11.glColor4f(1, 1, 1, 1);
        Rectangle4i b = modeButtonSize();
        boolean hover = b.contains(mousex, mousey);
        LayoutManager.drawButtonBackground(b.x, b.y, b.w, b.h, true, getButtonTex(hover));
        drawStringC(modeButtonText(), b.x, b.y, b.w, b.h, getTextColour(hover));
    }
View Full Code Here

        drawStringC(modeButtonText(), b.x, b.y, b.w, b.h, getTextColour(hover));
    }

    public void drawDumpButton(int mousex, int mousey) {
        GL11.glColor4f(1, 1, 1, 1);
        Rectangle4i b = dumpButtonSize();
        boolean hover = b.contains(mousex, mousey);
        LayoutManager.drawButtonBackground(b.x, b.y, b.w, b.h, true, getButtonTex(hover));
        drawStringC(dumpButtonText(), b.x, b.y, b.w, b.h, getTextColour(hover));
    }
View Full Code Here

    public Rectangle4i selectionBox() {
        Point pos = renderPos();
        Dimension size = displaySize();
        Dimension rect = sampleSize();
        return new Rectangle4i(
                (size.width - rect.width) * pos.x / 10000,
                (size.height - rect.height) * pos.y / 10000,
                rect.width, rect.height);
    }
View Full Code Here

TOP

Related Classes of codechicken.lib.vec.Rectangle4i

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.