本文整理汇总了Java中codechicken.lib.vec.Rectangle4i.contains方法的典型用法代码示例。如果您正苦于以下问题:Java Rectangle4i.contains方法的具体用法?Java Rectangle4i.contains怎么用?Java Rectangle4i.contains使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类codechicken.lib.vec.Rectangle4i
的用法示例。
在下文中一共展示了Rectangle4i.contains方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: draw
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
@Override
public void draw(int mousex, int mousey) {
if (itemsPerPage == 0)
return;
GuiContainerManager.enableMatrixStackLogging();
int index = firstIndex;
for (int i = 0; i < rows * columns && index < items.size(); i++) {
if (validSlotMap[i]) {
Rectangle4i rect = getSlotRect(i);
if (rect.contains(mousex, mousey))
drawRect(rect.x, rect.y, rect.w, rect.h, 0xee555555);//highlight
GuiContainerManager.drawItem(rect.x + 1, rect.y + 1, items.get(index));
index++;
}
}
GuiContainerManager.disableMatrixStackLogging();
}
示例2: draw
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
@Override
public void draw(int mousex, int mousey) {
if (itemsPerPage == 0) {
return;
}
GuiHelper.enableMatrixStackLogging();
int index = firstIndex;
for (int i = 0; i < rows * columns && index < items.size(); i++) {
if (validSlotMap[i]) {
Rectangle4i rect = getSlotRect(i);
if (rect.contains(mousex, mousey)) {
drawRect(rect.x, rect.y, rect.w, rect.h, 0xee555555);//highlight
}
GuiHelper.drawItem(rect.x + 1, rect.y + 1, items.get(index));
index++;
}
}
GuiHelper.disableMatrixStackLogging();
}
示例3: drawModeButton
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
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));
}
示例4: drawDumpButton
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
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));
}
示例5: drawWorldSelector
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
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);
}
示例6: drawWorldSelector
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
private void drawWorldSelector(Option o, int mousex, int mousey) {
Rectangle4i b = worldButtonSize();
boolean set = o.hasWorldOverride();
boolean mouseover = b.contains(mousex, mousey);
GlStateManager.color(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);
}
示例7: drawButton
import codechicken.lib.vec.Rectangle4i; //导入方法依赖的package包/类
public void drawButton(int mousex, int mousey, Rectangle4i b, String text) {
GlStateManager.color(1, 1, 1, 1);
boolean hover = b.contains(mousex, mousey);
LayoutManager.drawButtonBackground(b.x, b.y, b.w, b.h, true, getButtonTex(hover));
drawStringC(text, b.x, b.y, b.w, b.h, getTextColour(hover));
}