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


Java LayoutManager.drawButtonBackground方法代码示例

本文整理汇总了Java中codechicken.nei.LayoutManager.drawButtonBackground方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutManager.drawButtonBackground方法的具体用法?Java LayoutManager.drawButtonBackground怎么用?Java LayoutManager.drawButtonBackground使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在codechicken.nei.LayoutManager的用法示例。


在下文中一共展示了LayoutManager.drawButtonBackground方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: drawModeButton

import codechicken.nei.LayoutManager; //导入方法依赖的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

示例2: drawDumpButton

import codechicken.nei.LayoutManager; //导入方法依赖的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

示例3: drawItem

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
public void drawItem(Rectangle w, SortItem item, int mx, int my, float frame) {
    double y = MathHelper.interpolate(item.ya, item.y, frame);
    GL11.glTranslated(0, y, 0);
    Rectangle b = new Rectangle(w.x, w.y, w.width, 20);
    boolean mouseOver = itemAt(w.x+mx, w.y+my) == item;

    GL11.glColor4f(1, 1, 1, 1);
    LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, mouseOver ? 2 : 1);
    drawStringC(item.e.getLocalisedName(), b.x, b.y, b.width, b.height, mouseOver ? 0xFFFFFFA0 : 0xFFE0E0E0);

    GL11.glTranslated(0, -y, 0);
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:13,代码来源:GuiItemSorter.java

示例4: drawButtons

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
public void drawButtons() {
    int x = buttonX();
    List<String> values = values();
    for (String option : options) {
        LayoutManager.drawButtonBackground(x, 0, 20, 20, true, values.contains(option) ? 1 : 0);
        x += 24;
    }
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:9,代码来源:OptionStringSet.java

示例5: drawWorldSelector

import codechicken.nei.LayoutManager; //导入方法依赖的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: drawItem

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
public void drawItem(Rectangle w, SortItem item, int mx, int my, float frame) {
    double y = MathHelper.interpolate(item.ya, item.y, frame);
    GlStateManager.translate(0, y, 0);
    Rectangle b = new Rectangle(w.x, w.y, w.width, 20);
    boolean mouseOver = itemAt(w.x+mx, w.y+my) == item;

    GlStateManager.color(1, 1, 1, 1);
    LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, mouseOver ? 2 : 1);
    drawStringC(item.e.getLocalisedName(), b.x, b.y, b.width, b.height, mouseOver ? 0xFFFFFFA0 : 0xFFE0E0E0);

    GlStateManager.translate(0, -y, 0);
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:13,代码来源:GuiItemSorter.java

示例7: drawWorldSelector

import codechicken.nei.LayoutManager; //导入方法依赖的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

示例8: drawItem

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
public void drawItem(Rectangle w, SortItem item, int mx, int my, float frame) {
    double y = MathHelper.interpolate(item.ya, item.y, frame);
    GlStateManager.translate(0, y, 0);
    Rectangle b = new Rectangle(w.x, w.y, w.width, 20);
    boolean mouseOver = itemAt(w.x + mx, w.y + my) == item;

    GlStateManager.color(1, 1, 1, 1);
    LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, mouseOver ? 2 : 1);
    drawStringC(item.e.getLocalisedName(), b.x, b.y, b.width, b.height, mouseOver ? 0xFFFFFFA0 : 0xFFE0E0E0);

    GlStateManager.translate(0, -y, 0);
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:13,代码来源:GuiItemSorter.java

示例9: drawButton

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
@Override
public void drawButton(Button b, int mousex, int mousey) {
    GlStateManager.disableLighting();
    GlStateManager.color(1, 1, 1, 1);

    int tex;
    if ((b.state & 0x3) == 2) {
        tex = 0;
    } else if ((b.state & 0x4) == 0 && b.contains(mousex, mousey) ||//not a state button and mouseover
            (b.state & 0x3) == 1)//state active
    {
        tex = 2;
    } else {
        tex = 1;
    }
    LayoutManager.drawButtonBackground(b.x, b.y, b.w, b.h, true, tex);

    Rectangle4i icon = b.getRenderIcon();
    if (icon == null) {
        int colour = tex == 2 ? 0xffffa0 : tex == 0 ? 0x601010 : 0xe0e0e0;

        drawStringC(b.getRenderLabel(), b.x + b.w / 2, b.y + (b.h - 8) / 2, colour);
    } else {
        GlStateManager.color(1, 1, 1, 1);

        int iconx = b.x + (b.w - icon.w) / 2;
        int icony = b.y + (b.h - icon.h) / 2;
        LayoutManager.drawIcon(iconx, icony, icon);
    }
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:31,代码来源:LayoutStyleMinecraft.java

示例10: drawSubsetTag

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
@Override
public void drawSubsetTag(String text, int x, int y, int w, int h, int state, boolean mouseover) {
    if (state == 1) {
        GlStateManager.color(0.65F, 0.65F, 0.65F, 1.0F);
    } else {
        GlStateManager.color(1, 1, 1, 1);
    }
    LayoutManager.drawButtonBackground(x, y, w, h, false, state == 0 ? 0 : 1);
    if (text != null) {
        drawStringC(text, x, y, w, h, state == 2 ? 0xFFE0E0E0 : 0xFFA0A0A0);
    }
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:13,代码来源:LayoutStyleMinecraft.java

示例11: drawButton

import codechicken.nei.LayoutManager; //导入方法依赖的package包/类
public void drawButton(int mx, int my) {
    Rectangle b = buttonSize();
    LayoutManager.drawButtonBackground(b.x, b.y, b.width, b.height, true, getButtonTex(mx, my));
    drawStringC(getButtonText(), b.x, b.y, b.width, b.height, getTextColour(mx, my));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:6,代码来源:OptionButton.java

示例12: drawButton

import codechicken.nei.LayoutManager; //导入方法依赖的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.nei.LayoutManager.drawButtonBackground方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。