本文整理汇总了Java中org.lwjgl.util.Rectangle类的典型用法代码示例。如果您正苦于以下问题:Java Rectangle类的具体用法?Java Rectangle怎么用?Java Rectangle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Rectangle类属于org.lwjgl.util包,在下文中一共展示了Rectangle类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: mouseClicked
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@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--;
}
}
}
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:22,代码来源:GuiSeismicReader.java
示例2: buildGui
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
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;
}
开发者ID:cubex2,项目名称:morefurnaces,代码行数:10,代码来源:GuiMoreFurnace.java
示例3: mouseClicked
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@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);
}
}
开发者ID:Alec-WAM,项目名称:CrystalMod,代码行数:36,代码来源:GuiLiquidPipe.java
示例4: initGui
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@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);
}
开发者ID:Microsoft,项目名称:vsminecraft,代码行数:10,代码来源:GuiSeismicReader.java
示例5: UIButton
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
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);
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:10,代码来源:UIButton.java
示例6: GuiWindow
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
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;
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:10,代码来源:GuiWindow.java
示例7: GuiWindowElement
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
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;
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:8,代码来源:GuiWindowElement.java
示例8: setValues
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
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);
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:9,代码来源:Camera.java
示例9: needsSlot
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@Override
public Rectangle needsSlot() {
return null;
}
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:BlockInteractSensor.java
示例10: needsSlot
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@Override
public Rectangle needsSlot() {
return coordinateSensor.needsSlot();
}
开发者ID:TeamPneumatic,项目名称:pnc-repressurized,代码行数:5,代码来源:SensorHandler.java
示例11: updateCollisionBox
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
private void updateCollisionBox(){
this.collisionBox = new Rectangle(posX,posY,width,height);
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:4,代码来源:UIButton.java
示例12: getCollisionBox
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
public Rectangle getCollisionBox() {
return collisionBox;
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:4,代码来源:UIButton.java
示例13: getRectangle
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
public Rectangle getRectangle() {
return rectangle;
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:4,代码来源:GuiWindowElement.java
示例14: setRectangle
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
public void setRectangle(Rectangle rectangle) {
this.rectangle = rectangle;
}
开发者ID:deB4SH,项目名称:OpenTransport,代码行数:4,代码来源:GuiWindowElement.java
示例15: needsSlot
import org.lwjgl.util.Rectangle; //导入依赖的package包/类
@Override
public Rectangle needsSlot(){
return null;
}
开发者ID:MineMaarten,项目名称:PneumaticCraft,代码行数:5,代码来源:BlockInteractSensor.java
注:本文中的org.lwjgl.util.Rectangle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论