<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[A Notification Theme like IntelliJ IDEA.]]></title><description><![CDATA[<p dir="auto">this is a notification like idea.i will give you icons and codes.</p>
<pre><code>
import net.ccbluex.liquidbounce.LiquidBounce
import net.ccbluex.liquidbounce.utils.timer.MSTimer
import net.ccbluex.liquidbounce.LiquidBounce.hud
import net.ccbluex.liquidbounce.value.BoolValue
import net.ccbluex.liquidbounce.value.FloatValue
import net.ccbluex.liquidbounce.value.ListValue
import net.ccbluex.liquidbounce.value.IntegerValue
import net.ccbluex.liquidbounce.ui.client.hud.designer.GuiHudDesigner
import net.ccbluex.liquidbounce.ui.client.hud.element.Border
import net.ccbluex.liquidbounce.ui.client.hud.element.Element
import net.ccbluex.liquidbounce.ui.client.hud.element.ElementInfo
import net.ccbluex.liquidbounce.ui.client.hud.element.Side
import net.ccbluex.liquidbounce.utils.render.AnimationUtils
import net.ccbluex.liquidbounce.utils.render.BlurUtils
import net.ccbluex.liquidbounce.utils.render.Stencil
import net.minecraft.client.gui.Gui
import net.minecraft.client.renderer.GlStateManager
import net.ccbluex.liquidbounce.ui.font.Fonts
import net.ccbluex.liquidbounce.utils.ClientUtils
import net.ccbluex.liquidbounce.utils.render.RenderUtils
import net.minecraft.util.ResourceLocation
import java.awt.Color

import org.lwjgl.opengl.GL11

@ElementInfo(name = "Notifications", single = true)
class Notifications(x: Double = 0.0, y: Double = 30.0, scale: Float = 1F,
                    side: Side = Side(Side.Horizontal.RIGHT, Side.Vertical.DOWN)) : Element(x, y, scale, side) {

    private val smoothYTransition = BoolValue("Smooth-YTransition", true)
    private val blurValue = BoolValue("Blur", false)
    private val blurStrength = FloatValue("Blur-Strength", 0F, 0F, 30F)
    private val styleValue = ListValue("Style", arrayOf("Compact", "New", "IntelliJ IDEA LOL"), "Compact")
    private val newAnimValue = BoolValue("UseNewAnim", true)
    private val animationSpeed = FloatValue("Anim-Speed", 0.5F, 0.01F, 1F, { newAnimValue.get() })
    private val bgRedValue = IntegerValue("Background-Red", 0, 0, 255)
    private val bgGreenValue = IntegerValue("Background-Red", 0, 0, 255)
    private val bgBlueValue = IntegerValue("Background-Red", 0, 0, 255)
    private val bgAlphaValue = IntegerValue("Background-Alpha", 190, 0, 255)

    /**
     * Example notification for CustomHUD designer
     */
    private val exampleNotification = Notification("Example Notification", Notification.Type.INFO)

    /**
     * Draw element
     */
    override fun drawElement(): Border? {
        val bgColor = Color(bgRedValue.get(), bgGreenValue.get(), bgBlueValue.get(), bgAlphaValue.get())
        var animationY = 30F
        val notifications = mutableListOf()

        for (i in hud.notifications)
            notifications.add(i)
        
        if (mc.currentScreen !is GuiHudDesigner || !notifications.isEmpty()) 
            for(i in notifications)
                i.drawNotification(
                animationY, 
                smoothYTransition.get(), 
                newAnimValue.get(), 
                animationSpeed.get(), 
                bgColor, side, 
                styleValue.get(), 
                blurValue.get(), 
                blurStrength.get(), 
                renderX.toFloat(), 
                renderY.toFloat())
                    .also { animationY += when (styleValue.get().toLowerCase()) {
                        "compact" -&gt; 20
                        "full" -&gt; 30
                        else -&gt; 30
                    } * if (side.vertical == Side.Vertical.DOWN) 1F else -1F}
        else
            exampleNotification.drawNotification(
                animationY, 
                smoothYTransition.get(), 
                newAnimValue.get(), 
                animationSpeed.get(), 
                bgColor, side, 
                styleValue.get(), 
                blurValue.get(), 
                blurStrength.get(), 
                renderX.toFloat(), 
                renderY.toFloat())

        if (mc.currentScreen is GuiHudDesigner) {
            exampleNotification.fadeState = Notification.FadeState.STAY
            //exampleNotification.stayTimer.reset()
            exampleNotification.x = exampleNotification.textLength + 8F
            if (exampleNotification.stayTimer.hasTimePassed(exampleNotification.displayTime)) 
                exampleNotification.stayTimer.reset()

            return if (styleValue.get().equals("compact", true)) Border(-102F, -48F, 0F, -30F) else Border(-130F, -58F, 0F, -30F)
        }

        return null
    }

}
class Notification(message : String, type : Type, displayLength: Long) {
    private val notifyDir = "liquidbounce+/notif/"
    private val imgSuccess = ResourceLocation("${notifyDir}checkmark.png")
    private val imgError = ResourceLocation("${notifyDir}error.png")
    private val imgWarning = ResourceLocation("${notifyDir}warning.png")
    private val imgInfo = ResourceLocation("${notifyDir}info.png")

    var x = 0f
    var textLength = 0
    private var stay = 0f
    private var fadeStep = 0f
    var fadeState = FadeState.IN
    var displayTime : Long = 0L
    var stayTimer = MSTimer()
    private var firstY = 0f
    private var message: String = ""
    private var type: Type
    init {
        this.message = message
        this.type = type
        this.displayTime = displayLength
        this.firstY = 19190F
        this.stayTimer.reset()
        this.textLength = Fonts.minecraftFont.getStringWidth(message)
    }

    constructor(message: String, type: Type) : this(message, type, 2000L)

    constructor(message: String) : this(message, Type.INFO, 500L)

    constructor(message: String, displayLength: Long) : this(message, Type.INFO, displayLength)

    enum class Type {
        SUCCESS,
        INFO,
        WARNING,
        ERROR
    }

    enum class FadeState {
        IN,STAY,OUT,END
    }

    fun drawNotification(animationY: Float, smooth: Boolean, newAnim: Boolean, animSpeed: Float, backgroundColor: Color, side: Side, style: String, blur: Boolean, strength: Float, originalX: Float, originalY: Float) {
        val delta = RenderUtils.deltaTime
        val width = textLength.toFloat() + 8.0f
        
        if (smooth) {
            if (firstY == 19190.0F) {
                firstY = animationY
            }
            firstY += (animationY - firstY) * 0.25F
        } else {
            firstY = animationY
        }

        var y = firstY

        when (style.toLowerCase()) {
            "compact" -&gt; {
                GlStateManager.resetColor()
                if (blur) {
                    GL11.glTranslatef(-originalX, -originalY, 0F)
                    GL11.glPushMatrix()
                    BlurUtils.blurAreaRounded(originalX + -x - 5F, originalY + -18F - y, originalX + -x + 8F + textLength, originalY + -y, 3F, strength)
                    GL11.glPopMatrix()
                    GL11.glTranslatef(originalX, originalY, 0F)
                } 

                RenderUtils.customRounded(-x + 8F + textLength, -y, -x - 2F, -18F - y, 0F, 3F, 3F, 0F, backgroundColor.rgb)
                RenderUtils.customRounded(-x - 2F, -y, -x - 5F, -18F - y, 3F, 0F, 0F, 3F, when(type) {
                        Type.SUCCESS -&gt; Color(80, 255, 80).rgb
                        Type.ERROR -&gt; Color(255, 80, 80).rgb
                        Type.INFO -&gt; Color(255, 255, 255).rgb
                        Type.WARNING -&gt; Color(255, 255, 0).rgb
                    })  

                GlStateManager.resetColor()
                Fonts.minecraftFont.drawStringWithShadow(message, -x + 3, -13F - y, -1)
            }

            "new" -&gt; {
                val dist = (x + 1 + 26F) - (x - 8 - textLength)
                val kek = -x - 1 - 20F

                val toolong = dist * if (stayTimer.hasTimePassed(displayTime)) 0F else ((displayTime - (System.currentTimeMillis() - stayTimer.time)).toFloat() / displayTime.toFloat())

                GlStateManager.resetColor()
                if (blur) {
                    GL11.glTranslatef(-originalX, -originalY, 0F)
                    GL11.glPushMatrix()
                    BlurUtils.blurAreaRounded(originalX + kek, originalY + -28F - y, originalX + -x + 8 + textLength, originalY + -y, 3F, strength)
                    GL11.glPopMatrix()
                    GL11.glTranslatef(originalX, originalY, 0F)
                } 

                Stencil.write(true)
                RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, backgroundColor.rgb)
                Stencil.erase(true)

                GlStateManager.resetColor()
                if (fadeState == FadeState.STAY &amp;&amp; !stayTimer.hasTimePassed(displayTime))
                    RenderUtils.newDrawRect(kek, -y, kek + toolong, -1.5F - y, when(type) {
                        Type.SUCCESS -&gt; Color(80, 255, 80, 255).rgb
                        Type.ERROR -&gt; Color(255, 80, 80, 255).rgb
                        Type.INFO -&gt; Color(127,174,210).rgb
                        Type.WARNING -&gt; Color(255, 255, 0).rgb
                    })
                else if (fadeState == FadeState.IN)
                    RenderUtils.newDrawRect(kek, -y, kek + dist, -1.5F - y, when(type) {
                        Type.SUCCESS -&gt; Color(80, 255, 80, 255).rgb
                        Type.ERROR -&gt; Color(255, 80, 80, 255).rgb
                        Type.INFO -&gt; Color(127,174,210).rgb
                        Type.WARNING -&gt; Color(255, 255, 0).rgb
                    })

                Stencil.dispose()

                GL11.glPushMatrix()
                GlStateManager.disableAlpha()
                GlStateManager.resetColor()
                GL11.glColor4f(1F, 1F, 1F, 1F)
                RenderUtils.drawImage2(when (type) {
                    Type.SUCCESS -&gt; imgSuccess
                    Type.ERROR -&gt; imgError
                    Type.WARNING -&gt; imgWarning
                    Type.INFO -&gt; imgInfo
                }, kek +2, -24F - y, 18, 18)
                GlStateManager.enableAlpha()
                GL11.glPopMatrix()

                Fonts.minecraftFont.drawStringWithShadow(message, -x + 2, -18F - y, -1)
            }

            "intellij idea lol" -&gt; {
                val dist = (x + 1 + 26F) - (x - 8 - textLength)
                val kek = -x - 1 - 20F

                GlStateManager.resetColor()
                if (blur) {
                    GL11.glTranslatef(-originalX, -originalY, 0F)
                    GL11.glPushMatrix()
                    BlurUtils.blurAreaRounded(originalX + kek, originalY + -28F - y, originalX + -x + 8 + textLength, originalY + -y, 3F, strength)
                    GL11.glPopMatrix()
                    GL11.glTranslatef(originalX, originalY, 0F)
                }

                Stencil.write(true)

                if (type == Type.ERROR) {
                    RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(115,69,75).rgb)
                    RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(89,61,65).rgb)
                    Fonts.minecraftFont.drawStringWithShadow("IDE Error:", -x - 4, -25F - y, Color(249,130,108).rgb)
                }
                if (type == Type.INFO) {
                    RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(70,94,115).rgb)
                    RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(61,72,87).rgb)
                    Fonts.minecraftFont.drawStringWithShadow("IDE Information:", -x - 4, -25F - y, Color(119,145,147).rgb)
                }
                if (type == Type.SUCCESS) {
                    RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(67,104,67).rgb)
                    RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(55,78,55).rgb)
                    Fonts.minecraftFont.drawStringWithShadow("IDE Success:", -x - 4, -25F - y, Color(10,142,2).rgb)
                }
                if (type == Type.WARNING) {
                    RenderUtils.drawRoundedRect(-x + 9 + textLength, -y + 1, kek - 1, -28F - y - 1, 0F, Color(103,103,63).rgb)
                    RenderUtils.drawRoundedRect(-x + 8 + textLength, -y, kek, -28F - y, 0F, Color(80,80,57).rgb)
                    Fonts.minecraftFont.drawStringWithShadow("IDE Warning:", -x - 4, -25F - y, Color(175,163,0).rgb)
                }

                Stencil.erase(true)

                GlStateManager.resetColor()

                Stencil.dispose()

                GL11.glPushMatrix()
                GlStateManager.disableAlpha()
                GlStateManager.resetColor()
                GL11.glColor4f(1F, 1F, 1F, 1F)
                RenderUtils.drawImage2(when (type) {
                    Type.SUCCESS -&gt; imgSuccess
                    Type.ERROR -&gt; imgError
                    Type.WARNING -&gt; imgWarning
                    Type.INFO -&gt; imgInfo
                }, kek + 5, -25F - y, 7, 7)
                GlStateManager.enableAlpha()
                GL11.glPopMatrix()

                Fonts.minecraftFont.drawStringWithShadow(message, -x - 4, -13F - y, -1)
            }
        }

        when (fadeState) {
            FadeState.IN -&gt; {
                if (x &lt; width) {
                    if (newAnim) 
                        x = net.ccbluex.liquidbounce.utils.AnimationUtils.animate(width, x, animSpeed * 0.025F * delta)
                    else 
                        x = AnimationUtils.easeOut(fadeStep, width) * width
                    fadeStep += delta / 4F
                }
                if (x &gt;= width) {
                    fadeState = FadeState.STAY
                    x = width
                    fadeStep = width
                }

                stay = 60F
                stayTimer.reset()
            }

            FadeState.STAY -&gt; {
                if (stay &gt; 0) {
                    stay = 0F
                    stayTimer.reset()
                }
                if (stayTimer.hasTimePassed(displayTime))
                    fadeState = FadeState.OUT
            }

            FadeState.OUT -&gt; if (x &gt; 0) {
                if (newAnim) 
                    x = net.ccbluex.liquidbounce.utils.AnimationUtils.animate(-width, x, animSpeed * 0.025F * delta)
                else 
                    x = AnimationUtils.easeOut(fadeStep, width) * width

                fadeStep -= delta / 4F
            } else
                fadeState = FadeState.END

            FadeState.END -&gt; hud.removeNotification(this)
        }        
    }
}

</code></pre>
<p dir="auto">icon and ending photo!<br />
<img src="/assets/uploads/files/1651046184356-58cea7ef-a755-4d52-9115-48f5c0e45083.png" alt="58CEA7EF-A755-4D52-9115-48F5C0E45083.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1651046184348-55d78e4e-2882-4605-9869-8ec44c3b25ad.png" alt="55D78E4E-2882-4605-9869-8EC44C3B25AD.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1651046184343-230046ae-fdc0-43bb-b75a-d00aa7872b8f.png" alt="230046AE-FDC0-43BB-B75A-D00AA7872B8F.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1651046184338-4b50c6c2-7a01-449f-9d0b-7405554e7e10.png" alt="4B50C6C2-7A01-449F-9D0B-7405554E7E10.png" class=" img-fluid img-markdown" /> <img src="/assets/uploads/files/1651046184333-7e15207e-edcd-438b-a8fa-643925e7c81d.png" alt="7E15207E-EDCD-438B-A8FA-643925E7C81D.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.liquidbounce.net/topic/3924/a-notification-theme-like-intellij-idea</link><generator>RSS for Node</generator><lastBuildDate>Wed, 13 May 2026 00:55:00 GMT</lastBuildDate><atom:link href="https://forum.liquidbounce.net/topic/3924.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 27 Apr 2022 07:53:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to A Notification Theme like IntelliJ IDEA. on Sat, 10 Sep 2022 00:49:23 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/larissa" aria-label="Profile: larissa">@<bdi>larissa</bdi></a> code by ryannnnn<img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60e.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--sunglasses" style="height:23px;width:auto;vertical-align:middle" title="😎" alt="😎" /><img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f60e.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--sunglasses" style="height:23px;width:auto;vertical-align:middle" title="😎" alt="😎" /></p>
]]></description><link>https://forum.liquidbounce.net/post/33565</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/33565</guid><dc:creator><![CDATA[Ryannnnn]]></dc:creator><pubDate>Sat, 10 Sep 2022 00:49:23 GMT</pubDate></item><item><title><![CDATA[Reply to A Notification Theme like IntelliJ IDEA. on Fri, 29 Apr 2022 06:50:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/larissa" aria-label="Profile: larissa">@<bdi>larissa</bdi></a> Nice work</p>
]]></description><link>https://forum.liquidbounce.net/post/30176</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/30176</guid><dc:creator><![CDATA[Konoha Scarlet]]></dc:creator><pubDate>Fri, 29 Apr 2022 06:50:36 GMT</pubDate></item><item><title><![CDATA[Reply to A Notification Theme like IntelliJ IDEA. on Wed, 27 Apr 2022 13:42:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/koitoyuu" aria-label="Profile: koitoyuu">@<bdi>koitoyuu</bdi></a> thx</p>
]]></description><link>https://forum.liquidbounce.net/post/30151</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/30151</guid><dc:creator><![CDATA[Larissa]]></dc:creator><pubDate>Wed, 27 Apr 2022 13:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to A Notification Theme like IntelliJ IDEA. on Wed, 27 Apr 2022 13:10:07 GMT]]></title><description><![CDATA[<p dir="auto">Very Cute <img src="https://forum.liquidbounce.net/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=866ab33d74c" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://forum.liquidbounce.net/post/30149</link><guid isPermaLink="true">https://forum.liquidbounce.net/post/30149</guid><dc:creator><![CDATA[Koitoyuu]]></dc:creator><pubDate>Wed, 27 Apr 2022 13:10:07 GMT</pubDate></item></channel></rss>