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


Java GuiCelestialSelection.BORDER_WIDTH属性代码示例

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


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

示例1: drawMothershipGuiParts

protected void drawMothershipGuiParts(int mousePosX, int mousePosY)
{
    //int offset=0;
    //String str;

    GL11.glColor4f(0.0F, 0.6F, 1.0F, 1);
    //this.mc.renderEngine.bindTexture(GuiCelestialSelection.guiMain1);
    //this.mc.renderEngine.bindTexture(guiExtra);
    /*int canCreateLength = Math.max(0, this.drawSplitString(GCCoreUtil.translate("gui.message.canCreateMothership.name"), 0, 0, 91, 0, true, true) - 2);
    int canCreateOffset = canCreateLength * this.smallFontRenderer.FONT_HEIGHT;*/

    offsetX = width - GuiCelestialSelection.BORDER_WIDTH - GuiCelestialSelection.BORDER_EDGE_WIDTH;
    offsetY = GuiCelestialSelection.BORDER_WIDTH + GuiCelestialSelection.BORDER_EDGE_WIDTH;

    if(this.curMothership.isInTransit()) {
        drawTransitInfo(mousePosX, mousePosY);
    }
    if(this.hasMothershipStats) {
        drawMothershipInfo();
    }
    if(this.selectedBody != null) {
        drawTargetBodyInfo(mousePosX, mousePosY);
    }
}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:24,代码来源:GuiMothershipSelection.java

示例2: drawButtons

@Override
public void drawButtons(int mousePosX, int mousePosY)
{
    this.possibleBodies = this.shuttlePossibleBodies;
    super.drawButtons(mousePosX, mousePosY);
    if (this.selectionState != EnumSelectionState.PROFILE && this.selectedBody != null && canCreateMothership(this.selectedBody))
    {
        drawMothershipButton(mousePosX, mousePosY);
    }

    // exit button

    GL11.glColor4f(0.0F, 1.0F, 0.1F, 1);
    this.mc.renderEngine.bindTexture(GuiCelestialSelection.guiMain0);


    int exitWidth = width - GuiCelestialSelection.BORDER_WIDTH - GuiCelestialSelection.BORDER_EDGE_WIDTH - 74;
    int exitHeight = height - GuiCelestialSelection.BORDER_WIDTH - GuiCelestialSelection.BORDER_EDGE_WIDTH - 11;

    exitBtnArea.setPositionSize(exitWidth, exitHeight, 74, 11);

    this.drawTexturedModalRect(
            exitBtnArea.minX,
            exitBtnArea.minY,
            exitBtnArea.getWidth(),
            exitBtnArea.getHeight(),
            0, 392, 148, 22, true, true);
    String str = GCCoreUtil.translate("gui.message.cancel.name").toUpperCase();
    this.fontRendererObj.drawString(str,
            exitBtnArea.minX + (exitBtnArea.getWidth()-this.fontRendererObj.getStringWidth(str))/2,
            exitBtnArea.minY + 2, ColorUtil.to32BitColor(255, 255, 255, 255));
}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:32,代码来源:GuiShuttleSelection.java

示例3: drawTransitInfo

protected void drawTransitInfo(int mousePosX, int mousePosY)
{
    GL11.glColor4f(0.0F, 0.6F, 1.0F, 1);
    this.mc.renderEngine.bindTexture(guiExtra);


    this.drawTexturedModalRect(
            width/2-90,
            height-11-GuiCelestialSelection.BORDER_WIDTH-4,
            TRANSIT_INFO_W, //w
            TRANSIT_INFO_H,  //h
            TRANSIT_INFO_U,    // u
            TRANSIT_INFO_V,      // v
            TRANSIT_INFO_W,
            TRANSIT_INFO_H,
            false, false);

 // bar
    //this.mc.renderEngine.bindTexture(GuiCelestialSelection.guiMain0);

    GL11.glColor4f(0.35F, 0.01F, 0.01F, 1);
    //GL11.glEnable(GL11.GL_BLEND);

    drawTransitBar(124);

    GL11.glColor4f(0.95F, 0.01F, 0.01F, 1);
    drawTransitBar(this.curMothership.getScaledTravelTime(124));

    /*this.drawTexturedModalRect(
            width/2-90+28,
            height-11-GuiCelestialSelection.BORDER_WIDTH+2,
            length, //displayed w
            4,  //displayed h
            1,    // u aka x in tex
            0,      // v
            43,     // w in texture
            4,      // h in texture
            false, false);*/
    if(isMouseWithin(mousePosX, mousePosY, width/2-90+28, height-11-GuiCelestialSelection.BORDER_WIDTH+2, 124, 4)) {
        //GCCoreUtil.translate("gui.message.mothership.travelTimeRemain")
        // ;
        this.showTooltip(GCCoreUtil.translateWithFormat("gui.message.mothership.travelTimeRemain", GuiHelper.formatTime(curMothership.getRemainingTravelTime())), mousePosX, mousePosY);
    }


    // test place planet symbols
    // source
    int bodyX = width/2-90+14;
    int bodyY = height-11-GuiCelestialSelection.BORDER_WIDTH;
    this.drawBodyOnGUI(curMothership.getSource(), bodyX, bodyY, 8, 8);
    if(isMouseWithin(mousePosX, mousePosY, bodyX, bodyY, 8, 8)) {
        this.showTooltip(curMothership.getSource().getLocalizedName(), mousePosX, mousePosY);
    }
    // dest
    bodyX = width/2+90-14-8;
    bodyY = height-11-GuiCelestialSelection.BORDER_WIDTH;
    this.drawBodyOnGUI(curMothership.getDestination(), bodyX, bodyY, 8, 8);
    if(isMouseWithin(mousePosX, mousePosY, bodyX, bodyY, 8, 8)) {
        this.showTooltip(curMothership.getDestination().getLocalizedName(), mousePosX, mousePosY);
    }
}
 
开发者ID:katzenpapst,项目名称:amunra,代码行数:61,代码来源:GuiMothershipSelection.java


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