当前位置: 首页>>代码示例>>Java>>正文


Java Rectangle4i.contains方法代码示例

本文整理汇总了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();
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:21,代码来源:ItemPanel.java

示例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();
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:23,代码来源:ItemPanel.java

示例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));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:8,代码来源:DataDumper.java

示例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));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:8,代码来源:DataDumper.java

示例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);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:GuiOptionList.java

示例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);
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:9,代码来源:GuiOptionList.java

示例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));
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:7,代码来源:DataDumper.java


注:本文中的codechicken.lib.vec.Rectangle4i.contains方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。