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


Java GuiDraw.drawString方法代码示例

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


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

示例1: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedIEVeinStatRecipe crecipe = (CachedIEVeinStatRecipe) this.arecipes.get(recipe);
    OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
    int stringLength1 = GuiDraw.getStringWidth(I18n.format("gtnop.gui.nei.weightedChance") + ": ");
    int stringLength2 = GuiDraw.getStringWidth("40%");
    int beginXCoord = (stringLength1+stringLength2)/2;
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.ieVeinComponent") + ": ", 2, 31, 0x404040, false);
    GuiDraw.drawStringR("40.00%", beginXCoord+5, 44, 0x404040, false);
    GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2+stringLength1, 44, 0x404040, false);
    GuiDraw.drawStringR("40.00%", beginXCoord+5, 57, 0x404040, false);
    GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2+stringLength1, 57, 0x404040, false);
    GuiDraw.drawStringR("15.00%", beginXCoord+5, 70, 0x404040, false);
    GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2+stringLength1, 70, 0x404040, false);
    GuiDraw.drawStringR("5.00%", beginXCoord+5, 83, 0x404040, false);
    GuiDraw.drawString(GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2+stringLength1, 83, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + oreLayer.weightedIEChance, 2, 96, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.fromMod") + ": " + "Immersive Engineering", 2, 109, 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:22,代码来源:PluginGT5IEVeinStat.java

示例2: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipeIndex)
{
    super.drawExtras(recipeIndex);
    DifficultyRecipe<?> recipe = cached.get(recipeIndex);
    Difficulty diff = recipe.getDifficulty(Minecraft.getMinecraft().theWorld);
    String s = diff.getLocName();
    StringBuilder sb = new StringBuilder();
    Collection<Difficulty> dupes = DifficultyRecipe.getDuplicatedRecipes(recipe, diff);
    if (!dupes.isEmpty())
    {
        for (Difficulty e : dupes)
        {
            sb.append(e.getLocName());
            sb.append(", ");
        }
        sb.delete(sb.length() - 2, sb.length());
        String s2 = I18n.format(DifficultyRecipes.MODID + ".gui.also", sb.toString());
        GuiDraw.drawStringC(s2, 83, 60, 0x666666, false);
    }
    GuiDraw.drawString(s, 84, 10, DifficultyRecipe.getColorFor(diff), false);
}
 
开发者ID:tterrag1098,项目名称:DifficultyRecipes,代码行数:23,代码来源:NEIShapelessDifficultyRecipe.java

示例3: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedStackInfoRecipe stackInfoRecipe = (CachedStackInfoRecipe) arecipes.get(recipe);
    String info = I18n.format(stackInfoRecipe.info);
    List<String> infoList = Minecraft.getMinecraft().fontRenderer.listFormattedStringToWidth(info, ModConfig.pluginSIDisplayStringWidth);
    for (int i = 0; i < infoList.size(); i++)
        GuiDraw.drawString(infoList.get(i), ModConfig.pluginSIDisplayStringPosX, ModConfig.pluginSIDisplayStringPosY + (GuiDraw.fontRenderer.FONT_HEIGHT + ModConfig.pluginSIDisplayStringVerticalIntervalOffset) * i, 0x404040, false);        
}
 
开发者ID:GWYOG,项目名称:CustomNEIPlugins,代码行数:9,代码来源:PluginStackInfo.java

示例4: drawForeground

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
public void drawForeground(final int recipe) {
    final List<String> text = InfoHandler.fontRenderer.listFormattedStringToWidth(this.info[recipe], this.getWidth() - 8);
    for (int i = 0; i < text.size(); ++i) {
        final String t = text.get(i);
        GuiDraw.drawString(t, this.getWidth() / 2 - GuiDraw.getStringWidth(t) / 2, 18 + i * 8, InfoHandler.color, false);
    }
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:8,代码来源:InfoHandler.java

示例5: drawForeground

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@SideOnly(Side.CLIENT)
public void drawForeground(final int recipe) {
    final int x = (GuiDraw.getStringWidth("+") + 10) / 2;
    GuiDraw.drawString("+", 60 - x, 40, -12566464, false);
    GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
    GuiDraw.changeTexture(Gui.icons);
    GuiDraw.drawTexturedModalRect(60 + x - 9, 40, 16, 0, 9, 9);
    GuiDraw.drawTexturedModalRect(60 + x - 9, 40, 52, 0, 9, 9);
}
 
开发者ID:sameer,项目名称:ExtraUtilities,代码行数:10,代码来源:SoulHandler.java

示例6: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedBedrockOreStatRecipe crecipe = (CachedBedrockOreStatRecipe) this.arecipes.get(recipe);
    OreBedrockWrapper oreLayer = GT6OreBedrockHelper.mapOreBedrockWrapper.get(crecipe.oreName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreName") + ": " + getLocalizedOreBedrockName(oreLayer.meta), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreOthers") + ": " + getLocalizedSmallOreName(oreLayer.meta), 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreOthers") + ": " + getLocalizedOreName(oreLayer.meta), 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreOthers") + ": " + getLocalizedSmallOreName(oreLayer.meta), 2, 57, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + "0-6", 2, 70, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.nei.genPosition") + ": " + I18n.format("gtnop.nei.genPositionInfo"), 2,83, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + "1/" + oreLayer.probability, 2, 96, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, false, false), 2, 109, 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:15,代码来源:PluginGT6BedrockOreStat.java

示例7: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedVeinStatRecipe crecipe = (CachedVeinStatRecipe) this.arecipes.get(recipe);
    OreLayerWrapper oreLayer = GT6OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.primaryOre") + ": " + getLocalizedOreName(oreLayer.primaryMeta), 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.secondaryOre") + ": " + getLocalizedOreName(oreLayer.secondaryMeta), 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.betweenOre") + ": " + getLocalizedOreName(oreLayer.betweenMeta), 2, 57, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.sporadicOre") + ": " + getLocalizedOreName(oreLayer.sporadicMeta), 2, 70, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreLayer.worldGenHeightRange, 2, 83, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, false, false), 2, 96, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + getWeightedChance(oreLayer.randomWeight, oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd), 2, 109, 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:15,代码来源:PluginGT6VeinStat.java

示例8: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedOreSmallRecipe crecipe = (CachedOreSmallRecipe) this.arecipes.get(recipe);
    OreSmallWrapper oreSmall = GT6OreSmallHelper.mapOreSmallWrapper.get(crecipe.oreGenName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreName") + ": " + getLocalizedSmallOreName(oreSmall.oreMeta), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreSmall.worldGenHeightRange, 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.amount") + ": " + oreSmall.amountPerChunk, 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreSmall.genOverworld, oreSmall.genNether, oreSmall.genEnd, false, false), 2, 57, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.chanceDrops") + ": ", 2, 70, 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:12,代码来源:PluginGT6SmallOreStat.java

示例9: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedAsteroidStatRecipe crecipe = (CachedAsteroidStatRecipe) this.arecipes.get(recipe);
    OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedAsteroidName(oreLayer.veinName), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidPrimary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.primaryMeta)), 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSecondary") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.secondaryMeta)), 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidBetween") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.betweenMeta)), 2, 57, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.asteroidSporadic") + ": " + GT_LanguageManager.getTranslation(getGTOreUnlocalizedName(oreLayer.sporadicMeta)), 2, 70, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genEndAsteroid, oreLayer.genGCAsteroid), 2, 83, 0x404040, false);        
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:13,代码来源:PluginGT5AsteroidStat.java

示例10: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedOreSmallRecipe crecipe = (CachedOreSmallRecipe) this.arecipes.get(recipe);
    OreSmallWrapper oreSmall = GT5OreSmallHelper.mapOreSmallWrapper.get(crecipe.oreGenName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.oreName") + ": " + getGTOreLocalizedName((short)(oreSmall.oreMeta+16000)), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreSmall.worldGenHeightRange, 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.amount") + ": " + oreSmall.amountPerChunk, 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreSmall.genOverworld, oreSmall.genNether, oreSmall.genEnd, oreSmall.genMoon, oreSmall.genMars), 2, 57, 0x404040, false);
    if (GT5OreSmallHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreSmall.restrictBiome), 2, 70, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.chanceDrops") + ": ", 2, 83+getRestrictBiomeOffset(), 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:13,代码来源:PluginGT5SmallOreStat.java

示例11: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
    CachedVeinStatRecipe crecipe = (CachedVeinStatRecipe) this.arecipes.get(recipe);
    OreLayerWrapper oreLayer = GT5OreLayerHelper.mapOreLayerWrapper.get(crecipe.veinName);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.veinName") + ": " + getLocalizedVeinName(oreLayer.veinName), 2, 18, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.primaryOre") + ": " + getGTOreLocalizedName(oreLayer.primaryMeta), 2, 31, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.secondaryOre") + ": " + getGTOreLocalizedName(oreLayer.secondaryMeta), 2, 44, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.betweenOre") + ": " + getGTOreLocalizedName(oreLayer.betweenMeta), 2, 57, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.sporadicOre") + ": " + getGTOreLocalizedName(oreLayer.sporadicMeta), 2, 70, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.genHeight") + ": " + oreLayer.worldGenHeightRange, 2, 83, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.worldNames") + ": " + getWorldNameTranslated(oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 96, 0x404040, false);
    GuiDraw.drawString(I18n.format("gtnop.gui.nei.weightedChance") + ": " + getWeightedChance(oreLayer.randomWeight, oreLayer.genOverworld, oreLayer.genNether, oreLayer.genEnd, oreLayer.genMoon, oreLayer.genMars), 2, 109, 0x404040, false);
    if (GT5OreLayerHelper.restrictBiomeSupport) GuiDraw.drawString(I18n.format("gtnop.gui.nei.restrictBiome") + ": " + getBiomeTranslated(oreLayer.restrictBiome), 2, 122, 0x404040, false);
    GuiDraw.drawStringR(EnumChatFormatting.BOLD + I18n.format("gtnop.gui.nei.seeAll"), getGuiWidth()-3, 5, 0x404040, false);
}
 
开发者ID:GWYOG,项目名称:GTNEIOrePlugin,代码行数:16,代码来源:PluginGT5VeinStat.java

示例12: drawForeground

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawForeground(int recipe)
{
	super.drawForeground(recipe);
	this.drawFluidTanks((CachedMachineRecipe)arecipes.get(recipe));
	GuiDraw.drawString(((CachedMachineRecipe)arecipes.get(recipe)).getEnergy() + " RF/t", 4, 60, 0x3d3d3d, false);
	GuiDraw.drawString(((CachedMachineRecipe)arecipes.get(recipe)).getTime()/20 + " Seconds", 4, 70, 0x3d3d3d, false);

}
 
开发者ID:zmaster587,项目名称:AdvancedRocketry,代码行数:10,代码来源:TemplateNEI.java

示例13: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipeIndex) {
  drawProgressBar(80 - xOff, 34 - yOff, 176, 14, 25, 16, Config.magcMagnetizingTicksPerItem.getInt(), 0);

  int energyUse = Config.magcMagnetizingTicksPerItem.getInt() * Config.magcMagnetizingPowerPerTick.getInt();
  String energyString = PowerDisplayUtil.formatPower(energyUse) + " " + PowerDisplayUtil.abrevation();
  GuiDraw.drawString(energyString, 100, 57, 0x808080, false);

  int x = 149, y = 32;
  EnderWidget.map.render(EnderWidget.BUTTON, x, y, 16, 16, 0, true);
  IconEIO.map.render(IconEIO.RECIPE, x + 1, y + 1, 14, 14, 0, true);
}
 
开发者ID:HenryLoenwind,项目名称:EnderIOAddons,代码行数:13,代码来源:MagChargerRecipeHandler.java

示例14: drawExtras

import codechicken.lib.gui.GuiDraw; //导入方法依赖的package包/类
@Override
public void drawExtras(int recipe) {
	CachedCrucibleRecipe r = (CachedCrucibleRecipe) arecipes.get(recipe);
	int coords2[] = {0,0};
	GL11.glScalef(.065f,.065f,.065f);
	GL11.glEnable(GL11.GL_BLEND);
	HashMap<String,int[]> map = getAndDrawAspects(r.aspects);
	HashMap<String,int[]> textMap = getTextCoords(map,r.aspects);
	GL11.glDisable(GL11.GL_BLEND);
	GL11.glScalef(15.625f,15.625f,15.625f);
	for (Aspect aspect : r.aspects.getAspects()){
		coords2 = textMap.get(aspect.getName());
		GuiDraw.drawString(r.aspects.getAmount(aspect)+"",coords2[0],coords2[1],0xFFFFFF, true);
	}
}
 
开发者ID:austinv11,项目名称:Thaumic-NEI,代码行数:16,代码来源:CrucibleHandler.java


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