Search in sources :

Example 1 with WritablePoint

use of de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint in project jGui by ReplayMod.

the class AbstractGuiTexturedButton method setTexturePosV.

@Override
public T setTexturePosV(final ReadablePoint pos) {
    this.textureNormal = pos;
    this.textureHover = new ReadablePoint() {

        @Override
        public int getX() {
            return pos.getX();
        }

        @Override
        public int getY() {
            return pos.getY() + textureSize.getHeight();
        }

        @Override
        public void getLocation(WritablePoint dest) {
            dest.setLocation(getX(), getY());
        }
    };
    return getThis();
}
Also used : ReadablePoint(de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint) WritablePoint(de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint)

Example 2 with WritablePoint

use of de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint in project jGui by ReplayMod.

the class AbstractGuiTexturedButton method setTexturePosH.

@Override
public T setTexturePosH(final ReadablePoint pos) {
    this.textureNormal = pos;
    this.textureHover = new ReadablePoint() {

        @Override
        public int getX() {
            return pos.getX() + textureSize.getWidth();
        }

        @Override
        public int getY() {
            return pos.getY();
        }

        @Override
        public void getLocation(WritablePoint dest) {
            dest.setLocation(getX(), getY());
        }
    };
    return getThis();
}
Also used : ReadablePoint(de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint) WritablePoint(de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint)

Aggregations

ReadablePoint (de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint)2 WritablePoint (de.johni0702.minecraft.gui.utils.lwjgl.WritablePoint)2