當前位置: 首頁>>代碼示例>>Java>>正文


Java EnumChatFormatting.OBFUSCATED屬性代碼示例

本文整理匯總了Java中net.minecraft.util.EnumChatFormatting.OBFUSCATED屬性的典型用法代碼示例。如果您正苦於以下問題:Java EnumChatFormatting.OBFUSCATED屬性的具體用法?Java EnumChatFormatting.OBFUSCATED怎麽用?Java EnumChatFormatting.OBFUSCATED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在net.minecraft.util.EnumChatFormatting的用法示例。


在下文中一共展示了EnumChatFormatting.OBFUSCATED屬性的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: drawSlot

protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
{
    IngestServer ingestserver = this.mc.getTwitchStream().func_152925_v()[entryID];
    String s = ingestserver.serverUrl.replaceAll("\\{stream_key\\}", "");
    String s1 = (int)ingestserver.bitrateKbps + " kbps";
    String s2 = null;
    IngestServerTester ingestservertester = this.mc.getTwitchStream().func_152932_y();

    if (ingestservertester != null)
    {
        if (ingestserver == ingestservertester.func_153040_c())
        {
            s = EnumChatFormatting.GREEN + s;
            s1 = (int)(ingestservertester.func_153030_h() * 100.0F) + "%";
        }
        else if (entryID < ingestservertester.func_153028_p())
        {
            if (ingestserver.bitrateKbps == 0.0F)
            {
                s1 = EnumChatFormatting.RED + "Down!";
            }
        }
        else
        {
            s1 = EnumChatFormatting.OBFUSCATED + "1234" + EnumChatFormatting.RESET + " kbps";
        }
    }
    else if (ingestserver.bitrateKbps == 0.0F)
    {
        s1 = EnumChatFormatting.RED + "Down!";
    }

    p_180791_2_ = p_180791_2_ - 15;

    if (this.isSelected(entryID))
    {
        s2 = EnumChatFormatting.BLUE + "(Preferred)";
    }
    else if (ingestserver.defaultServer)
    {
        s2 = EnumChatFormatting.GREEN + "(Default)";
    }

    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, ingestserver.serverName, p_180791_2_ + 2, p_180791_3_ + 5, 16777215);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s, p_180791_2_ + 2, p_180791_3_ + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT + 5 + 3, 3158064);
    GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s1, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s1), p_180791_3_ + 5, 8421504);

    if (s2 != null)
    {
        GuiIngestServers.this.drawString(GuiIngestServers.this.fontRendererObj, s2, this.getScrollBarX() - 5 - GuiIngestServers.this.fontRendererObj.getStringWidth(s2), p_180791_3_ + 5 + 3 + GuiIngestServers.this.fontRendererObj.FONT_HEIGHT, 8421504);
    }
}
 
開發者ID:Notoh,項目名稱:DecompiledMinecraft,代碼行數:52,代碼來源:GuiIngestServers.java


注:本文中的net.minecraft.util.EnumChatFormatting.OBFUSCATED屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。