本文整理汇总了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));
}
示例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();
}
示例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);
}
}
示例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);
}
示例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();
}
}
示例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;
}
示例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;
}
示例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;
}
示例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());
}