22
33import cc .polyfrost .oneconfig .config .annotations .*;
44import cc .polyfrost .oneconfig .config .core .OneColor ;
5- import cc .polyfrost .oneconfig .config .data .*;
65import cc .polyfrost .oneconfig .events .EventManager ;
76import cc .polyfrost .oneconfig .hud .SingleTextHud ;
87import cc .polyfrost .oneconfig .libs .universal .*;
@@ -48,9 +47,6 @@ public static class HeldItemTooltipHUD extends SingleTextHud {
4847 @ Exclude
4948 private static final Minecraft mc = UMinecraft .getMinecraft ();
5049
51- @ Exclude
52- private boolean example = false ;
53-
5450 public HeldItemTooltipHUD () {
5551 super ("" , true , 1920f / 2 , 1080f - 37f , 1 , false , false , 0 , 0 , 0 , new OneColor (0 , 0 , 0 , 80 ), false , 2 , new OneColor (0 , 0 , 0 ));
5652 this .textType = 1 ;
@@ -73,7 +69,9 @@ protected void drawLine(String line, float x, float y, OneColor c, float scale)
7369
7470 @ Override
7571 public void drawAll (UMatrixStack matrices , boolean example ) {
76- this .example = example ;
72+ if (example ) {
73+ opacity = 255 ;
74+ }
7775 super .drawAll (matrices , example );
7876 }
7977
@@ -88,7 +86,7 @@ protected boolean shouldShow() {
8886 if (o > 255 ) {
8987 o = 255 ;
9088 }
91- opacity = example || instantFade ? 255 : o ;
89+ opacity = instantFade ? 255 : o ;
9290 String spectatorText = null ;
9391 if (mc .thePlayer != null && mc .thePlayer .isSpectator ()) {
9492 GuiSpectatorAccessor spectatorAccessor = (GuiSpectatorAccessor ) mc .ingameGUI .getSpectatorGui ();
@@ -107,7 +105,6 @@ protected boolean shouldShow() {
107105 }
108106
109107 protected void drawBackground (float x , float y , float width , float height , float scale ) {
110-
111108 NanoVGHelper nanoVGHelper = NanoVGHelper .INSTANCE ;
112109 nanoVGHelper .setupAndDraw (true , (vg ) -> {
113110 int bgColor = ColorUtils .setAlpha (this .bgColor .getRGB (), Math .min (this .bgColor .getAlpha (), this .opacity ));
0 commit comments