Cursors
@ -14,6 +14,7 @@ import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.RenderUtils;
|
||||
import net.silentclient.client.gui.theme.Theme;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.NotificationUtils;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@ -34,6 +35,7 @@ public class AddConfigModal extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
MenuBlurUtils.loadBlur();
|
||||
defaultCursor = false;
|
||||
this.cloneConfig = false;
|
||||
int x = width / 2 - (this.modalWidth / 2);
|
||||
int y = height / 2 - (this.modalHeight / 2);
|
||||
@ -67,6 +69,7 @@ public class AddConfigModal extends SilentScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
GlStateManager.pushMatrix();
|
||||
int x = width / 2 - (this.modalWidth / 2);
|
||||
int y = height / 2 - (this.modalHeight / 2);
|
||||
@ -78,6 +81,11 @@ public class AddConfigModal extends SilentScreen {
|
||||
// Content
|
||||
this.silentInputs.get(0).render(mouseX, mouseY, x + 3, y + 23, this.modalWidth - 6);
|
||||
Checkbox.render(mouseX, mouseY, x + 3, y + 50, "Clone Current Config", cloneConfig);
|
||||
if(Checkbox.isHovered(mouseX, mouseY, x + 3, y + 50)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
|
@ -24,6 +24,7 @@ import net.silentclient.client.mods.settings.GeneralMod;
|
||||
import net.silentclient.client.gui.theme.button.DefaultButtonTheme;
|
||||
import net.silentclient.client.gui.theme.button.SelectedButtonTheme;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import net.silentclient.client.utils.types.PlayerResponse.Account.Cosmetics.CosmeticItem;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -43,6 +44,7 @@ public class CosmeticsGui extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
rotate = 144;
|
||||
defaultCursor = false;
|
||||
if(mc.thePlayer == null) {
|
||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||
} else {
|
||||
@ -234,6 +236,7 @@ public class CosmeticsGui extends SilentScreen {
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
if(mc.thePlayer == null) {
|
||||
GlStateManager.disableAlpha();
|
||||
Client.backgroundPanorama.renderSkybox(mouseX, mouseY, partialTicks);
|
||||
@ -306,7 +309,9 @@ public class CosmeticsGui extends SilentScreen {
|
||||
if(items != null) {
|
||||
for(CosmeticItem m : items) {
|
||||
RenderUtil.drawRoundedOutline(x + 100, y + modOffsetY + scrollAnimation.getValue(), 135, 28, 10, 2, selected_item.contains(m.getId()) ? new Color(32, 252, 3).getRGB() : new Color(252, 3, 3).getRGB());
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + 100, y + modOffsetY + scrollAnimation.getValue(), 135, 28)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
GL11.glDisable((int) 2929);
|
||||
GL11.glEnable((int) 3042);
|
||||
GL11.glDepthMask((boolean) false);
|
||||
@ -357,6 +362,8 @@ public class CosmeticsGui extends SilentScreen {
|
||||
if(selectedCategory == "icons" && can_show) {
|
||||
RenderUtil.drawImage(Client.getInstance().getAccount().getSelectedIcon() != 0 && !Client.getInstance().getAccount().plusIcon() ? Client.getInstance().getCosmetics().getIconById(Client.getInstance().getAccount().getSelectedIcon()).getLocation() : new ResourceLocation(Client.getInstance().getAccount().plusIcon() ? "silentclient/icons/plus_icon.png" : "silentclient/icons/player_icon.png"), x + 285, y + ((height / 2) - 25), 50, 50, false);
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
final Scroll scroll = MouseUtils.scroll();
|
||||
|
||||
|
@ -16,6 +16,7 @@ import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||
import net.silentclient.client.gui.theme.Theme;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.types.PlayerResponse;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -38,6 +39,7 @@ public class OutfitsGui extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.scrollY = 0;
|
||||
if(mc.thePlayer == null) {
|
||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||
@ -53,6 +55,7 @@ public class OutfitsGui extends SilentScreen {
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
if(mc.thePlayer == null) {
|
||||
GlStateManager.disableAlpha();
|
||||
Client.backgroundPanorama.renderSkybox(mouseX, mouseY, partialTicks);
|
||||
@ -84,6 +87,7 @@ public class OutfitsGui extends SilentScreen {
|
||||
int outfitIndex = 0;
|
||||
boolean isCreateHovered = MouseUtils.isInside(mouseX, mouseY, outfitX, outfitY, 80, 80);
|
||||
if(isCreateHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
RenderUtil.drawRoundedRect(outfitX, outfitY, 80, 80, 3, new Color(255, 255, 255, 30).getRGB());
|
||||
}
|
||||
RenderUtil.drawRoundedOutline(outfitX, outfitY, 80, 80, 3, 1, Theme.borderColor().getRGB());
|
||||
@ -94,6 +98,7 @@ public class OutfitsGui extends SilentScreen {
|
||||
for(Outfits.Outfit outfit : Outfits.getOutfits()) {
|
||||
boolean isHovered = MouseUtils.isInside(mouseX, mouseY, outfitX, outfitY, 80, 80) && !MouseUtils.isInside(mouseX, mouseY, outfitX + 80 - 3 - 10, outfitY + 3, 10, 10);
|
||||
if(isHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
RenderUtil.drawRoundedRect(outfitX, outfitY, 80, 80, 3, new Color(255, 255, 255, 30).getRGB());
|
||||
}
|
||||
RenderUtil.drawRoundedOutline(outfitX, outfitY, 80, 80, 3, 1, Theme.borderColor().getRGB());
|
||||
@ -166,6 +171,7 @@ public class OutfitsGui extends SilentScreen {
|
||||
outfitX += 83;
|
||||
}
|
||||
}
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glPopMatrix();
|
||||
|
@ -1,19 +1,29 @@
|
||||
package net.silentclient.client.gui;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.elements.Button;
|
||||
import net.silentclient.client.gui.elements.Input;
|
||||
import net.silentclient.client.mods.settings.GeneralMod;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class SilentScreen extends GuiScreen {
|
||||
protected boolean defaultCursor = true;
|
||||
protected ArrayList<Input> silentInputs = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
if(defaultCursor) {
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(getCursor(silentInputs, buttonList));
|
||||
}
|
||||
}
|
||||
|
||||
public static MouseCursorHandler.CursorType getCursor(ArrayList<Input> silentInputs, List<GuiButton> buttonList) {
|
||||
MouseCursorHandler.CursorType cursorType = MouseCursorHandler.CursorType.NORMAL;
|
||||
|
||||
for(Input input : silentInputs) {
|
||||
@ -22,7 +32,13 @@ public class SilentScreen extends GuiScreen {
|
||||
}
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
for(GuiButton button : buttonList) {
|
||||
if(button instanceof Button && button.isMouseOver() && !(((Button) button).escMenu && Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Vanilla ESC Menu Layout").getValBoolean())) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
return cursorType;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -19,7 +19,7 @@ public class Button extends GuiButton
|
||||
{
|
||||
|
||||
protected int animatedOpacity = 0;
|
||||
private boolean escMenu = false;
|
||||
public boolean escMenu = false;
|
||||
private int fontSize;
|
||||
|
||||
protected TimerUtils animateTimer = new TimerUtils();
|
||||
|
@ -1,11 +1,11 @@
|
||||
package net.silentclient.client.gui.friends;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||
import net.silentclient.client.gui.elements.Button;
|
||||
import net.silentclient.client.gui.elements.IconButton;
|
||||
@ -20,6 +20,7 @@ import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.mods.settings.GeneralMod;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.types.FriendsResponse;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -27,7 +28,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
|
||||
public class FriendsListOverlay extends GuiScreen {
|
||||
public class FriendsListOverlay extends SilentScreen {
|
||||
private double scrollY;
|
||||
private SimpleAnimation scrollAnimation = new SimpleAnimation(0.0F);
|
||||
private boolean showRequests;
|
||||
@ -36,6 +37,7 @@ public class FriendsListOverlay extends GuiScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.introAnimation = new SimpleAnimation(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Menu Animations").getValBoolean() ? -150 : 0);
|
||||
Client.getInstance().updateFriendsList();
|
||||
this.scrollY = 0;
|
||||
@ -51,6 +53,7 @@ public class FriendsListOverlay extends GuiScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
this.buttonList.get(2).displayString = "Requests (" + Client.getInstance().getFriends().getRequestCount() + ")";
|
||||
SilentFontRenderer font = Client.getInstance().getSilentFontRenderer();
|
||||
GlStateManager.pushMatrix();
|
||||
@ -98,6 +101,9 @@ public class FriendsListOverlay extends GuiScreen {
|
||||
ColorUtils.setColor(new Color(255, 255, 255, 127).getRGB());
|
||||
font.drawString(friend.isOnline() ? friend.getCurrentServer().equals("") ? "Online" : "Playing on " + friend.getCurrentServer() : "Offline", 23, friendY + 8, 10, SilentFontRenderer.FontType.TITLE, 108);
|
||||
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/cross.png"), 135, friendY + 3, 12, 12, false);
|
||||
if(MouseUtils.isInside(mouseX, mouseY, 135, friendY + 3, 12, 12)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
friendY += 25;
|
||||
}
|
||||
} else {
|
||||
@ -116,11 +122,20 @@ public class FriendsListOverlay extends GuiScreen {
|
||||
font.drawString(request.isIncoming() ? "Incoming Friend Request" : "Outgoing Friend Request", 23, friendY + 8, 10, SilentFontRenderer.FontType.TITLE);
|
||||
if(request.isIncoming()) {
|
||||
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/accept.png"), 120, friendY + 3, 12, 12, false);
|
||||
if(MouseUtils.isInside(mouseX, mouseY, 120, friendY + 3, 12, 12)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
if(MouseUtils.isInside(mouseX, mouseY, 135, friendY + 3, 12, 12)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/cross.png"), 135, friendY + 3, 12, 12, false);
|
||||
friendY += 25;
|
||||
}
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -7,6 +7,7 @@ import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.elements.IconButton;
|
||||
import net.silentclient.client.gui.font.SilentFontRenderer.FontType;
|
||||
import net.silentclient.client.mods.CustomFontRenderer;
|
||||
@ -23,6 +24,7 @@ import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class HUDConfigScreen extends GuiScreen {
|
||||
|
||||
@ -76,7 +78,7 @@ public class HUDConfigScreen extends GuiScreen {
|
||||
Client.getInstance().getSilentFontRenderer().drawString(0, 36, "selectedMod: " + (this.mod != null ? this.mod.getClass().getName() : "null"), 6, FontType.TITLE);
|
||||
}
|
||||
|
||||
MouseCursorHandler.CursorType cursorType = MouseCursorHandler.CursorType.NORMAL;
|
||||
MouseCursorHandler.CursorType cursorType = SilentScreen.getCursor(new ArrayList<>(), buttonList);
|
||||
|
||||
for(Mod m : Client.getInstance().getModInstances().getMods()) {
|
||||
if(m.isEnabled() && m instanceof ModDraggable) {
|
||||
|
@ -12,6 +12,7 @@ import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.elements.Button;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.SCTextureManager;
|
||||
import net.silentclient.client.utils.TimerUtils;
|
||||
import net.silentclient.client.utils.types.NewsResponse;
|
||||
@ -59,6 +60,7 @@ public class GuiNews extends SilentScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
loadPanel();
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
GlStateManager.disableAlpha();
|
||||
Client.backgroundPanorama.renderSkybox(mouseX, mouseY, partialTicks);
|
||||
GlStateManager.enableAlpha();
|
||||
@ -71,6 +73,9 @@ public class GuiNews extends SilentScreen {
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
if(imageLocation != null) {
|
||||
RenderUtil.drawImage(imageLocation, (this.width / 2) - (300 / 2), (this.height / 2) - (168 / 2) - 10, 300, 168, false);
|
||||
if(MouseUtils.isInside(mouseX, mouseY, (this.width / 2) - (300 / 2), (this.height / 2) - (168 / 2) - 10, 300, 168)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
@ -85,10 +90,13 @@ public class GuiNews extends SilentScreen {
|
||||
logoTimer.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
defaultCursor = false;
|
||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||
this.buttonList.add(new Button(1, (this.width / 2) - (98 / 2), this.height - 30, 98, 20, "Exit"));
|
||||
super.initGui();
|
||||
|
@ -10,10 +10,7 @@ import net.silentclient.client.gui.silentmainmenu.components.AccountPicker;
|
||||
import net.silentclient.client.gui.theme.button.DefaultButtonTheme;
|
||||
import net.silentclient.client.gui.theme.button.IButtonTheme;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.AccountManager;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.SCTextureManager;
|
||||
import net.silentclient.client.utils.TimerUtils;
|
||||
import net.silentclient.client.utils.*;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
@ -30,7 +27,8 @@ public class LiteAccountPicker extends AccountPicker {
|
||||
super(x, y);
|
||||
}
|
||||
|
||||
public void draw(Minecraft mc, int mouseX, int mouseY) {
|
||||
public MouseCursorHandler.CursorType draw(Minecraft mc, int mouseX, int mouseY) {
|
||||
MouseCursorHandler.CursorType cursorType = null;
|
||||
IButtonTheme theme = new DefaultButtonTheme();
|
||||
ColorUtils.setColor(theme.getBackgroundColor().getRGB());
|
||||
RenderUtil.drawRoundedRect(x, y, 100, 18, 3, theme.getBackgroundColor().getRGB());
|
||||
@ -53,6 +51,7 @@ public class LiteAccountPicker extends AccountPicker {
|
||||
Client.getInstance().getSilentFontRenderer().drawString(Client.getInstance().getAccount().original_username, x + 18, y + 9 - 6, 12, SilentFontRenderer.FontType.TITLE, 70);
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x, y, 100, 18)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
if (this.animatedOpacity < 75 && animateTimer.delay(30)) {
|
||||
this.animatedOpacity += 15;
|
||||
animateTimer.reset();
|
||||
@ -80,6 +79,7 @@ public class LiteAccountPicker extends AccountPicker {
|
||||
}
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x, accountY, 100, 18)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
RenderUtil.drawRoundedRect(x, accountY, 100, 18, 3, theme.getHoveredBackgroundColor(75).getRGB());
|
||||
}
|
||||
|
||||
@ -88,6 +88,8 @@ public class LiteAccountPicker extends AccountPicker {
|
||||
accountY += 18;
|
||||
}
|
||||
}
|
||||
|
||||
return cursorType;
|
||||
}
|
||||
|
||||
public void onClick(Minecraft mc, int mouseX, int mouseY) {
|
||||
|
@ -5,6 +5,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.animation.SimpleAnimation;
|
||||
import net.silentclient.client.gui.elements.Button;
|
||||
import net.silentclient.client.gui.elements.IconButton;
|
||||
@ -14,12 +15,13 @@ import net.silentclient.client.gui.silentmainmenu.MainMenuConcept;
|
||||
import net.silentclient.client.gui.silentmainmenu.components.AccountPicker;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
public class LiteMainMenu extends GuiScreen
|
||||
public class LiteMainMenu extends SilentScreen
|
||||
{
|
||||
private SimpleAnimation bannerAnimation;
|
||||
private AccountPicker accountPicker;
|
||||
@ -27,6 +29,7 @@ public class LiteMainMenu extends GuiScreen
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.accountPicker = new LiteAccountPicker(this.width - 100 - 4, 5);
|
||||
this.bannerAnimation = new SimpleAnimation(0);
|
||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||
@ -54,6 +57,7 @@ public class LiteMainMenu extends GuiScreen
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
GuiNews.loadPanel();
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
GlStateManager.disableAlpha();
|
||||
Client.backgroundPanorama.renderSkybox(mouseX, mouseY, partialTicks);
|
||||
GlStateManager.enableAlpha();
|
||||
@ -72,6 +76,7 @@ public class LiteMainMenu extends GuiScreen
|
||||
|
||||
if(GuiNews.imageLocation != null) {
|
||||
if(MouseUtils.isInside(mouseX, mouseY, this.width - 74, this.height - 42, 71, 40)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
this.bannerAnimation.setAnimation(4, 20);
|
||||
} else {
|
||||
this.bannerAnimation.setAnimation(0, 30);
|
||||
@ -79,7 +84,13 @@ public class LiteMainMenu extends GuiScreen
|
||||
RenderUtil.drawImage(GuiNews.imageLocation, this.width - 74 + (-this.bannerAnimation.getValue()), this.height - 42 + (-this.bannerAnimation.getValue()), 71, 40, false);
|
||||
}
|
||||
|
||||
accountPicker.draw(mc, mouseX, mouseY);
|
||||
MouseCursorHandler.CursorType accountCursor = accountPicker.draw(mc, mouseX, mouseY);
|
||||
|
||||
if(accountCursor != null) {
|
||||
cursorType = accountCursor;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import net.silentclient.client.mods.settings.GeneralMod;
|
||||
import net.silentclient.client.premium.PremiumGui;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@ -66,6 +67,7 @@ public class ClickGUI extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
close = false;
|
||||
defaultCursor = false;
|
||||
Client.getInstance().configManager.updateConfigs();
|
||||
ClickGUI.scrollY = 0;
|
||||
MenuBlurUtils.loadBlur();
|
||||
@ -107,6 +109,7 @@ public class ClickGUI extends SilentScreen {
|
||||
|
||||
int modOffsetY = 25;
|
||||
//Draw background
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
GlStateManager.pushMatrix();
|
||||
GlUtils.startScale(((x) + (x) + width) / 2, ((y) + (y + height)) / 2, (float) introAnimation.getValue());
|
||||
RenderUtil.drawRoundedRect(x, y, width, height, 10, Theme.backgroundColor().getRGB());
|
||||
@ -140,6 +143,10 @@ public class ClickGUI extends SilentScreen {
|
||||
Switch.render(mouseX, mouseY, switchX, switchY, m.switchAniamation, m.isEnabled(), m.isForceDisabled());
|
||||
}
|
||||
|
||||
if(switchHovered || isHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
if(m.isUpdated() || m.isNew()) {
|
||||
String status = "UPDATED";
|
||||
if(m.isNew()) {
|
||||
@ -162,13 +169,19 @@ public class ClickGUI extends SilentScreen {
|
||||
|
||||
Client.getInstance().getSilentFontRenderer().drawString("New Config", x + 110 + (column == 1 ? 0 : 140), y + modOffsetY + 7 - (int) scrollAnimation.getValue(), 14, SilentFontRenderer.FontType.TITLE);
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + 100 + (column == 1 ? 0 : 140), y + modOffsetY - scrollAnimation.getValue(), 135, 28)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
modOffsetY+=column == 1 ? 0 : 35;
|
||||
this.scrollHeight += column == 2 ? 28 : 0;
|
||||
column = column == 1 ? 2 : 1;
|
||||
RenderUtil.drawRoundedOutline(x + 100 + (column == 1 ? 0 : 140), y + modOffsetY - scrollAnimation.getValue(), 135, 28, 10, 2, -1);
|
||||
|
||||
Client.getInstance().getSilentFontRenderer().drawString("Open Folder", x + 110 + (column == 1 ? 0 : 140), y + modOffsetY + 7 - (int) scrollAnimation.getValue(), 14, SilentFontRenderer.FontType.TITLE);
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + 100 + (column == 1 ? 0 : 140), y + modOffsetY - scrollAnimation.getValue(), 135, 28)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
modOffsetY+=column == 1 ? 0 : 35;
|
||||
this.scrollHeight += column == 2 ? 28 : 0;
|
||||
column = column == 1 ? 2 : 1;
|
||||
@ -188,7 +201,9 @@ public class ClickGUI extends SilentScreen {
|
||||
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/trash-icon.png"), x + 90 + (column == 1 ? 0 : 130) + (column == 1 ? 125 : 135), y + modOffsetY + 7 - scrollAnimation.getValue(), 15, 15, false);
|
||||
ColorUtils.setColor(new Color(255, 255, 255).getRGB());
|
||||
Client.getInstance().getSilentFontRenderer().drawString(config.replace(".txt", ""), x + 110 + (column == 1 ? 0 : 140), y + modOffsetY + 7 - (int) scrollAnimation.getValue(), 14, SilentFontRenderer.FontType.TITLE, 45);
|
||||
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + 100 + (column == 1 ? 0 : 140), y + modOffsetY - scrollAnimation.getValue(), 135, 28)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
modOffsetY+=column == 1 ? 0 : 35;
|
||||
this.scrollHeight += column == 2 ? 28 : 0;
|
||||
column = column == 1 ? 2 : 1;
|
||||
@ -222,6 +237,7 @@ public class ClickGUI extends SilentScreen {
|
||||
if(introAnimation.isDone() && !close) {
|
||||
loaded = true;
|
||||
}
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
GlUtils.stopScale();
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.animation.normal.Direction;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||
@ -20,6 +21,7 @@ import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.mods.Mod;
|
||||
import net.silentclient.client.mods.Setting;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -28,7 +30,7 @@ import java.awt.*;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class GuiColorPicker extends GuiScreen {
|
||||
public class GuiColorPicker extends SilentScreen {
|
||||
private final Mod mod;
|
||||
private final GuiScreen parentScreen;
|
||||
|
||||
@ -46,6 +48,7 @@ public class GuiColorPicker extends GuiScreen {
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
defaultCursor = false;
|
||||
this.initTime = System.currentTimeMillis();
|
||||
colors.clear();
|
||||
colors.add(new Color(255, 255, 255));
|
||||
@ -86,6 +89,8 @@ public class GuiColorPicker extends GuiScreen {
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
|
||||
int addX = 190;
|
||||
int addY = 110;
|
||||
|
||||
@ -110,7 +115,10 @@ public class GuiColorPicker extends GuiScreen {
|
||||
for(Color color : colors) {
|
||||
RenderUtils.drawRect(x + spacing, settingY - 1, 22, 22, new Color(0, 0, 0).getRGB());
|
||||
RenderUtils.drawRect(x + spacing + 1, settingY - 1 + 1, 20, 20, new Color(color.getRed(), color.getGreen(), color.getBlue(), setting.getOpacity()).getRGB());
|
||||
spacing += 25;
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + spacing, settingY - 1, 22, 22)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
spacing += 25;
|
||||
colorIndex += 1;
|
||||
if(colorIndex == 5 || colorIndex == 10) {
|
||||
spacing = 100;
|
||||
@ -134,7 +142,11 @@ public class GuiColorPicker extends GuiScreen {
|
||||
settingY += settingHeight;
|
||||
|
||||
Checkbox.render(mouseX, mouseY, x + 100, settingY - 1, "Chroma", setting.isChroma());
|
||||
if(Checkbox.isHovered(mouseX, mouseY, x + 100, settingY - 1)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
@ -26,6 +26,7 @@ import net.silentclient.client.mods.render.CrosshairMod;
|
||||
import net.silentclient.client.mods.world.TimeChangerMod;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -53,6 +54,7 @@ public class ModSettings extends SilentScreen {
|
||||
this.initTime = System.currentTimeMillis();
|
||||
scrollAnimation.setValue(0);
|
||||
MenuBlurUtils.loadBlur();
|
||||
defaultCursor = false;
|
||||
int addX = 190;
|
||||
int addY = 110;
|
||||
int x = (width / 2) - addX;
|
||||
@ -108,6 +110,7 @@ public class ModSettings extends SilentScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
int addX = 190;
|
||||
int addY = 110;
|
||||
|
||||
@ -140,7 +143,13 @@ public class ModSettings extends SilentScreen {
|
||||
|
||||
if(mod.getCategory() == ModCategory.MODS) {
|
||||
RenderUtil.drawImage(new ResourceLocation("silentclient/icons/reset_settings.png"), x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10);
|
||||
Switch.render(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue(), mod.switchAniamation, mod.isEnabled(), mod.isForceDisabled());
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + width - (10 + 8) - 15, y + 5 + scrollAnimation.getValue(), 10, 10)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
Switch.render(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue(), mod.switchAniamation, mod.isEnabled(), mod.isForceDisabled());
|
||||
if(Switch.isHovered(mouseX, mouseY, x + width - (10 + 8), y + 6 + scrollAnimation.getValue())) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
Client.getInstance().getSilentFontRenderer().drawString(mod.getName(), x + 100, (int) (y + 5) + scrollAnimation.getValue(), 14, SilentFontRenderer.FontType.TITLE);
|
||||
@ -179,14 +188,23 @@ public class ModSettings extends SilentScreen {
|
||||
|
||||
if(setting.isCombo()) {
|
||||
Select.render(mouseX, mouseY, x, settingY, width, setting.getName(), setting.getValString());
|
||||
if(Select.nextHovered(mouseX, mouseY, x, settingY, width) || Select.prevHovered(mouseX, mouseY, x, settingY, width)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
if (setting.isColor()) {
|
||||
ColorPicker.render(x, settingY - 1, width, setting.getName(), setting.getValColor().getRGB());
|
||||
if(ColorPicker.isHovered(mouseX, mouseY, x, settingY - 1, width)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
if (setting.isCheck()) {
|
||||
Checkbox.render(mouseX, mouseY, x + 100, settingY - 1, setting.getName(), setting.getValBoolean());
|
||||
if(Checkbox.isHovered(mouseX, mouseY, x + 100, settingY - 1)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
if (setting.isSlider()) {
|
||||
Slider.render(x, settingY - 1, width, setting.getName(), setting.getMax(), setting.getValDouble());
|
||||
@ -206,7 +224,7 @@ public class ModSettings extends SilentScreen {
|
||||
|
||||
settingY += settingHeight;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
@ -13,6 +13,7 @@ import net.silentclient.client.cosmetics.Cosmetics;
|
||||
import net.silentclient.client.cosmetics.gui.CosmeticsGui;
|
||||
import net.silentclient.client.event.impl.ServerLeaveEvent;
|
||||
import net.silentclient.client.gui.GuiMultiplayerInGame;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.elements.Button;
|
||||
import net.silentclient.client.gui.elements.IconButton;
|
||||
import net.silentclient.client.gui.friends.FriendsListOverlay;
|
||||
@ -24,7 +25,7 @@ import net.silentclient.client.utils.MenuBlurUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class GuiIngameMenu extends GuiScreen
|
||||
public class GuiIngameMenu extends SilentScreen
|
||||
{
|
||||
/**
|
||||
* Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
|
||||
|
@ -15,6 +15,7 @@ import net.silentclient.client.mods.Mod;
|
||||
import net.silentclient.client.mods.ModCategory;
|
||||
import net.silentclient.client.mods.Setting;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
@ -38,6 +39,7 @@ public class ColorPicker extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.initTime = System.currentTimeMillis();
|
||||
this.buttonList.clear();
|
||||
this.silentInputs.clear();
|
||||
@ -72,6 +74,7 @@ public class ColorPicker extends SilentScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
Setting setting = Client.getInstance().getSettingsManager().getSettingByName(mod, this.value);
|
||||
|
||||
ModMenu.drawOverlayListBase(height, "Choose a color");
|
||||
@ -85,6 +88,9 @@ public class ColorPicker extends SilentScreen {
|
||||
for(Color color : colors) {
|
||||
RenderUtil.drawRoundedRect(colorX, colorY, 20, 20, 3, new Color(color.getRed(), color.getGreen(), color.getBlue(), setting.getOpacity()).getRGB());
|
||||
RenderUtil.drawRoundedOutline(colorX, colorY, 20, 20, 3, 2, new Color(0, 0, 0).getRGB());
|
||||
if(MouseUtils.isInside(mouseX, mouseY, colorX, colorY, 20, 20)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
colorX += 25;
|
||||
colorIndex += 1;
|
||||
if(colorIndex == 6) {
|
||||
@ -111,6 +117,11 @@ public class ColorPicker extends SilentScreen {
|
||||
colorY += settingHeight;
|
||||
|
||||
Checkbox.render(mouseX, mouseY, 3, colorY, "Chroma", setting.isChroma());
|
||||
if(Checkbox.isHovered(mouseX, mouseY, 3, colorY)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
ModMenu.trimContentEnd();
|
||||
}
|
||||
|
@ -29,6 +29,7 @@ import net.silentclient.client.mods.ModCategory;
|
||||
import net.silentclient.client.mods.settings.GeneralMod;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.Sys;
|
||||
import org.lwjgl.input.Mouse;
|
||||
@ -62,6 +63,7 @@ public class ModMenu extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
if(!loaded) {
|
||||
introAnimation = new SimpleAnimation(Client.getInstance().getSettingsManager().getSettingByClass(GeneralMod.class, "Menu Animations").getValBoolean() ? -150 : 0);
|
||||
}
|
||||
@ -137,6 +139,8 @@ public class ModMenu extends SilentScreen {
|
||||
this.buttonList.get(7).visible = false;
|
||||
}
|
||||
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
|
||||
trimContentStart(width, height);
|
||||
if(modCategory != ModCategory.CONFIGS && modCategory != ModCategory.PLUS) {
|
||||
float modY = 66 - scrollAnimation.getValue();
|
||||
@ -145,6 +149,7 @@ public class ModMenu extends SilentScreen {
|
||||
if(mouseInContent(0, (int) modY, height) || mouseInContent(0, (int) (modY + 20), height)) {
|
||||
boolean isHovered = mouseInContent(mouseX, mouseY, height) && MouseUtils.isInside(mouseX, mouseY, 3, modY, 144, 20) && !(modCategory == ModCategory.MODS && Switch.isHovered(mouseX, mouseY, 129, modY + 10 - 4)) && (Client.getInstance().getSettingsManager().getSettingByMod(mod).size() != 0 || mod.getName() == "Auto Text");
|
||||
if(isHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
RenderUtil.drawRoundedRect(3, modY, 144, 20, 3, new Color(255, 255, 255, 30).getRGB());
|
||||
}
|
||||
RenderUtil.drawRoundedOutline(3, modY, 144, 20, 3, 1, Theme.borderColor().getRGB());
|
||||
@ -158,6 +163,9 @@ public class ModMenu extends SilentScreen {
|
||||
|
||||
if(modCategory == ModCategory.MODS) {
|
||||
Switch.render(mouseX, mouseY, 129, modY + 10 - 4, mod.switchAniamation, mod.isEnabled(), mod.isForceDisabled());
|
||||
if(Switch.isHovered(mouseX, mouseY, 129, modY + 10 - 4)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,6 +184,7 @@ public class ModMenu extends SilentScreen {
|
||||
|
||||
boolean isHovered = mouseInContent(mouseX, mouseY, height) && MouseUtils.isInside(mouseX, mouseY, 3, configY, 144, 20);
|
||||
if(isHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
RenderUtil.drawRoundedRect(3, configY, 144, 20, 3, new Color(255, 255, 255, 30).getRGB());
|
||||
}
|
||||
RenderUtil.drawRoundedOutline(3, configY, 144, 20, 3, 1, Theme.borderColor().getRGB());
|
||||
@ -197,9 +206,15 @@ public class ModMenu extends SilentScreen {
|
||||
Client.getInstance().getSilentFontRenderer().drawString(days != -1 ? days + " days left" : "Unknown Time Remaining", 3, (int) premiumY, 12, SilentFontRenderer.FontType.TITLE);
|
||||
premiumY += 15;
|
||||
RegularColorPicker.render(3, (int) premiumY, 144, "Chroma Bandana Color", Client.getInstance().getAccount().getBandanaColor() == 50 ? ColorUtils.getChromaColor(0, 0, 1).getRGB() : Client.getInstance().getAccount().getBandanaColor());
|
||||
if(RegularColorPicker.isHovered(mouseX, mouseY, 3, (int) premiumY, 144)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
premiumY += 15;
|
||||
Client.getInstance().getSilentFontRenderer().drawString("Custom Capes", 3, premiumY, 12, SilentFontRenderer.FontType.TITLE);
|
||||
StaticButton.render(150 - 3 - 65, (int) premiumY, 65, 12, Client.getInstance().getAccount().isPremiumPlus() ? "OPEN MENU" : "BUY PREMIUM+");
|
||||
if(StaticButton.isHovered(mouseX, mouseY, 150 - 3 - 65, premiumY, 65, 12)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
premiumY += 15;
|
||||
ColorUtils.setColor(new Color(255, 255, 255, 127).getRGB());
|
||||
Client.getInstance().getSilentFontRenderer().drawString("Nametag Message Settings:", 3, premiumY, 12, SilentFontRenderer.FontType.TITLE);
|
||||
@ -207,18 +222,27 @@ public class ModMenu extends SilentScreen {
|
||||
ColorUtils.setColor(new Color(255, 255, 255, 255).getRGB());
|
||||
if(Client.getInstance().getAccount().isPremiumPlus()) {
|
||||
Checkbox.render(mouseX, mouseY, 3, (int) premiumY, "Show Nametag Message", Client.getInstance().getAccount().showNametagMessage());
|
||||
if(Checkbox.isHovered(mouseX, mouseY, 3, premiumY)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
premiumY += 15;
|
||||
Client.getInstance().getSilentFontRenderer().drawString("Nametag Message:", 3, premiumY + 1, 12, SilentFontRenderer.FontType.TITLE);
|
||||
premiumY += 15;
|
||||
this.silentInputs.get(1).render(mouseX, mouseY, 3, (int) premiumY, 144, true);
|
||||
premiumY += 20;
|
||||
StaticButton.render(150 - 3 - 50, (int) premiumY, 50, 12, "Save");
|
||||
if(StaticButton.isHovered(mouseX, mouseY, 150 - 3 - 50, premiumY, 50, 12)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
} else {
|
||||
Client.getInstance().getSilentFontRenderer().drawString("You're currently not Premium+", 3, (int) premiumY, 12, SilentFontRenderer.FontType.TITLE);
|
||||
}
|
||||
}
|
||||
this.scrollHeight = 66 + premiumY + scrollAnimation.getValue();
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
trimContentEnd();
|
||||
|
||||
scrollAnimation.setAnimation(scrollY, 12);
|
||||
|
@ -22,6 +22,7 @@ import net.silentclient.client.mods.Setting;
|
||||
import net.silentclient.client.mods.render.CrosshairMod;
|
||||
import net.silentclient.client.mods.world.TimeChangerMod;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
@ -47,6 +48,7 @@ public class ModSettings extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.buttonList.clear();
|
||||
this.silentInputs.clear();
|
||||
this.initTime = System.currentTimeMillis();
|
||||
@ -80,6 +82,8 @@ public class ModSettings extends SilentScreen {
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
|
||||
ModMenu.trimContentStart(width, height);
|
||||
float settingY = 66 - scrollAnimation.getValue();
|
||||
int inputIndex = 0;
|
||||
@ -119,9 +123,15 @@ public class ModSettings extends SilentScreen {
|
||||
}
|
||||
if (setting.isColor()) {
|
||||
RegularColorPicker.render(3, settingY, 144, setting.getName(), setting.getValColor().getRGB());
|
||||
if(RegularColorPicker.isHovered(mouseX, mouseY, 3, (int) settingY, 144)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
if (setting.isCheck()) {
|
||||
Checkbox.render(mouseX, mouseY, 3, settingY, setting.getName(), setting.getValBoolean());
|
||||
if(Checkbox.isHovered(mouseX, mouseY, 3, settingY)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
}
|
||||
|
||||
if(setting.isSlider()) {
|
||||
@ -142,12 +152,17 @@ public class ModSettings extends SilentScreen {
|
||||
|
||||
if(setting.isCombo()) {
|
||||
RegularSelect.render(mouseX, mouseY, 3, settingY, 144, setting.getName(), setting.getValString());
|
||||
if(RegularSelect.nextHovered(mouseX, mouseY, 3, settingY, 144) || RegularSelect.prevHovered(mouseX, mouseY, 3, settingY)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
settingY += 15;
|
||||
}
|
||||
|
||||
settingY += settingHeight;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
this.scrollHeight = 66 + settingY + scrollAnimation.getValue();
|
||||
|
||||
ModMenu.trimContentEnd();
|
||||
|
@ -9,6 +9,7 @@ import net.silentclient.client.gui.elements.Checkbox;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.IOException;
|
||||
@ -26,6 +27,7 @@ public class PremiumColorPicker extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.initTime = System.currentTimeMillis();
|
||||
this.buttonList.clear();
|
||||
this.silentInputs.clear();
|
||||
@ -57,6 +59,8 @@ public class PremiumColorPicker extends SilentScreen {
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
|
||||
ModMenu.drawOverlayListBase(height, "Choose a color");
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
@ -68,6 +72,9 @@ public class PremiumColorPicker extends SilentScreen {
|
||||
for(Color color : colors) {
|
||||
RenderUtil.drawRoundedRect(colorX, colorY, 20, 20, 3, new Color(color.getRed(), color.getGreen(), color.getBlue()).getRGB());
|
||||
RenderUtil.drawRoundedOutline(colorX, colorY, 20, 20, 3, 2, new Color(0, 0, 0).getRGB());
|
||||
if(MouseUtils.isInside(mouseX, mouseY, colorX, colorY, 20, 20)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
colorX += 25;
|
||||
colorIndex += 1;
|
||||
if(colorIndex == 6) {
|
||||
@ -83,6 +90,12 @@ public class PremiumColorPicker extends SilentScreen {
|
||||
|
||||
Checkbox.render(mouseX, mouseY, 3, colorY, "Chroma", Client.getInstance().getAccount().getBandanaColor() == 50);
|
||||
|
||||
if(Checkbox.isHovered(mouseX, mouseY, 3, colorY)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
ModMenu.trimContentEnd();
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,7 @@ import net.silentclient.client.gui.silentmainmenu.components.AccountPicker;
|
||||
import net.silentclient.client.gui.silentmainmenu.components.MenuOption;
|
||||
import net.silentclient.client.gui.theme.button.IButtonTheme;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.SCTextureManager;
|
||||
|
||||
import java.awt.*;
|
||||
@ -39,6 +40,7 @@ public class MainMenuConcept extends SilentScreen {
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
defaultCursor = false;
|
||||
this.buttonList.clear();
|
||||
Client.backgroundPanorama.updateWidthHeight(this.width, this.height);
|
||||
|
||||
@ -78,6 +80,7 @@ public class MainMenuConcept extends SilentScreen {
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
GuiNews.loadPanel();
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
this.loadSkin();
|
||||
GlStateManager.disableAlpha();
|
||||
Client.backgroundPanorama.renderSkybox(mouseX, mouseY, partialTicks);
|
||||
@ -91,6 +94,9 @@ public class MainMenuConcept extends SilentScreen {
|
||||
}
|
||||
|
||||
if(GuiNews.imageLocation != null) {
|
||||
if(MouseUtils.isInside(mouseX, mouseY, 10, 10, 109, 63)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
RenderUtils.drawRect(10, 10, 109, 63, -1);
|
||||
RenderUtil.drawImage(GuiNews.imageLocation, 12, 12, 105, 59, false);
|
||||
}
|
||||
@ -99,7 +105,13 @@ public class MainMenuConcept extends SilentScreen {
|
||||
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
this.accountPicker.draw(mc, mouseX, mouseY);
|
||||
MouseCursorHandler.CursorType accountCursor = this.accountPicker.draw(mc, mouseX, mouseY);
|
||||
|
||||
if(accountCursor != null) {
|
||||
cursorType = accountCursor;
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6,6 +6,7 @@ import net.silentclient.client.gui.font.SilentFontRenderer;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.MouseUtils;
|
||||
import net.silentclient.client.utils.AccountManager;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
@ -20,10 +21,14 @@ public class AccountPicker {
|
||||
this.open = false;
|
||||
}
|
||||
|
||||
public void draw(Minecraft mc, int mouseX, int mouseY) {
|
||||
public MouseCursorHandler.CursorType draw(Minecraft mc, int mouseX, int mouseY) {
|
||||
MouseCursorHandler.CursorType cursorType = null;
|
||||
boolean hovered = MouseUtils.isInside(mouseX, mouseY, x - (Client.getInstance().getSilentFontRenderer().getStringWidth(Client.getInstance().getAccount().original_username, 14, SilentFontRenderer.FontType.TITLE) / 2), y, Client.getInstance().getSilentFontRenderer().getStringWidth(Client.getInstance().getAccount().original_username, 14, SilentFontRenderer.FontType.TITLE), 14);
|
||||
ColorUtils.setColor(hovered ? new Color(255, 255, 255, 127).getRGB() : -1);
|
||||
Client.getInstance().getSilentFontRenderer().drawCenteredString(Client.getInstance().getAccount().original_username, x, y, 14, SilentFontRenderer.FontType.TITLE);
|
||||
if(hovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
if(this.open) {
|
||||
int accountY = y + 15;
|
||||
for(AccountManager.AccountType account : Client.getInstance().getAccountManager().getAccounts()) {
|
||||
@ -31,11 +36,16 @@ public class AccountPicker {
|
||||
continue;
|
||||
}
|
||||
boolean accountHovered = MouseUtils.isInside(mouseX, mouseY, x - (Client.getInstance().getSilentFontRenderer().getStringWidth(Client.getInstance().getAccount().original_username, 14, SilentFontRenderer.FontType.TITLE) / 2), accountY, Client.getInstance().getSilentFontRenderer().getStringWidth(Client.getInstance().getAccount().original_username, 14, SilentFontRenderer.FontType.TITLE), 14);
|
||||
if(accountHovered) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
ColorUtils.setColor(accountHovered ? new Color(255, 255, 255, 127).getRGB() : -1);
|
||||
Client.getInstance().getSilentFontRenderer().drawCenteredString(account.username, x, accountY, 14, SilentFontRenderer.FontType.TITLE);
|
||||
accountY += 15;
|
||||
}
|
||||
}
|
||||
|
||||
return cursorType;
|
||||
}
|
||||
|
||||
public void onClick(Minecraft mc, int mouseX, int mouseY) {
|
||||
|
@ -6,6 +6,7 @@ import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.gui.SilentScreen;
|
||||
import net.silentclient.client.gui.animation.normal.Direction;
|
||||
import net.silentclient.client.gui.lite.clickgui.ClickGUI;
|
||||
import net.silentclient.client.gui.lite.clickgui.utils.GlUtils;
|
||||
@ -20,6 +21,7 @@ import net.silentclient.client.gui.theme.Theme;
|
||||
import net.silentclient.client.gui.util.RenderUtil;
|
||||
import net.silentclient.client.utils.ColorUtils;
|
||||
import net.silentclient.client.utils.MenuBlurUtils;
|
||||
import net.silentclient.client.utils.MouseCursorHandler;
|
||||
import net.silentclient.client.utils.Sounds;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@ -106,7 +108,7 @@ public class PremiumGui {
|
||||
}
|
||||
}
|
||||
|
||||
public static class PremiumColorPicker extends GuiScreen {
|
||||
public static class PremiumColorPicker extends SilentScreen {
|
||||
private final GuiScreen parentScreen;
|
||||
|
||||
private ArrayList<Color> colors = new ArrayList<Color>();
|
||||
@ -118,6 +120,7 @@ public class PremiumGui {
|
||||
@Override
|
||||
public void initGui() {
|
||||
colors.clear();
|
||||
defaultCursor = false;
|
||||
colors.add(new Color(255, 255, 255));
|
||||
colors.add(new Color(156, 157, 151));
|
||||
colors.add(new Color(71,79,82));
|
||||
@ -151,6 +154,7 @@ public class PremiumGui {
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||
MouseCursorHandler.CursorType cursorType = getCursor(silentInputs, buttonList);
|
||||
MenuBlurUtils.renderBackground(this);
|
||||
|
||||
int addX = 190;
|
||||
@ -175,7 +179,10 @@ public class PremiumGui {
|
||||
for(Color color : colors) {
|
||||
RenderUtils.drawRect(x + spacing, settingY - 1, 22, 22, new Color(0, 0, 0).getRGB());
|
||||
RenderUtils.drawRect(x + spacing + 1, settingY - 1 + 1, 20, 20, new Color(color.getRed(), color.getGreen(), color.getBlue()).getRGB());
|
||||
spacing += 25;
|
||||
if(MouseUtils.isInside(mouseX, mouseY, x + spacing, settingY - 1, 22, 22)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
spacing += 25;
|
||||
colorIndex += 1;
|
||||
if(colorIndex == 5 || colorIndex == 10) {
|
||||
spacing = 100;
|
||||
@ -188,7 +195,9 @@ public class PremiumGui {
|
||||
settingY += settingHeight;
|
||||
|
||||
Checkbox.render(mouseX, mouseY, x + 100, settingY - 1, "Chroma", Client.getInstance().getAccount().getBandanaColor() == 50);
|
||||
|
||||
if(Checkbox.isHovered(mouseX, mouseY, x + 100, settingY - 1)) {
|
||||
cursorType = MouseCursorHandler.CursorType.POINTER;
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@ -203,6 +212,8 @@ public class PremiumGui {
|
||||
mc.displayGuiScreen(null);
|
||||
}
|
||||
}
|
||||
|
||||
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
|
||||
|
||||
GlUtils.stopScale();
|
||||
GlStateManager.popMatrix();
|
||||
|
@ -38,7 +38,7 @@ public class MouseCursorHandler {
|
||||
|
||||
public void loadCursorType(final CursorType cursorType) {
|
||||
try {
|
||||
this.cursors.put(cursorType, this.loadCursor(ImageIO.read(this.getClass().getResourceAsStream("/assets/minecraft/silentclient/mouse/" + cursorType.name().toLowerCase(Locale.US) + ".png"))));
|
||||
this.cursors.put(cursorType, this.loadCursor(ImageIO.read(this.getClass().getResourceAsStream(String.format("/assets/minecraft/silentclient/mouse/%s/%s.png", OSUtil.isMac() ? "mac" : "win", cursorType.name().toLowerCase(Locale.US))))));
|
||||
}
|
||||
catch (final Exception ex) {
|
||||
LogManager.getLogger().catching((Throwable)ex);
|
||||
|
Before Width: | Height: | Size: 499 B After Width: | Height: | Size: 499 B |
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 239 B After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 209 B |
After Width: | Height: | Size: 370 B |
After Width: | Height: | Size: 296 B |
After Width: | Height: | Size: 311 B |
After Width: | Height: | Size: 657 B |