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


Java ColourARGB类代码示例

本文整理汇总了Java中codechicken.lib.colour.ColourARGB的典型用法代码示例。如果您正苦于以下问题:Java ColourARGB类的具体用法?Java ColourARGB怎么用?Java ColourARGB使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: loadColours

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
public static void loadColours(ConfigTag addonconfig)
{
    ConfigTag snifferconifg = addonconfig.getTag("sniffer.gui").useBraces();
    ConfigTag colourconfig = snifferconifg.getTag("colour").setPosition(0).setComment("Colours are in 0xAARRGGBB format:Alpha should be FF");
    ConfigTag borderconfig = snifferconifg.getTag("border").setPosition(1).setNewLine(true);
    
    colourOn = new ColourARGB(colourconfig.getTag("on").setPosition(0).setComment("").getHexValue(0xffFF0000));
    colourOff = new ColourARGB(colourconfig.getTag("off").setPosition(1).getHexValue(0xff700000));
    colourJammed = new ColourARGB(colourconfig.getTag("jammed").setPosition(2).getHexValue(0xff707070));
    
    colourPOn = new ColourARGB(colourconfig.getTag("private.on").setPosition(0).getHexValue(0xff40F000));
    colourPOff = new ColourARGB(colourconfig.getTag("private.off").setPosition(1).getHexValue(0xff40A000));
    
    borderOn = new ColourARGB(borderconfig.getTag("on").setPosition(0).getHexValue(0xffEE0000));
    borderOff = new ColourARGB(borderconfig.getTag("off").setPosition(1).getHexValue(0xff500000));
    borderJammed =  new ColourARGB(borderconfig.getTag("jammed").setPosition(2).getHexValue(0xff505050));
    
    borderPOn = new ColourARGB(borderconfig.getTag("private.on").setPosition(0).getHexValue(0xff20E000));
    borderPOff = new ColourARGB(borderconfig.getTag("private.off").setPosition(1).getHexValue(0xff209000));
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:21,代码来源:GuiWirelessSniffer.java

示例2: drawArrow

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
private void drawArrow(int x, int y, int colour)
{
    TextureUtils.changeTexture("wrcbe:textures/gui/arrow.png");
    
    new ColourARGB(colour).glColour();
    Tessellator t = Tessellator.getInstance();
    VertexBuffer buffer = t.getBuffer();
    buffer.begin(7, DefaultVertexFormats.POSITION_TEX);
    buffer.pos(x + 0, y + 8, zLevel).tex( arrowdirection * 0.25, 1).endVertex();
    buffer.pos(x + 8, y + 8, zLevel).tex( (arrowdirection + 1) * 0.25, 1).endVertex();
    buffer.pos(x + 8, y + 0, zLevel).tex( (arrowdirection + 1) * 0.25, 0).endVertex();
    buffer.pos(x + 0, y + 0, zLevel).tex( arrowdirection * 0.25, 0).endVertex();
    t.draw();
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:15,代码来源:GuiButtonArrow.java

示例3: getBorder

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
public Colour getBorder(int freq)
{
    if(RedstoneEther.get(true).isPlayerJammed(mc.player) || !RedstoneEther.get(true).canBroadcastOnFrequency(mc.player, freq))
    {
        return borderJammed;
    }
    else if(RedstoneEther.get(true).getFreqColourId(freq) != -1)
    {
        return new ColourARGB(RedstoneEther.get(true).getFreqColour(freq));
    }
    else
    {
        return borderOff.copy().interpolate(borderOn, brightness[freq-1] / 64F);
    }
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:16,代码来源:GuiWirelessSniffer.java

示例4: processTexture

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
private static void processTexture(int freq, int iconindex) {
    int colour = freq <= 0 ? 0xFFFFFFFF : RedstoneEther.get(true).getFreqColour(freq);

    mergeTexturesWithColour(new ColourARGB(colour));
    if (freq > 0) {
        writePointer(freq);
    }

    textures[iconindex].setData(imageData);
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:11,代码来源:TriangTexManager.java

示例5: mergeTexturesWithColour

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
private static void mergeTexturesWithColour(ColourARGB texcolour) {
    for (int i = 0; i < 256; i++) {
        Colour colour;
        if (texGrad[i].a == 0) {
            colour = texRing[i];
        } else {
            colour = texGrad[i].copy().multiply(texcolour);
        }

        imageData[i] = colour.argb();
    }
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:13,代码来源:TriangTexManager.java

示例6: loadTextureColours

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
public static Colour[] loadTextureColours(ResourceLocation resource) {
    int[] idata = loadTextureData(resource);
    Colour[] data = new Colour[idata.length];
    for (int i = 0; i < data.length; i++)
        data[i] = new ColourARGB(idata[i]);
    return data;
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:8,代码来源:TextureUtils.java

示例7: loadTextureColours

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
public static Colour[] loadTextureColours(ResourceLocation resource) {
    int[] idata = loadTextureData(resource);
    Colour[] data = new Colour[idata.length];
    for (int i = 0; i < data.length; i++) {
        data[i] = new ColourARGB(idata[i]);
    }
    return data;
}
 
开发者ID:TheCBProject,项目名称:CodeChickenLib,代码行数:9,代码来源:TextureUtils.java

示例8: loadTextureColours

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
public static Colour[] loadTextureColours(ResourceLocation resource)
{
    int[] idata = loadTextureData(resource);
    Colour[] data = new Colour[idata.length];
    for (int i = 0; i < data.length; i++)
        data[i] = new ColourARGB(idata[i]);
    return data;
}
 
开发者ID:Darkona,项目名称:AdventureBackpack2,代码行数:9,代码来源:TextureUtils.java

示例9: processTexture

import codechicken.lib.colour.ColourARGB; //导入依赖的package包/类
private static void processTexture(int colour, boolean on, int i) {
    mergeTexturesWithColour(new ColourARGB(colour), on);
    icons[i].addTexture(new TextureDataHolder(imageData, 16).copyData());
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:5,代码来源:RemoteTexManager.java


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