Java 类org.lwjgl.util.Rectangle 实例源码

项目:vsminecraft    文件:GuiSeismicReader.java   
@Override
protected void mouseClicked(int xPos, int yPos, int buttonClicked)
{
    super.mouseClicked(xPos, yPos, buttonClicked);

    if(upButton.intersects(new Rectangle(xPos, yPos, 1, 1)))
    {
        if(currentLayer + 1 <= blockList.size() - 1)
        {
            currentLayer++;
        }
    }

    if(downButton.intersects(new Rectangle(xPos, yPos, 1, 1)))
    {
        if(currentLayer - 1 >= 1)
        {
            currentLayer--;
        }
    }
}
项目:morefurnaces    文件:GuiMoreFurnace.java   
public static GuiScreen buildGui(InventoryPlayer invPlayer, TileEntityIronFurnace invFurnace)
{
    GUI type = values()[invFurnace.getType().ordinal()];
    Container container = type.makeContainer(invPlayer, invFurnace);
    GuiContainerCX gui = new GuiContainerCX(new GuiMoreFurnace(type, invFurnace), container);
    Rectangle bg = type.texture.getPart("bg");
    gui.setSize(bg.getWidth(), bg.getHeight());
    return gui;
}
项目:CrystalMod    文件:GuiLiquidPipe.java   
@Override
  public void mouseClicked(int x, int y, int par3) {
    try {
        super.mouseClicked(x, y, par3);
    } catch (IOException e) {
        e.printStackTrace();
    }
    x-=guiLeft;
    y-=guiTop;
    if(!isFilterVisible()) {
      return;
    }
    int filterX = 59;
    int filterY = 63;
    Rectangle filterBounds = new Rectangle(filterX, filterY, 90, 18);

    if(!filterBounds.contains(x, y)) {
      return;
    }

    ItemStack st = CrystalMod.proxy.getClientPlayer().inventory.getItemStack();
    FluidFilter filter = getFilter();
    if(filter == null && ItemStackTools.isNullStack(st)) {
      return;
    }
    if(filter == null) {
      filter = new FluidFilter();
    }
    int slot = (x - filterX) / 18;
    if(slot < 5 && slot >= 0){
        ModLogger.info(slot+" "+(FluidUtil.getFluidTypeFromItem(st) !=null ? FluidUtil.getFluidTypeFromItem(st).getLocalizedName() : ""));
        filter.setFluid(slot, st);
        updateFilter(filter);
    }
}
项目:vsminecraft    文件:GuiSeismicReader.java   
@Override
public void initGui()
{
    super.initGui();

    upButton = new Rectangle((width - xSize) / 2 + 70, (height - ySize) / 2 + 75, 13, 13);
    downButton = new Rectangle((width - xSize) / 2 + 70, (height - ySize) / 2 + 92, 13, 13);
    tooltip = new Rectangle((width - xSize) / 2 + 30, (height - ySize) / 2 + 82, 16, 16);
}
项目:OpenTransport    文件:UIButton.java   
public UIButton(UIElement linkedElement, int posX, int posY, int width, int height, int textureID) {
    this.linkedElement = linkedElement;
    this.posX = posX;
    this.posY = posY;
    this.width = width;
    this.height = height;
    this.textureID = textureID;
    this.collisionBox = new Rectangle(posX,posY,width,height);
}
项目:OpenTransport    文件:UIButton.java   
public UIButton(UiButtonAction uiButtonAction, int posX, int posY, int width, int height, int textureID, EntityController entityController) {
    this.uiButtonAction = uiButtonAction;
    this.posX = posX;
    this.posY = posY;
    this.width = width;
    this.height = height;
    this.textureID = textureID;
    this.collisionBox = new Rectangle(posX,posY,width,height);
    this.entityController = entityController;
}
项目:OpenTransport    文件:GuiWindow.java   
public GuiWindow(Vector2f position, Vector2f dimension, String name, Gui gui) {
    this.position = position;
    this.dimension = dimension;
    this.closeRectangle = new Rectangle((int)position.x + (int)dimension.x - 28, (int)position.y, 28, 19);
    this.windowRectangle = new Rectangle((int)position.x , (int)position.y, (int)dimension.x, (int)dimension.y);
    this.name = name;
    this.guiWindowElements = new ArrayList<GuiWindowElement>();
    this.gui = gui;
}
项目:OpenTransport    文件:GuiWindowElement.java   
public GuiWindowElement(int textureID, Vector2f position, Vector2f dimension, boolean clickable) {
    this.textureID = textureID;
    this.position = position;
    this.dimension = dimension;
    this.rectangle = new Rectangle((int)position.x, (int)position.y, (int)dimension.x / 2, (int)dimension.y / 2);
    this.clickable = clickable;
}
项目:OpenTransport    文件:Camera.java   
public void setValues(int size, Vector2f tileWidthHeight, Vector2f screenWidthHeight) {
    this.size = size;
    this.tilewidth = (int)tileWidthHeight.x;
    this.tileheight = (int)tileWidthHeight.y;
    this.width = (int)screenWidthHeight.x;
    this.height = (int)screenWidthHeight.y;
    rectangle = new Rectangle((int)position.x, (int)position.y, width, height);
}
项目:pnc-repressurized    文件:BlockInteractSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:PlayerAttackSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:PlayerItemPickupSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:EntityInRangeSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldTimeSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockPresenceSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldPlayersInServerSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldDayLightSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockLightLevelSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockRedstoneSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:TwitchStreamerSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockHeatSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:UserSetSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockComparatorSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:PlayerHealthSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldWeatherForecaster.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:BlockMetadataSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldGlobalVariableSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldRainingSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:WorldTicktimeSensor.java   
@Override
public Rectangle needsSlot() {
    return null;
}
项目:pnc-repressurized    文件:SensorHandler.java   
@Override
public Rectangle needsSlot() {
    return coordinateSensor.needsSlot();
}
项目:pnc-repressurized    文件:SensorHandler.java   
@Override
public Rectangle needsSlot() {
    return coordinateSensor.needsSlot();
}
项目:OpenTransport    文件:UIButton.java   
private void updateCollisionBox(){
    this.collisionBox = new Rectangle(posX,posY,width,height);
}
项目:OpenTransport    文件:UIButton.java   
public Rectangle getCollisionBox() {
    return collisionBox;
}
项目:OpenTransport    文件:GuiWindowElement.java   
public Rectangle getRectangle() {
    return rectangle;
}
项目:OpenTransport    文件:GuiWindowElement.java   
public void setRectangle(Rectangle rectangle) {
    this.rectangle = rectangle;
}
项目:OpenTransport    文件:Camera.java   
public Rectangle getRectangle() {
    return rectangle;
}
项目:PneumaticCraft    文件:BlockInteractSensor.java   
@Override
public Rectangle needsSlot(){
    return null;
}
项目:PneumaticCraft    文件:PlayerAttackSensor.java   
@Override
public Rectangle needsSlot(){
    return null;
}
项目:PneumaticCraft    文件:PlayerItemPickupSensor.java   
@Override
public Rectangle needsSlot(){
    return null;
}
项目:PneumaticCraft    文件:EntityInRangeSensor.java   
@Override
public Rectangle needsSlot(){
    return null;
}