Package net.minecraft.client.gui

Examples of net.minecraft.client.gui.FontRenderer.drawString()


        {
            float lum = calcLuminance(te.getWorldObj().getBlock(te.xCoord, te.yCoord, te.zCoord).colorMultiplier(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord));

            for (int i = 0; i < strings.length; i++)
            {
                fr.drawString((lum >= 35F ? EnumChatFormatting.BLACK : lum >= 31F ? EnumChatFormatting.GRAY : EnumChatFormatting.WHITE) + strings[i], -fr.getStringWidth(strings[i]) / 2 + 40, 10 * i, 0);
            }
        }

        GL11.glEnable(GL11.GL_LIGHTING);
        GL11.glPopMatrix();
View Full Code Here


        this.slotNumber = slotNumber;
    }

    public void render(){
        FontRenderer fontRenderer = FMLClientHandler.instance().getClient().fontRenderer;
        fontRenderer.drawString(text, x, y, -90);
    }

}
View Full Code Here

            if(ticksExisted > 120) {
                GL11.glScaled(0.02D, 0.02D, 0.02D);
                stat.render(-1, -1, partialTicks);
            } else if(ticksExisted > 50) {
                GL11.glScaled(0.02D, 0.02D, 0.02D);
                fontRenderer.drawString("Acquiring Target...", 0, 0, 0x7F7F7F);
                fontRenderer.drawString(targetAcquireProgress + "%", 37, 28, 0x002F00);
            } else if(ticksExisted < -30) {
                GL11.glScaled(0.03D, 0.03D, 0.03D);
                stat.render(-1, -1, partialTicks);
                fontRenderer.drawString("Lost Target!", 0, 0, 0xFF0000);
View Full Code Here

                GL11.glScaled(0.02D, 0.02D, 0.02D);
                stat.render(-1, -1, partialTicks);
            } else if(ticksExisted > 50) {
                GL11.glScaled(0.02D, 0.02D, 0.02D);
                fontRenderer.drawString("Acquiring Target...", 0, 0, 0x7F7F7F);
                fontRenderer.drawString(targetAcquireProgress + "%", 37, 28, 0x002F00);
            } else if(ticksExisted < -30) {
                GL11.glScaled(0.03D, 0.03D, 0.03D);
                stat.render(-1, -1, partialTicks);
                fontRenderer.drawString("Lost Target!", 0, 0, 0xFF0000);
            }
View Full Code Here

                fontRenderer.drawString("Acquiring Target...", 0, 0, 0x7F7F7F);
                fontRenderer.drawString(targetAcquireProgress + "%", 37, 28, 0x002F00);
            } else if(ticksExisted < -30) {
                GL11.glScaled(0.03D, 0.03D, 0.03D);
                stat.render(-1, -1, partialTicks);
                fontRenderer.drawString("Lost Target!", 0, 0, 0xFF0000);
            }
        }
        GL11.glPopMatrix();
    }
View Full Code Here

    @Override
    public void drawScreen(int x, int y, float partialTicks){
        textField.drawTextBox();
        FontRenderer fontRenderer = Minecraft.getMinecraft().fontRenderer;
        fontRenderer.drawString(I18n.format("gui.entityFilter"), 35, 50, 0xFFFFFFFF);
    }

    @Override
    public void keyTyped(char ch, int key){
        if(textField != null && textField.isFocused() && key != 1) {
View Full Code Here

            GL11.glTranslated(-renderBaseX - (leftSided ? -renderWidth : 16), -renderAffectedY, 0);
            fontRenderer.drawStringWithShadow(title, renderBaseX + (leftSided ? -renderWidth + 2 : 18), renderAffectedY + 2, 0xFFFF00);
            for(int i = curScroll; i < textList.size() && i < curScroll + MAX_LINES; i++) {

                if(textList.get(i).contains("\u00a70") || textList.get(i).contains(EnumChatFormatting.DARK_RED.toString())) {
                    fontRenderer.drawString(textList.get(i), renderBaseX + (leftSided ? -renderWidth + 2 : 18), renderAffectedY + (i - curScroll) * 10 + 12, 0xFFFFFF);
                } else {
                    fontRenderer.drawStringWithShadow(textList.get(i), renderBaseX + (leftSided ? -renderWidth + 2 : 18), renderAffectedY + (i - curScroll) * 10 + 12, 0xFFFFFF);
                }
            }
            GL11.glPopMatrix();
View Full Code Here

            GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
            if(iStack == null) {
                if(texture.contains(Textures.GUI_LOCATION)) {
                    GuiPneumaticContainerBase.drawTexture(texture, renderBaseX - (leftSided ? 16 : 0), renderAffectedY);
                } else {
                    fontRenderer.drawString(texture, renderBaseX - (leftSided ? 16 : 0), renderAffectedY, 0xFFFFFFFF);
                }
            } else if(gui != null || !(iStack.getItem() instanceof ItemBlock)) {
                if(itemRenderer == null) itemRenderer = new RenderItem();
                GL11.glPushMatrix();
                GL11.glTranslated(0, 0, -50);
View Full Code Here

                tracker.addInfo(entity, textList);
            }
            stat.setText(textList);
            stat.render(-1, -1, partialTicks);
        } else if(ticksExisted > 50) {
            fontRenderer.drawString("Acquiring Target...", 0, 0, 0x7F7F7F);
            fontRenderer.drawString(targetAcquireProgress + "%", 37, 28, 0x002F00);
        } else if(ticksExisted < -30) {
            stat.closeWindow();

            //if(stat.getWidth() > stat.getMinWidth() || stat.getHeight() > stat.getMinHeight()) {
View Full Code Here

            }
            stat.setText(textList);
            stat.render(-1, -1, partialTicks);
        } else if(ticksExisted > 50) {
            fontRenderer.drawString("Acquiring Target...", 0, 0, 0x7F7F7F);
            fontRenderer.drawString(targetAcquireProgress + "%", 37, 28, 0x002F00);
        } else if(ticksExisted < -30) {
            stat.closeWindow();

            //if(stat.getWidth() > stat.getMinWidth() || stat.getHeight() > stat.getMinHeight()) {
            //    stat.setText(new ArrayList<String>());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.