• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java RendererHelper类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doRender

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void doRender(EntityTorch torch, double d, double d1, double d2, float f, float f1)
{
    Block block = Blocks.TORCH;
    GlStateManager.enableRescaleNormal();
    GlStateManager.pushMatrix();
    GlStateManager.translate(d, d1, d2);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    bindEntityTexture(torch);
    GlStateManager.disableLighting();
    GlStateManager.rotate(torch.prevRotationYaw + (torch.rotationYaw - torch.prevRotationYaw) * f1 - 90F, 0.0F, 1.0F, 0.0F);
    GlStateManager.rotate(90F + torch.prevRotationPitch + (torch.rotationPitch - torch.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F);

    IBlockState state = block.getStateFromMeta(0);
    RendererHelper.renderBakedModel(Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes().getModelForState(state), -1, ItemStack.EMPTY);

    GlStateManager.enableLighting();

    GlStateManager.popMatrix();
    GlStateManager.disableRescaleNormal();
}
 
开发者ID:iChun,项目名称:Torched,代码行数:22,代码来源:RenderTorch.java


示例2: drawCompElement

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
public void drawCompElement(String name, int offY, boolean isSelected, boolean isHidden, boolean hover)
{
    RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBorder[0], parent.workspace.currentTheme.elementTreeItemBorder[1], parent.workspace.currentTheme.elementTreeItemBorder[2], 255, getPosX(), getPosY() + offY, buttonsWidth - 1, 13, 0);

    if(isSelected)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBgSelect[0], parent.workspace.currentTheme.elementTreeItemBgSelect[1], parent.workspace.currentTheme.elementTreeItemBgSelect[2], 255, getPosX() + 1, getPosY() + offY + 1, buttonsWidth - 1 - 2, 13 - 2, 0);
    }
    else if(hover)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBgHover[0], parent.workspace.currentTheme.elementTreeItemBgHover[1], parent.workspace.currentTheme.elementTreeItemBgHover[2], 255, getPosX() + 1, getPosY() + offY + 1, buttonsWidth - 1 - 2, 13 - 2, 0);
    }
    else
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBg[0], parent.workspace.currentTheme.elementTreeItemBg[1], parent.workspace.currentTheme.elementTreeItemBg[2], 255, getPosX() + 1, getPosY() + offY + 1, buttonsWidth - 1 - 2, 13 - 2, 0);
    }
    if(isHidden)
    {
        parent.workspace.getFontRenderer().drawString(parent.workspace.reString(name, buttonsWidth - 1), getPosX() + 4, getPosY() + offY + 2, Theme.getAsHex(parent.workspace.currentTheme.fontDim), false);
    }
    else
    {
        parent.workspace.getFontRenderer().drawString(parent.workspace.reString(name, buttonsWidth - 1), getPosX() + 4, getPosY() + offY + 2, Theme.getAsHex(parent.workspace.currentTheme.font), false);
    }
}
 
开发者ID:iChun,项目名称:Keygrip,代码行数:26,代码来源:ElementTimeline.java


示例3: setNewWorld

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
public void setNewWorld(WorldClient world)
{
    if (renderGlobalProxy == null)
    {
        renderGlobalProxy = new RenderGlobalProxy(Minecraft.getMinecraft());
        threadCheckBlocks = new ThreadCheckBlocks();
        threadCheckBlocks.start();

        threadCrawlBlocks = new ThreadBlockCrawler();
        threadCrawlBlocks.start();

        if(OpenGlHelper.isFramebufferEnabled())
        {
            framebuffer = RendererHelper.createFrameBuffer(true, true);
        }

        arrowCompass.prevRotationYaw = arrowCompass.rotationYaw = 180F;
    }

    renderGlobalProxy.setWorldAndLoadRenderers(world);

    cleanWaypoints();
}
 
开发者ID:iChun,项目名称:Blocksteps,代码行数:24,代码来源:EventHandlerClient.java


示例4: drawBackground

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void drawBackground()
{
    if(!minimized)
    {
        if(docked >= 0)
        {
            RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBorder[0], workspace.currentTheme.windowBorder[1], workspace.currentTheme.windowBorder[2], 255, posX, posY + 1, getWidth(), getHeight() - 2, 0);
            RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBackground[0], workspace.currentTheme.windowBackground[1], workspace.currentTheme.windowBackground[2], 255, posX + 1, posY + 1, getWidth() - 2, getHeight() - 2, 0);
        }
        else
        {
            RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBorder[0], workspace.currentTheme.windowBorder[1], workspace.currentTheme.windowBorder[2], 255, posX + 1, posY + 1, getWidth() - 2, getHeight() - 2, 0);
            RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBackground[0], workspace.currentTheme.windowBackground[1], workspace.currentTheme.windowBackground[2], 255, posX + BORDER_SIZE, posY + BORDER_SIZE, getWidth() - (BORDER_SIZE * 2), getHeight() - (BORDER_SIZE * 2), 0);
        }
    }
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:18,代码来源:WindowAnimate.java


示例5: drawTitle

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void drawTitle()
{
    if(hasTitle)
    {
            RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBorder[0], workspace.currentTheme.windowBorder[1], workspace.currentTheme.windowBorder[2], 255, posX, posY + 1, getWidth(), 12, 0);
        String titleToRender = I18n.translateToLocal(titleLocale);
        while(titleToRender.length() > 1 && workspace.getFontRenderer().getStringWidth(titleToRender) > getWidth() - (BORDER_SIZE * 2) - workspace.getFontRenderer().getStringWidth("  _"))
        {
            if(titleToRender.startsWith("..."))
            {
                break;
            }
            if(titleToRender.endsWith("..."))
            {
                titleToRender = titleToRender.substring(0, titleToRender.length() - 4) + "...";
            }
            else
            {
                titleToRender = titleToRender.substring(0, titleToRender.length() - 1) + "...";
            }
        }
        workspace.getFontRenderer().drawString(titleToRender, posX + 4, posY + 3, workspace.currentTheme.getAsHex(workspace.currentTheme.font), false);
    }
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:26,代码来源:WindowAnimate.java


示例6: drawCompElement

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
public void drawCompElement(String name, int offY, boolean isSelected, boolean isHidden, boolean hover)
{
    RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBorder[0], parent.workspace.currentTheme.elementTreeItemBorder[1], parent.workspace.currentTheme.elementTreeItemBorder[2], 255, getPosX(), getPosY() + offY, 100, 13, 0);

    if(isSelected)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBgSelect[0], parent.workspace.currentTheme.elementTreeItemBgSelect[1], parent.workspace.currentTheme.elementTreeItemBgSelect[2], 255, getPosX()+ 1, getPosY() + offY + 1, 100 - 2, 13 - 2, 0);
    }
    else if(hover)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBgHover[0], parent.workspace.currentTheme.elementTreeItemBgHover[1], parent.workspace.currentTheme.elementTreeItemBgHover[2], 255, getPosX() + 1, getPosY() + offY + 1, 100 - 2, 13 - 2, 0);
    }
    else
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementTreeItemBg[0], parent.workspace.currentTheme.elementTreeItemBg[1], parent.workspace.currentTheme.elementTreeItemBg[2], 255, getPosX() + 1, getPosY() + offY + 1, 100 - 2, 13 - 2, 0);
    }
    if(isHidden)
    {
        parent.workspace.getFontRenderer().drawString(parent.workspace.reString(name, 100), getPosX() + 4, getPosY() + offY + 2, Theme.getAsHex(parent.workspace.currentTheme.fontDim), false);
    }
    else
    {
        parent.workspace.getFontRenderer().drawString(parent.workspace.reString(name, 100), getPosX() + 4, getPosY() + offY + 2, Theme.getAsHex(parent.workspace.currentTheme.font), false);
    }
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:26,代码来源:ElementAnimationTimeline.java


示例7: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBorder[0], parent.workspace.currentTheme.elementButtonBorder[1], parent.workspace.currentTheme.elementButtonBorder[2], 255, getPosX(), getPosY(), width, height, 0);
    if(hover)
    {
        if(Mouse.isButtonDown(0))
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonClick[0], parent.workspace.currentTheme.elementButtonClick[1], parent.workspace.currentTheme.elementButtonClick[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
        else
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBackgroundHover[0], parent.workspace.currentTheme.elementButtonBackgroundHover[1], parent.workspace.currentTheme.elementButtonBackgroundHover[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
    }
    else
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBackgroundInactive[0], parent.workspace.currentTheme.elementButtonBackgroundInactive[1], parent.workspace.currentTheme.elementButtonBackgroundInactive[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
    }
    if(!(this instanceof ElementButtonTextured))
    {
        parent.workspace.getFontRenderer().drawString(I18n.translateToLocal(text), getPosX() + (width / 2) - (parent.workspace.getFontRenderer().getStringWidth(I18n.translateToLocal(text)) / 2), getPosY() + height - (height / 2) - (parent.workspace.getFontRenderer().FONT_HEIGHT / 2), Theme.getAsHex(parent.workspace.currentTheme.font), false);
    }
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:25,代码来源:ElementButton.java


示例8: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementInputBorder[0], parent.workspace.currentTheme.elementInputBorder[1], parent.workspace.currentTheme.elementInputBorder[2], 255, getPosX(), getPosY(), width, height, 0);
    if(hover)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementInputBackgroundHover[0], parent.workspace.currentTheme.elementInputBackgroundHover[1], parent.workspace.currentTheme.elementInputBackgroundHover[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
    }
    else
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementInputBackgroundInactive[0], parent.workspace.currentTheme.elementInputBackgroundInactive[1], parent.workspace.currentTheme.elementInputBackgroundInactive[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
    }

    if(textField.getVisible())
    {
        textField.drawTextBox();
    }
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:19,代码来源:ElementTextInput.java


示例9: drawTitle

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
public void drawTitle()
{
    if(hasTitle)
    {
        RendererHelper.drawColourOnScreen(workspace.currentTheme.windowBorder[0], workspace.currentTheme.windowBorder[1], workspace.currentTheme.windowBorder[2], 255, posX + 1, posY + 1, getWidth() - 2, 12, 0);
        String titleToRender = I18n.translateToLocal(titleLocale);
        while(titleToRender.length() > 1 && workspace.getFontRenderer().getStringWidth(titleToRender) > getWidth() - (BORDER_SIZE * 2) - workspace.getFontRenderer().getStringWidth("  _"))
        {
            if(titleToRender.startsWith("..."))
            {
                break;
            }
            if(titleToRender.endsWith("..."))
            {
                titleToRender = titleToRender.substring(0, titleToRender.length() - 4) + "...";
            }
            else
            {
                titleToRender = titleToRender.substring(0, titleToRender.length() - 1) + "...";
            }
        }
        workspace.getFontRenderer().drawString(titleToRender, posX + 4, posY + 3, Theme.getAsHex(workspace.currentTheme.font), false);
    }
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:25,代码来源:Window.java


示例10: drawSlot

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
protected void drawSlot(int idx, int right, int top, int height, Tessellator tess)
{
    if(idx >= 0 && idx < channels.size())
    {
        FontRenderer font = this.parent.getFontRenderer();
        BlockPos channel = channels.get(idx);
        GlStateManager.pushMatrix();
        GlStateManager.scale(0.5F, 0.5F, 1F);
        String name = "(" + channel.getX() + ", " + channel.getY() + ", " + channel.getZ() + ")";
        font.drawString(name, (this.left + 2) * 2, top * 2, RendererHelper.getRandomColourFromString(name));
        GlStateManager.popMatrix();
    }
}
 
开发者ID:iChun,项目名称:GeneralLaymansAestheticSpyingScreen,代码行数:15,代码来源:GuiWirelessList.java


示例11: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    WindowSceneSelection proj = (WindowSceneSelection)parent;
    if(id != proj.scenes.size() - 1)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.tabSideInactive[0], parent.workspace.currentTheme.tabSideInactive[1], parent.workspace.currentTheme.tabSideInactive[2], 255, getPosX() + width - 1, getPosY() + 1, 1, height, 0);
    }
    if(proj.selectedScene == id)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementProjectTabActive[0], parent.workspace.currentTheme.elementProjectTabActive[1], parent.workspace.currentTheme.elementProjectTabActive[2], 255, getPosX(), getPosY(), width - 1, height, 0);
    }
    else if(hover)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementProjectTabHover[0], parent.workspace.currentTheme.elementProjectTabHover[1], parent.workspace.currentTheme.elementProjectTabHover[2], 255, getPosX(), getPosY(), width - 1, height, 0);
    }

    String titleToRender = info.name;
    while(titleToRender.length() > 1 && parent.workspace.getFontRenderer().getStringWidth(titleToRender) > width - 11)
    {
        if(titleToRender.startsWith("... "))
        {
            break;
        }
        if(titleToRender.endsWith("... "))
        {
            titleToRender = titleToRender.substring(0, titleToRender.length() - 5) + "... ";
        }
        else
        {
            titleToRender = titleToRender.substring(0, titleToRender.length() - 1) + "... ";
        }
    }
    parent.workspace.getFontRenderer().drawString(titleToRender, parent.posX + posX + 4, parent.posY + posY + 3, Theme.getAsHex(changed ? parent.workspace.currentTheme.elementProjectTabFontChanges : parent.workspace.currentTheme.elementProjectTabFont), false);
    parent.workspace.getFontRenderer().drawString("X", parent.posX + posX + width - 8, parent.posY + posY + 3, Theme.getAsHex(parent.workspace.currentTheme.elementProjectTabFont), false);
}
 
开发者ID:iChun,项目名称:Keygrip,代码行数:37,代码来源:ElementSceneTab.java


示例12: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY) //4 pixel border?
{
    if(scenes.isEmpty() || width <= 0)
    {
        return;
    }
    super.draw(mouseX, mouseY);
    RendererHelper.drawColourOnScreen(workspace.currentTheme.tabSideInactive[0], workspace.currentTheme.tabSideInactive[1], workspace.currentTheme.tabSideInactive[2], 255, posX, posY, width, 1, 0);
}
 
开发者ID:iChun,项目名称:Keygrip,代码行数:11,代码来源:WindowSceneSelection.java


示例13: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
public Tree draw(int mouseX, int mouseY, boolean hover, int width, int treeHeight, boolean hasScroll, int totalHeight, boolean clicking, boolean rClicking)
{
    Tree tree = super.draw(mouseX, mouseY, hover, width, treeHeight, hasScroll, totalHeight, clicking, rClicking);

    RendererHelper.drawColourOnScreen(((Waypoint)attachedObject).colour, 255, getPosX() + 1, getPosY() + treeHeight + 1, 11, 11, 0);

    return tree;
}
 
开发者ID:iChun,项目名称:Blocksteps,代码行数:9,代码来源:ElementWaypointList.java


示例14: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY) //4 pixel border?
{
    super.draw(mouseX, mouseY);
    if(!minimized)
    {
        RendererHelper.drawColourOnScreen(workspace.currentTheme.elementButtonBorder[0], workspace.currentTheme.elementButtonBorder[1], workspace.currentTheme.elementButtonBorder[2], 255, posX + BORDER_SIZE, posY + height - 21 - BORDER_SIZE, width - (BORDER_SIZE * 2), 1, 0);
    }
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:10,代码来源:WindowModelTree.java


示例15: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY) //4 pixel border?
{
    if(width <= 0 || height <= 0)
    {
        return;
    }
    super.draw(mouseX, mouseY);
    RendererHelper.drawColourOnScreen(workspace.currentTheme.elementButtonBorder[0], workspace.currentTheme.elementButtonBorder[1], workspace.currentTheme.elementButtonBorder[2], 255, posX + 100 + 1, posY + height - 20, Math.min(100, width - 101), 1, 0);
    RendererHelper.drawColourOnScreen(workspace.currentTheme.elementTreeBorder[0], workspace.currentTheme.elementTreeBorder[1], workspace.currentTheme.elementTreeBorder[2], 255, posX + 100, posY + 13, 1, height - 13, 0);
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:12,代码来源:WindowAnimate.java


示例16: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    WindowProjectSelection proj = (WindowProjectSelection)parent;
    if(id != proj.projects.size() - 1)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.tabSideInactive[0], parent.workspace.currentTheme.tabSideInactive[1], parent.workspace.currentTheme.tabSideInactive[2], 255, getPosX() + width - 1, getPosY() + 1, 1, height, 0);
    }
    if(proj.selectedProject == id)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementProjectTabActive[0], parent.workspace.currentTheme.elementProjectTabActive[1], parent.workspace.currentTheme.elementProjectTabActive[2], 255, getPosX(), getPosY(), width - 1, height, 0);
    }
    else if(hover)
    {
        RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementProjectTabHover[0], parent.workspace.currentTheme.elementProjectTabHover[1], parent.workspace.currentTheme.elementProjectTabHover[2], 255, getPosX(), getPosY(), width - 1, height, 0);
    }

    String titleToRender = info.modelName;
    while(titleToRender.length() > 1 && parent.workspace.getFontRenderer().getStringWidth(titleToRender) > width - (((GuiWorkspace)parent.workspace).remoteSession ? 2 : 11) )
    {
        if(titleToRender.startsWith("... "))
        {
            break;
        }
        if(titleToRender.endsWith("... "))
        {
            titleToRender = titleToRender.substring(0, titleToRender.length() - 5) + "... ";
        }
        else
        {
            titleToRender = titleToRender.substring(0, titleToRender.length() - 1) + "... ";
        }
    }
    parent.workspace.getFontRenderer().drawString(titleToRender, parent.posX + posX + 4, parent.posY + posY + 3, Theme.getAsHex(changed? parent.workspace.currentTheme.elementProjectTabFontChanges : parent.workspace.currentTheme.elementProjectTabFont), false);
    if(!((GuiWorkspace)parent.workspace).remoteSession)
    {
        parent.workspace.getFontRenderer().drawString("X", parent.posX + posX + width - 8, parent.posY + posY + 3, Theme.getAsHex(parent.workspace.currentTheme.elementProjectTabFont), false);
    }
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:40,代码来源:ElementProjectTab.java


示例17: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY) //4 pixel border?
{
    if(projects.isEmpty() || width <= 0)
    {
        return;
    }
    super.draw(mouseX, mouseY);
    RendererHelper.drawColourOnScreen(workspace.currentTheme.tabSideInactive[0], workspace.currentTheme.tabSideInactive[1], workspace.currentTheme.tabSideInactive[2], 255, posX, posY, width, 1, 0);
}
 
开发者ID:iChun,项目名称:Tabula,代码行数:11,代码来源:WindowProjectSelection.java


示例18: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    if(parent.docked >= 0 && parent.docked != 2)
    {
        return;
    }
    if(hover)
    {
        RendererHelper.drawColourOnScreen(Theme.getAsHex(parent.workspace.currentTheme.font), 255, getPosX() - 0.5D, getPosY(), width, 1, 0);
        RendererHelper.drawColourOnScreen(Theme.getAsHex(parent.workspace.currentTheme.font), 255, getPosX() - 0.5D, getPosY(), 1, height, 0);
        RendererHelper.drawColourOnScreen(Theme.getAsHex(parent.workspace.currentTheme.font), 255, getPosX() - 0.5D, getPosY() + height - 1, width, 1, 0);
        RendererHelper.drawColourOnScreen(Theme.getAsHex(parent.workspace.currentTheme.font), 255, getPosX() + width - 1 - 0.5D, getPosY(), 1, height, 0);
    }
    GlStateManager.pushMatrix();
    float scale = 2F;
    GlStateManager.scale(scale, scale, scale);
    if(parent.minimized && !parent.invertMinimizeSymbol() || !parent.minimized && parent.invertMinimizeSymbol())
    {
        parent.workspace.getFontRenderer().drawString("\u25BC", (int)((float)(getPosX() + 2) / scale), (int)((float)(getPosY() - 2) / scale), Theme.getAsHex(parent.workspace.currentTheme.font), false); //down arrow
    }
    else
    {
        parent.workspace.getFontRenderer().drawString("\u25B2", (int)((float)(getPosX() + 2) / scale), (int)((float)(getPosY() - 2) / scale), Theme.getAsHex(parent.workspace.currentTheme.font), false); //up arrow
    }
    GlStateManager.popMatrix();
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:28,代码来源:ElementMinimize.java


示例19: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBorder[0], parent.workspace.currentTheme.elementButtonBorder[1], parent.workspace.currentTheme.elementButtonBorder[2], 255, getPosX(), getPosY(), width, height, 0);
    if(hover)
    {
        if(Mouse.isButtonDown(0))
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonClick[0], parent.workspace.currentTheme.elementButtonClick[1], parent.workspace.currentTheme.elementButtonClick[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
        else
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBackgroundHover[0], parent.workspace.currentTheme.elementButtonBackgroundHover[1], parent.workspace.currentTheme.elementButtonBackgroundHover[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
    }
    else
    {
        if(toggledState)
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonToggle[0], parent.workspace.currentTheme.elementButtonToggle[1], parent.workspace.currentTheme.elementButtonToggle[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
        else
        {
            RendererHelper.drawColourOnScreen(parent.workspace.currentTheme.elementButtonBackgroundInactive[0], parent.workspace.currentTheme.elementButtonBackgroundInactive[1], parent.workspace.currentTheme.elementButtonBackgroundInactive[2], 255, getPosX() + 1, getPosY() + 1, width - 2, height - 2, 0);
        }
    }
    parent.workspace.getFontRenderer().drawString(I18n.translateToLocal(text), getPosX() + (width / 2) - (parent.workspace.getFontRenderer().getStringWidth(I18n.translateToLocal(text)) / 2), getPosY() + height - (height / 2) - (parent.workspace.getFontRenderer().FONT_HEIGHT / 2), Theme.getAsHex(!toggledState ? parent.workspace.currentTheme.elementButtonToggleHover : parent.workspace.currentTheme.font), false);
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:29,代码来源:ElementToggle.java


示例20: draw

import me.ichun.mods.ichunutil.client.render.RendererHelper; //导入依赖的package包/类
@Override
public void draw(int mouseX, int mouseY, boolean hover)
{
    super.draw(mouseX, mouseY, hover);
    GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
    RendererHelper.drawTextureOnScreen(txLocation, getPosX() + 2, getPosY() + 2, width - 4, height - 4, 0);
}
 
开发者ID:iChun,项目名称:iChunUtil,代码行数:8,代码来源:ElementButtonTextured.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java GetClusterMetricsResponsePBImpl类代码示例发布时间:2022-05-22
下一篇:
Java RexProgramBuilder类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap