Better Tooltips

This commit is contained in:
kirillsaint 2023-09-03 22:53:13 +06:00
parent d3c9efc4f3
commit bd98375436
4 changed files with 13 additions and 13 deletions

View File

@ -79,8 +79,6 @@ public class ColorPicker extends SilentScreen {
ModMenu.drawOverlayListBase(height, "Choose a color");
super.drawScreen(mouseX, mouseY, partialTicks);
ModMenu.trimContentStart(width, height);
float colorY = 66;
int colorX = 3;
@ -121,6 +119,8 @@ public class ColorPicker extends SilentScreen {
cursorType = MouseCursorHandler.CursorType.POINTER;
}
super.drawScreen(mouseX, mouseY, partialTicks);
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
ModMenu.trimContentEnd();

View File

@ -91,7 +91,7 @@ public class ModMenu extends SilentScreen {
public static void initBaseButtons(List<GuiButton> buttonList) {
buttonList.add(new IconButton(91, 132, 5, 15, 15, 9, 9, new ResourceLocation("silentclient/icons/exit.png")));
buttonList.add(new IconButton(92, 132, 46, 15, 15, 9, 9, new ResourceLocation("silentclient/icons/pencil.png")));
buttonList.add(new TooltipIconButton(92, 132, 46, 15, 15, 9, 9, new ResourceLocation("silentclient/icons/pencil.png"), "Edit HUD"));
}
public static void clickBaseButtons(GuiButton button, GuiScreen screen) {
@ -125,8 +125,6 @@ public class ModMenu extends SilentScreen {
MenuBlurUtils.renderBackground(this);
ModMenu.drawOverlayListBase(height, modCategory == ModCategory.PLUS ? "Premium" : null);
super.drawScreen(mouseX, mouseY, partialTicks);
if(modCategory != ModCategory.CONFIGS && modCategory != ModCategory.PLUS) {
this.silentInputs.get(0).render(mouseX, mouseY, 3, 46, 127, true);
this.buttonList.get(6).visible = false;
@ -241,10 +239,12 @@ public class ModMenu extends SilentScreen {
this.scrollHeight = 66 + premiumY + scrollAnimation.getValue();
}
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
trimContentEnd();
super.drawScreen(mouseX, mouseY, partialTicks);
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
scrollAnimation.setAnimation(scrollY, 12);
}

View File

@ -80,8 +80,6 @@ public class ModSettings extends SilentScreen {
MenuBlurUtils.renderBackground(this);
ModMenu.drawOverlayListBase(height, mod.getName());
super.drawScreen(mouseX, mouseY, partialTicks);
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
ModMenu.trimContentStart(width, height);
@ -161,12 +159,14 @@ public class ModSettings extends SilentScreen {
settingY += settingHeight;
}
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
this.scrollHeight = 66 + settingY + scrollAnimation.getValue();
ModMenu.trimContentEnd();
super.drawScreen(mouseX, mouseY, partialTicks);
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
scrollAnimation.setAnimation((float) scrollY, 12);
}

View File

@ -63,8 +63,6 @@ public class PremiumColorPicker extends SilentScreen {
ModMenu.drawOverlayListBase(height, "Choose a color");
super.drawScreen(mouseX, mouseY, partialTicks);
ModMenu.trimContentStart(width, height);
float colorY = 66;
int colorX = 3;
@ -94,6 +92,8 @@ public class PremiumColorPicker extends SilentScreen {
cursorType = MouseCursorHandler.CursorType.POINTER;
}
super.drawScreen(mouseX, mouseY, partialTicks);
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
ModMenu.trimContentEnd();