package easylight.cc.notification;
import com.mojang.blaze3d.matrix.MatrixStack;
import easylight.cc.util.IMinecraft;
import easylight.cc.util.animations.Animation;
import easylight.cc.util.animations.Direction;
import easylight.cc.util.animations.impl.DecelerateAnimation;
import easylight.cc.util.font.Fonts;
import easylight.cc.util.render.RenderUtil;
import easylight.cc.util.render.RenderUtil.Render2D;
import java.awt.Color;
public class Notification {
public float x;
public float y;
public String text;
public String content;
public long time;
public Animation animation;
public Animation yAnimation;
public float alpha;
public int time2;
public final NotificationManager this$0;
public Notification(NotificationManager var1, String var2, String var3, int var4) {
this.this$0 = var1;
this.y = (float)(IMinecraft.mc.getMainWindow().scaledHeight() + 25);
this.time = System.currentTimeMillis();
this.animation = new DecelerateAnimation(500, 1.0, Direction.FORWARDS);
this.yAnimation = new DecelerateAnimation(150, 1.0, Direction.FORWARDS);
this.time2 = 3;
this.text = var2;
this.content = var3;
this.time2 = var4;
}
public float draw(MatrixStack var1) {
float var2 = Fonts.msSemiBold[12].getWidth(this.text) + 28.0F;
float var3 = this.x - var2 / 2.0F;
Render2D.drawRoundedCorner(var3 - 53.0F, this.y + 15.0F, var2, 11.0F, 4.0F, (new Color(30, 30, 30, 210)).getRGB());
Render2D.drawRect(var3 - 36.1F, this.y + 18.0F, 0.5F, 5.5F, (new Color(200, 200, 200, 100)).getRGB());
Fonts.msSemiBold[12].drawString(var1, this.text, (double)(var3 - 31.0F), (double)(this.y + 19.0F), RenderUtil.reAlphaInt(-1, (int)(255.0F * this.alpha)));
if (this.text.contains("Включен")) {
Fonts.nursultan[16].drawString(var1, "K", (double)(var3 - 48.0F), (double)(this.y + 20.0F), -1);
} else {
Fonts.nursultan[16].drawString(var1, "J", (double)(var3 - 48.0F), (double)(this.y + 20.0F), -1);
}
if (this.text.contains("был забинжен на кнопку")) {
Fonts.nursultan[16].drawString(var1, "H", (double)(var3 - 48.0F), (double)(this.y + 20.0F), -1);
}
return 12.0F;
}
public float getX() {
return this.x;
}
public float getY() {
return this.y;
}
public void setX(float var1) {
this.x = var1;
}
public void setY(float var1) {
this.y = var1;
}
public String getText() {
return this.text;
}
public String getContent() {
return this.content;
}
public long getTime() {
return this.time;
}
}