Added minimization of sidebar, cleaned and improved code, bug fixes, ui changes

This commit is contained in:
AFS0021822 2023-07-02 23:50:59 +02:00
parent d00d523e63
commit 0ca1a271d8
126 changed files with 1106 additions and 1008 deletions

View File

@ -1,10 +1,6 @@
package net.minecraft.client; package net.minecraft.client;
import com.google.common.collect.Iterables; import com.google.common.collect.*;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListenableFutureTask; import com.google.common.util.concurrent.ListenableFutureTask;
@ -13,45 +9,12 @@ import com.mojang.authlib.minecraft.MinecraftSessionService;
import com.mojang.authlib.properties.Property; import com.mojang.authlib.properties.Property;
import com.mojang.authlib.properties.PropertyMap; import com.mojang.authlib.properties.PropertyMap;
import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.Proxy;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.Collections;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
import javax.imageio.ImageIO;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.audio.MusicTicker; import net.minecraft.client.audio.MusicTicker;
import net.minecraft.client.audio.SoundHandler; import net.minecraft.client.audio.SoundHandler;
import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.entity.EntityPlayerSP;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.*;
import net.minecraft.client.gui.GuiChat;
import net.minecraft.client.gui.GuiControls;
import net.minecraft.client.gui.GuiGameOver;
import net.minecraft.client.gui.GuiIngame;
import net.minecraft.client.gui.GuiIngameMenu;
import net.minecraft.client.gui.GuiMemoryErrorScreen;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.gui.GuiSleepMP;
import net.minecraft.client.gui.GuiYesNo;
import net.minecraft.client.gui.GuiYesNoCallback;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.gui.achievement.GuiAchievement; import net.minecraft.client.gui.achievement.GuiAchievement;
import net.minecraft.client.gui.inventory.GuiInventory; import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.main.GameConfiguration; import net.minecraft.client.main.GameConfiguration;
@ -62,14 +25,7 @@ import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerLoginClient; import net.minecraft.client.network.NetHandlerLoginClient;
import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.particle.EffectRenderer;
import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderGlobal;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.WorldRenderer;
import net.minecraft.client.renderer.chunk.RenderChunk; import net.minecraft.client.renderer.chunk.RenderChunk;
import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager; import net.minecraft.client.renderer.entity.RenderManager;
@ -77,29 +33,8 @@ import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
import net.minecraft.client.resources.DefaultResourcePack; import net.minecraft.client.resources.*;
import net.minecraft.client.resources.FoliageColorReloadListener; import net.minecraft.client.resources.data.*;
import net.minecraft.client.resources.GrassColorReloadListener;
import net.minecraft.client.resources.I18n;
import net.minecraft.client.resources.IReloadableResourceManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.IResourcePack;
import net.minecraft.client.resources.LanguageManager;
import net.minecraft.client.resources.ResourceIndex;
import net.minecraft.client.resources.ResourcePackRepository;
import net.minecraft.client.resources.SimpleReloadableResourceManager;
import net.minecraft.client.resources.SkinManager;
import net.minecraft.client.resources.data.AnimationMetadataSection;
import net.minecraft.client.resources.data.AnimationMetadataSectionSerializer;
import net.minecraft.client.resources.data.FontMetadataSection;
import net.minecraft.client.resources.data.FontMetadataSectionSerializer;
import net.minecraft.client.resources.data.IMetadataSerializer;
import net.minecraft.client.resources.data.LanguageMetadataSection;
import net.minecraft.client.resources.data.LanguageMetadataSectionSerializer;
import net.minecraft.client.resources.data.PackMetadataSection;
import net.minecraft.client.resources.data.PackMetadataSectionSerializer;
import net.minecraft.client.resources.data.TextureMetadataSection;
import net.minecraft.client.resources.data.TextureMetadataSectionSerializer;
import net.minecraft.client.resources.model.ModelManager; import net.minecraft.client.resources.model.ModelManager;
import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
@ -113,11 +48,7 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLeashKnot; import net.minecraft.entity.EntityLeashKnot;
import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityList;
import net.minecraft.entity.boss.BossStatus; import net.minecraft.entity.boss.BossStatus;
import net.minecraft.entity.item.EntityArmorStand; import net.minecraft.entity.item.*;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.entity.item.EntityItemFrame;
import net.minecraft.entity.item.EntityMinecart;
import net.minecraft.entity.item.EntityPainting;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Bootstrap; import net.minecraft.init.Bootstrap;
@ -142,21 +73,9 @@ import net.minecraft.stats.AchievementList;
import net.minecraft.stats.IStatStringFormat; import net.minecraft.stats.IStatStringFormat;
import net.minecraft.stats.StatFileWriter; import net.minecraft.stats.StatFileWriter;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.BlockPos;
import net.minecraft.util.ChatComponentText;
import net.minecraft.util.FrameTimer;
import net.minecraft.util.IThreadListener;
import net.minecraft.util.MathHelper;
import net.minecraft.util.MinecraftError;
import net.minecraft.util.MouseHelper;
import net.minecraft.util.MovementInputFromOptions;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.ReportedException;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.ScreenShotHelper;
import net.minecraft.util.Session;
import net.minecraft.util.Timer; import net.minecraft.util.Timer;
import net.minecraft.util.Util; import net.minecraft.util.Util;
import net.minecraft.util.*;
import net.minecraft.world.EnumDifficulty; import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.WorldProviderEnd; import net.minecraft.world.WorldProviderEnd;
import net.minecraft.world.WorldProviderHell; import net.minecraft.world.WorldProviderHell;
@ -173,29 +92,38 @@ import org.lwjgl.LWJGLException;
import org.lwjgl.Sys; import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.ContextCapabilities; import org.lwjgl.opengl.*;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL20;
import org.lwjgl.opengl.GLContext;
import org.lwjgl.opengl.OpenGLException;
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU; import org.lwjgl.util.glu.GLU;
import rip.athena.api.event.Event;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.Event; import rip.athena.client.events.client.ClientTickEvent;
import rip.athena.client.events.types.client.ClientTickEvent; import rip.athena.client.events.entity.PlayerInteractEvent;
import rip.athena.client.events.types.entity.PlayerInteractEvent; import rip.athena.client.events.input.KeyDownEvent;
import rip.athena.client.events.types.input.KeyDownEvent; import rip.athena.client.events.input.KeyUpEvent;
import rip.athena.client.events.types.input.KeyUpEvent; import rip.athena.client.events.input.MouseDownEvent;
import rip.athena.client.events.types.input.MouseDownEvent; import rip.athena.client.events.input.MouseMoveEvent;
import rip.athena.client.events.types.input.MouseMoveEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderType;
import rip.athena.client.events.types.render.RenderType;
import rip.athena.client.ui.menu.AthenaMenu;
import rip.athena.client.modules.fpssettings.OptimizerMod; import rip.athena.client.modules.fpssettings.OptimizerMod;
import rip.athena.client.modules.mods.HitDelayFix; import rip.athena.client.modules.mods.HitDelayFix;
import rip.athena.client.modules.render.MotionBlur; import rip.athena.client.modules.render.MotionBlur;
import rip.athena.client.ui.menu.AthenaMenu;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.Proxy;
import java.net.SocketAddress;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
public class Minecraft implements IThreadListener, IPlayerUsage public class Minecraft implements IThreadListener, IPlayerUsage
{ {

View File

@ -44,8 +44,8 @@ import net.minecraft.world.border.WorldBorder;
import optifine.Config; import optifine.Config;
import optifine.CustomColors; import optifine.CustomColors;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import rip.athena.client.modules.mods.OldAnimations; import rip.athena.client.modules.mods.OldAnimations;
public class GuiIngame extends Gui public class GuiIngame extends Gui

View File

@ -5,6 +5,7 @@ import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.settings.GameSettings; import net.minecraft.client.settings.GameSettings;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -64,11 +65,11 @@ public class GuiOptionSlider extends GuiButton
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
// this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)), this.yPosition, 0, 66, 4, 20); // this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)), this.yPosition, 0, 66, 4, 20);
// this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20); // this.drawTexturedModalRect(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)) + 4, this.yPosition, 196, 66, 4, 20);
if(!(sliderValue <= 0)) { //if(!(sliderValue <= 0)) {
RoundedUtils.drawRound(this.xPosition, this.yPosition + 2, this.sliderValue * 150, height - 4, 4, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor()); //RoundedUtils.drawRound(this.xPosition, this.yPosition + 2, this.sliderValue * 150, height - 4, 4, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor());
RoundedUtils.drawRound(this.xPosition + this.sliderValue * 150 - 7, this.yPosition + 2, 7, height - 4, 2, Color.white RoundedUtils.drawGradientRound(this.xPosition, this.yPosition + 2, this.sliderValue * 150, height - 4, 4, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
); RoundedUtils.drawRound(this.xPosition + (int)(this.sliderValue * (float)(this.width - 8)) + 2, this.yPosition + 2, 5, height - 4, 2, Color.white);
} //}
} }
} }

View File

@ -29,7 +29,7 @@ import net.minecraft.util.Vec3;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldSettings;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.entity.AttackEntityEvent; import rip.athena.client.events.entity.AttackEntityEvent;
public class PlayerControllerMP public class PlayerControllerMP
{ {

View File

@ -85,8 +85,8 @@ import org.lwjgl.opengl.GLContext;
import org.lwjgl.util.glu.GLU; import org.lwjgl.util.glu.GLU;
import org.lwjgl.util.glu.Project; import org.lwjgl.util.glu.Project;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import rip.athena.client.modules.mods.*; import rip.athena.client.modules.mods.*;
import shadersmod.client.Shaders; import shadersmod.client.Shaders;
import shadersmod.client.ShadersRender; import shadersmod.client.ShadersRender;

View File

@ -10,7 +10,6 @@ import net.minecraft.client.renderer.entity.layers.LayerCape;
import net.minecraft.client.renderer.entity.layers.LayerCustomHead; import net.minecraft.client.renderer.entity.layers.LayerCustomHead;
import net.minecraft.client.renderer.entity.layers.LayerDeadmau5Head; import net.minecraft.client.renderer.entity.layers.LayerDeadmau5Head;
import net.minecraft.client.renderer.entity.layers.LayerHeldItem; import net.minecraft.client.renderer.entity.layers.LayerHeldItem;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.item.EnumAction; import net.minecraft.item.EnumAction;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -19,7 +18,7 @@ import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.Scoreboard; import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.render.RenderPlayerEvent; import rip.athena.client.events.render.RenderPlayerEvent;
public class RenderPlayer extends RendererLivingEntity<AbstractClientPlayer> public class RenderPlayer extends RendererLivingEntity<AbstractClientPlayer>
{ {

View File

@ -29,7 +29,7 @@ import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.render.RenderEntityEvent; import rip.athena.client.events.render.RenderEntityEvent;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.modules.render.CustomHitColor; import rip.athena.client.modules.render.CustomHitColor;
import shadersmod.client.Shaders; import shadersmod.client.Shaders;

View File

@ -6,8 +6,7 @@ import net.minecraft.client.renderer.entity.RenderPlayer;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.util.MathHelper; import net.minecraft.util.MathHelper;
public class public class LayerCape implements LayerRenderer
LayerCape implements LayerRenderer
{ {
private final RenderPlayer playerRenderer; private final RenderPlayer playerRenderer;
private static final String __OBFID = "CL_00002425"; private static final String __OBFID = "CL_00002425";

View File

@ -36,8 +36,7 @@ import optifine.ConnectedTextures;
import optifine.Reflector; import optifine.Reflector;
import optifine.TextureUtils; import optifine.TextureUtils;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.client.ClientTickEvent; import rip.athena.client.events.client.SwitchTextureEvent;
import rip.athena.client.events.types.client.SwitchTextureEvent;
import shadersmod.client.ShadersTex; import shadersmod.client.ShadersTex;
public class TextureMap extends AbstractTexture implements ITickableTextureObject public class TextureMap extends AbstractTexture implements ITickableTextureObject

View File

@ -75,9 +75,8 @@ import net.minecraft.world.LockCode;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.WorldSettings; import net.minecraft.world.WorldSettings;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.entity.AttackEntityEvent; import rip.athena.client.events.entity.PlayerInteractEvent;
import rip.athena.client.events.types.entity.PlayerInteractEvent; import rip.athena.client.events.entity.PlayerTickEvent;
import rip.athena.client.events.types.entity.PlayerTickEvent;
@SuppressWarnings("incomplete-switch") @SuppressWarnings("incomplete-switch")
public abstract class EntityPlayer extends EntityLivingBase public abstract class EntityPlayer extends EntityLivingBase

View File

@ -49,7 +49,7 @@ import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager; import org.apache.logging.log4j.MarkerManager;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.types.network.IngoingPacketEvent; import rip.athena.client.events.network.IngoingPacketEvent;
public class NetworkManager extends SimpleChannelInboundHandler<Packet> public class NetworkManager extends SimpleChannelInboundHandler<Packet>
{ {

View File

@ -20,7 +20,7 @@ import java.util.ArrayList;
*/ */
public class AccountManager { public class AccountManager {
private Minecraft mc = Minecraft.getMinecraft(); private final Minecraft mc = Minecraft.getMinecraft();
private ArrayList<Account> accounts = new ArrayList<>(); private ArrayList<Account> accounts = new ArrayList<>();
public boolean isFirstLogin = false; public boolean isFirstLogin = false;
@ -28,8 +28,7 @@ public class AccountManager {
private Account currentAccount; private Account currentAccount;
public AccountManager() { public AccountManager() {
if(Athena.INSTANCE.getACCOUNTS_DIR().length() == 0) {
if(Athena.ACCOUNTS_DIR.length() == 0) {
isFirstLogin = true; isFirstLogin = true;
} }
@ -47,7 +46,7 @@ public class AccountManager {
toSave.add("Current:" + getCurrentAccount().getUsername()); toSave.add("Current:" + getCurrentAccount().getUsername());
try { try {
PrintWriter pw = new PrintWriter(Athena.ACCOUNTS_DIR); PrintWriter pw = new PrintWriter(Athena.INSTANCE.getACCOUNTS_DIR());
for (String str : toSave) { for (String str : toSave) {
pw.println(str); pw.println(str);
} }
@ -58,10 +57,10 @@ public class AccountManager {
} }
public void load() { public void load() {
ArrayList<String> lines = new ArrayList<String>(); ArrayList<String> lines = new ArrayList<>();
try { try {
BufferedReader reader = new BufferedReader(new FileReader(Athena.ACCOUNTS_DIR)); BufferedReader reader = new BufferedReader(new FileReader(Athena.INSTANCE.getACCOUNTS_DIR()));
String line = reader.readLine(); String line = reader.readLine();
while (line != null) { while (line != null) {
lines.add(line); lines.add(line);
@ -79,10 +78,6 @@ public class AccountManager {
AccountType accountType = AccountType.MICROSOFT; AccountType accountType = AccountType.MICROSOFT;
if(args[1].equals("MICROSOFT")) {
accountType = AccountType.MICROSOFT;
}
if(args[1].equals("SESSION")) { if(args[1].equals("SESSION")) {
accountType = AccountType.SESSION; accountType = AccountType.SESSION;
} }
@ -101,10 +96,7 @@ public class AccountManager {
} }
private void login(Account a) { private void login(Account a) {
if(a == null) return;
if(a == null) {
return;
}
if(a.getAccountType().equals(AccountType.MICROSOFT)) { if(a.getAccountType().equals(AccountType.MICROSOFT)) {
MicrosoftAuthenticator authenticator = new MicrosoftAuthenticator(); MicrosoftAuthenticator authenticator = new MicrosoftAuthenticator();

View File

@ -11,10 +11,10 @@ import rip.athena.api.module.Module;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.config.AbstractConfigEntry; import rip.athena.client.config.AbstractConfigEntry;
import rip.athena.client.cosmetics.cape.Cape; import rip.athena.client.cosmetics.cape.Cape;
import rip.athena.client.events.types.client.ConfigChangeEvent; import rip.athena.client.events.client.ConfigChangeEvent;
import rip.athena.client.ui.clickgui.pages.SettingsPage; import rip.athena.client.ui.clickgui.pages.SettingsPage;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.api.macros.Macro; import rip.athena.api.macro.Macro;
import rip.athena.client.modules.render.Crosshair; import rip.athena.client.modules.render.Crosshair;
import rip.athena.client.theme.impl.AccentTheme; import rip.athena.client.theme.impl.AccentTheme;
import rip.athena.client.utils.StringUtils; import rip.athena.client.utils.StringUtils;
@ -90,7 +90,7 @@ public class Config {
Module module = Athena.INSTANCE.getModuleRepository().getModule(key); Module module = Athena.INSTANCE.getModuleRepository().getModule(key);
if(module == null) { if(module == null) {
Athena.INSTANCE.getLog().warn("Loaded config " + name + " with left over setting " + key + " which is no longer used."); //Athena.INSTANCE.getLog().warn("Loaded config " + name + " with left over setting " + key + " which is no longer used.");
continue; continue;
} }
@ -146,24 +146,6 @@ public class Config {
} }
} }
String themeIdentifier = obj.getString("theme");
for (AccentTheme theme : AccentTheme.values()) {
if (theme.name().equalsIgnoreCase(themeIdentifier)) {
Athena.INSTANCE.getThemeManager().setTheme(theme);
break;
}
}
String capeIdentifier = obj.getString("cape");
for (Cape cape : Athena.INSTANCE.getCosmeticsController().getCapeManager().getCapes()) {
if (cape.getName().equalsIgnoreCase(capeIdentifier)) {
Athena.INSTANCE.getLog().info(cape + capeIdentifier + cape.getName());
Athena.INSTANCE.getCosmeticsController().getCapeManager().setSelectedCape(cape);
break;
}
}
JSONArray macroList = obj.getJSONArray("macros"); JSONArray macroList = obj.getJSONArray("macros");
for(int i = 0; i < macroList.length(); i++) { for(int i = 0; i < macroList.length(); i++) {
@ -179,6 +161,22 @@ public class Config {
JSONArray tileentities = fps.getJSONArray("tile-entities"); JSONArray tileentities = fps.getJSONArray("tile-entities");
JSONArray particles = fps.getJSONArray("particles"); JSONArray particles = fps.getJSONArray("particles");
String themeIdentifier = obj.getString("theme");
for (AccentTheme theme : AccentTheme.values()) {
if (theme.name().equalsIgnoreCase(themeIdentifier)) {
Athena.INSTANCE.getThemeManager().setTheme(theme);
break;
}
}
String capeIdentifier = obj.getString("cape");
for (Cape cape : Athena.INSTANCE.getCosmeticsController().getCapeManager().getCapes()) {
if (cape.getName().equalsIgnoreCase(capeIdentifier)) {
Athena.INSTANCE.getCosmeticsController().getCapeManager().setSelectedCape(cape);
break;
}
}
List<String> list = new ArrayList<>(); List<String> list = new ArrayList<>();
for(int i = 0; i < blocks.length(); i++) { for(int i = 0; i < blocks.length(); i++) {

View File

@ -0,0 +1,16 @@
package rip.athena.api.event;
import lombok.Getter;
import lombok.Setter;
/**
* @author Athena Development
* @project Athena-Client
* @date 6/1/2023
*/
@Setter
@Getter
public class Event {
private boolean cancelled;
}

View File

@ -1,4 +1,4 @@
package rip.athena.client.events; package rip.athena.api.event;
import rip.athena.client.Athena; import rip.athena.client.Athena;

View File

@ -1,4 +1,4 @@
package rip.athena.client.events; package rip.athena.api.event;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -1,4 +1,4 @@
package rip.athena.api.macros; package rip.athena.api.macro;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;

View File

@ -1,11 +1,11 @@
package rip.athena.api.macros; package rip.athena.api.macro;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.KeyDownEvent; import rip.athena.client.events.input.KeyDownEvent;
import rip.athena.client.events.types.input.MouseDownEvent; import rip.athena.client.events.input.MouseDownEvent;
import rip.athena.client.ui.clickgui.components.mods.MenuModKeybind; import rip.athena.client.ui.clickgui.components.mods.MenuModKeybind;
import java.util.List; import java.util.List;

View File

@ -19,7 +19,6 @@ public enum EnumModuleType {
FACTIONS(4, "FACTIONS",false), FACTIONS(4, "FACTIONS",false),
OTHER(5, "OTHER",false), OTHER(5, "OTHER",false),
HIDDEN(6, "", true), HIDDEN(6, "", true),
FPS_SETTINGS(7, "",true); FPS_SETTINGS(7, "",true);
private final int index; private final int index;

View File

@ -1,21 +1,20 @@
package rip.athena.client; package rip.athena.client;
import lombok.Getter; import lombok.Getter;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.Display; import org.lwjgl.opengl.Display;
import rip.athena.api.module.ModuleRepository;
import rip.athena.api.account.AccountManager; import rip.athena.api.account.AccountManager;
import rip.athena.api.config.save.ConfigManager; import rip.athena.api.config.save.ConfigManager;
import rip.athena.api.event.EventBus;
import rip.athena.api.event.SubscribeEvent;
import rip.athena.api.macro.MacroManager;
import rip.athena.api.module.ModuleRepository;
import rip.athena.client.cosmetics.CosmeticsController; import rip.athena.client.cosmetics.CosmeticsController;
import rip.athena.client.events.EventBus; import rip.athena.client.events.client.ClientTickEvent;
import rip.athena.client.events.SubscribeEvent;
import rip.athena.client.events.types.client.ClientTickEvent;
import rip.athena.client.ui.hud.HUDManager;
import rip.athena.client.ui.notifications.NotificationManager;
import rip.athena.api.macros.MacroManager;
import rip.athena.client.socket.SocketClient; import rip.athena.client.socket.SocketClient;
import rip.athena.client.theme.ThemeManager; import rip.athena.client.theme.ThemeManager;
import rip.athena.client.ui.hud.HUDManager;
import rip.athena.client.ui.notifications.NotificationManager;
import rip.athena.client.utils.PrefixedLogger; import rip.athena.client.utils.PrefixedLogger;
import rip.athena.client.utils.discord.DiscordRPC; import rip.athena.client.utils.discord.DiscordRPC;
import rip.athena.client.utils.input.KeybindManager; import rip.athena.client.utils.input.KeybindManager;
@ -42,9 +41,9 @@ public class Athena {
public static final Athena INSTANCE = new Athena(); public static final Athena INSTANCE = new Athena();
public static final File MAIN_DIR = Paths.get(Minecraft.getMinecraft().mcDataDir.getAbsolutePath(), "settings").toFile(); public final File MAIN_DIR = Paths.get(Minecraft.getMinecraft().mcDataDir.getAbsolutePath(), "settings").toFile();
public static final File CONFIGS_DIR = Paths.get(MAIN_DIR.getAbsolutePath(), "configs").toFile(); public final File CONFIGS_DIR = Paths.get(MAIN_DIR.getAbsolutePath(), "configs").toFile();
public static final File ACCOUNTS_DIR = new File(MAIN_DIR.getAbsolutePath(), "accounts.json"); public final File ACCOUNTS_DIR = new File(MAIN_DIR.getAbsolutePath(), "accounts.json");
private final PrefixedLogger log = new PrefixedLogger("Athena"); private final PrefixedLogger log = new PrefixedLogger("Athena");
@ -52,17 +51,20 @@ public class Athena {
private final String clientVersion = "0.0.3"; private final String clientVersion = "0.0.3";
private final String clientBuild = "062623"; private final String clientBuild = "062623";
private final boolean debug = false;
private NotificationManager notificationManager; private NotificationManager notificationManager;
private CosmeticsController cosmeticsController; private CosmeticsController cosmeticsController;
private ModuleRepository moduleRepository;
private AccountManager accountManager; private AccountManager accountManager;
private ConfigManager configManager; private ConfigManager configManager;
private ModuleRepository moduleRepository;
private ThemeManager themeManager; private ThemeManager themeManager;
private MacroManager macroManager; private MacroManager macroManager;
private HUDManager hudManager; private HUDManager hudManager;
private DiscordRPC discordRPC; private DiscordRPC discordRPC;
private EventBus eventBus; private EventBus eventBus;
private boolean isGameRunningForeground = true;
public static boolean hasSent = false; public static boolean hasSent = false;
/** /**
@ -72,20 +74,28 @@ public class Athena {
* connections with servers or other systems. * connections with servers or other systems.
*/ */
public void initClient() { public void initClient() {
String os = System.getProperty("os.name");
if (os.toLowerCase().contains("win")) {
//this.discordRPC = new DiscordRPC();
}
createDirectoryIfNotExists(MAIN_DIR); createDirectoryIfNotExists(MAIN_DIR);
createFileIfNotExists(ACCOUNTS_DIR); createFileIfNotExists(ACCOUNTS_DIR);
postInit();
handleManagers();
registerEvents();
checkCosmetics();
logInformation();
}
private void postInit() {
this.discordRPC = new DiscordRPC();
if(SocketClient.isClientRunning()) { if(SocketClient.isClientRunning()) {
JOptionPane.showMessageDialog(null, "Port 45376 already in use."); JOptionPane.showMessageDialog(null, "Port 45376 already in use.");
System.exit(0); System.exit(0);
} }
}
private void handleManagers() {
this.configManager = new ConfigManager(CONFIGS_DIR); this.configManager = new ConfigManager(CONFIGS_DIR);
this.accountManager = new AccountManager(); this.accountManager = new AccountManager();
this.moduleRepository = new ModuleRepository(); this.moduleRepository = new ModuleRepository();
@ -97,15 +107,35 @@ public class Athena {
this.notificationManager = new NotificationManager(); this.notificationManager = new NotificationManager();
this.cosmeticsController = new CosmeticsController(); this.cosmeticsController = new CosmeticsController();
registerEvents();
configManager.postInit(); configManager.postInit();
}
private void checkCosmetics() {
if(this.cosmeticsController.getCapeManager().getSelectedCape() == null) { if(this.cosmeticsController.getCapeManager().getSelectedCape() == null) {
this.cosmeticsController.getCapeManager().setSelectedCape(this.cosmeticsController.getCapeManager().getCape("None")); this.cosmeticsController.getCapeManager().setSelectedCape(this.cosmeticsController.getCapeManager().getCape("None"));
} }
} }
private void logInformation() {
Athena.INSTANCE.getLog().info("Successfully loaded Athena!");
Athena.INSTANCE.getLog().info("--------------------------------");
Athena.INSTANCE.getLog().info("OS: " + System.getProperty("os.name"));
Athena.INSTANCE.getLog().info("Java: " + System.getProperty("java.version") + ", " + System.getProperty("java.vendor"));
Athena.INSTANCE.getLog().info("Java VM: " + System.getProperty("java.vm.name") + " (" + System.getProperty("java.vm.info") + "), " + System.getProperty("java.vm.vendor"));
Athena.INSTANCE.getLog().info("--------------------------------");
Athena.INSTANCE.getLog().info("Module Repository Size: " + this.moduleRepository.getModules().size());
Athena.INSTANCE.getLog().info("HUD Elements Size: " + this.hudManager.getElements().size());
Athena.INSTANCE.getLog().info("Account Size: " + this.accountManager.getAccounts().size());
Athena.INSTANCE.getLog().info("Config Size: " + this.configManager.getConfigs().size());
Athena.INSTANCE.getLog().info("Macro Size: " + this.macroManager.getMacros().size());
Athena.INSTANCE.getLog().info("Cape Size: " + this.cosmeticsController.getCapeManager().getCapes().size());
Athena.INSTANCE.getLog().info("--------------------------------");
Athena.INSTANCE.getLog().info("Active Primary Theme: " + this.themeManager.getPrimaryTheme().getTheme());
Athena.INSTANCE.getLog().info("Active Accent Theme: " + this.themeManager.getTheme().getTheme());
Athena.INSTANCE.getLog().info("Active Config: " + this.configManager.getLoadedConfig().getName());
Athena.INSTANCE.getLog().info("--------------------------------");
}
/** /**
* Registers the events for the event bus. * Registers the events for the event bus.
*/ */
@ -116,8 +146,6 @@ public class Athena {
eventBus.register(this); eventBus.register(this);
} }
private boolean isGameRunningForeground = true;
/** /**
* Event handler for the ClientTickEvent. * Event handler for the ClientTickEvent.
* *
@ -129,7 +157,7 @@ public class Athena {
String currentUsername = Minecraft.getMinecraft().thePlayer.getGameProfile().getName(); String currentUsername = Minecraft.getMinecraft().thePlayer.getGameProfile().getName();
if (!hasSent || !currentUsername.equals(SocketClient.getCurrentUsername())) { if (!hasSent || !currentUsername.equals(SocketClient.getCurrentUsername())) {
if (hasSent && !currentUsername.equals(SocketClient.getCurrentUsername())) { if (hasSent) {
// Player has changed their Minecraft account, disconnect the previous user // Player has changed their Minecraft account, disconnect the previous user
hasSent = false; // Reset the hasSent flag hasSent = false; // Reset the hasSent flag
} }
@ -139,6 +167,7 @@ public class Athena {
// Send the modified "start" request with the username and UUID // Send the modified "start" request with the username and UUID
System.out.println(SocketClient.sendRequest("start", currentUsername + ":" + uuid + ":true")); System.out.println(SocketClient.sendRequest("start", currentUsername + ":" + uuid + ":true"));
Athena.INSTANCE.getLog().debug("Sent player initialize request");
SocketClient.setCurrentUsername(currentUsername); SocketClient.setCurrentUsername(currentUsername);
hasSent = true; hasSent = true;
@ -159,6 +188,7 @@ public class Athena {
private void createDirectoryIfNotExists(File directory) { private void createDirectoryIfNotExists(File directory) {
if (!directory.exists()) { if (!directory.exists()) {
directory.mkdir(); directory.mkdir();
Athena.INSTANCE.getLog().debug("Created folder: " + directory.getName());
} }
} }
@ -166,6 +196,7 @@ public class Athena {
if (!file.exists()) { if (!file.exists()) {
try { try {
file.createNewFile(); file.createNewFile();
Athena.INSTANCE.getLog().debug("Created file: " + file.getName());
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
} }

View File

@ -11,12 +11,9 @@ import rip.athena.client.cosmetics.cape.CapeManager;
@Getter @Getter
public class CosmeticsController { public class CosmeticsController {
private final CapeManager capeManager; private final CapeManager capeManager;
public CosmeticsController() { public CosmeticsController() {
capeManager = new CapeManager(); capeManager = new CapeManager();
} }
} }

View File

@ -1,19 +0,0 @@
package rip.athena.client.events;
/**
* @author Athena Development
* @project Athena-Client
* @date 6/1/2023
*/
public class Event {
private boolean cancelled;
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
}

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.client; package rip.athena.client.events.client;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -0,0 +1,7 @@
package rip.athena.client.events.client;
import rip.athena.api.event.Event;
public class ConfigChangeEvent extends Event {
}

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.client; package rip.athena.client.events.client;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,8 +1,8 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.ICapabilityProvider;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
public class AttackEntityEvent extends Event { public class AttackEntityEvent extends Event {

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.world.World; import net.minecraft.world.World;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.util.DamageSource; import net.minecraft.util.DamageSource;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityMinecart; import net.minecraft.entity.item.EntityMinecart;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.util.BlockPos; import net.minecraft.util.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.entity; package rip.athena.client.events.entity;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
public class PlayerTickEvent extends Event { public class PlayerTickEvent extends Event {

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.input; package rip.athena.client.events.input;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.input; package rip.athena.client.events.input;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.input; package rip.athena.client.events.input;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.input; package rip.athena.client.events.input;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,7 +1,7 @@
package rip.athena.client.events.types.network; package rip.athena.client.events.network;
import net.minecraft.network.Packet; import net.minecraft.network.Packet;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,8 +1,8 @@
package rip.athena.client.events.types.render; package rip.athena.client.events.render;
import net.minecraft.client.renderer.entity.RendererLivingEntity; import net.minecraft.client.renderer.entity.RendererLivingEntity;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,6 +1,6 @@
package rip.athena.client.events.types.render; package rip.athena.client.events.render;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,7 +1,7 @@
package rip.athena.client.events.types.render; package rip.athena.client.events.render;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import rip.athena.client.events.Event; import rip.athena.api.event.Event;
public class RenderPlayerEvent extends Event { public class RenderPlayerEvent extends Event {
private EntityPlayer player; private EntityPlayer player;

View File

@ -1,4 +1,4 @@
package rip.athena.client.events.types.render; package rip.athena.client.events.render;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -1,7 +0,0 @@
package rip.athena.client.events.types.client;
import rip.athena.client.events.Event;
public class ConfigChangeEvent extends Event {
}

View File

@ -17,9 +17,9 @@ import optifine.Config;
import org.lwjgl.opengl.GL15; import org.lwjgl.opengl.GL15;
import org.lwjgl.opengl.GLContext; import org.lwjgl.opengl.GLContext;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.client.ClientTickEvent; import rip.athena.client.events.client.ClientTickEvent;
import rip.athena.client.events.types.render.RenderEntityEvent; import rip.athena.client.events.render.RenderEntityEvent;
import rip.athena.client.modules.fpssettings.OptimizerMod; import rip.athena.client.modules.fpssettings.OptimizerMod;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -6,9 +6,9 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.KeyDownEvent; import rip.athena.client.events.input.KeyDownEvent;
import rip.athena.client.events.types.input.KeyUpEvent; import rip.athena.client.events.input.KeyUpEvent;
import rip.athena.client.utils.input.KeybindManager; import rip.athena.client.utils.input.KeybindManager;
/** /**

View File

@ -6,8 +6,8 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.client.ClientTickEvent; import rip.athena.client.events.client.ClientTickEvent;
/** /**
* @author Athena Development * @author Athena Development

View File

@ -9,11 +9,11 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.entity.AttackEntityEvent; import rip.athena.client.events.entity.AttackEntityEvent;
import rip.athena.client.events.types.input.MouseDownEvent; import rip.athena.client.events.input.MouseDownEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.NumberUtils; import rip.athena.client.utils.NumberUtils;
import rip.athena.client.utils.font.FontManager; import rip.athena.client.utils.font.FontManager;

View File

@ -17,6 +17,9 @@ public class Settings extends Module {
@ConfigValue.Boolean(name = "Custom GUI Font") @ConfigValue.Boolean(name = "Custom GUI Font")
public static boolean customGuiFont = true; public static boolean customGuiFont = true;
@ConfigValue.Boolean(name = "Minimize Side Bar")
public static boolean smallBar = false;
@Override @Override
public void onEnable() { public void onEnable() {
super.onEnable(); super.onEnable();

View File

@ -0,0 +1,88 @@
package rip.athena.client.modules.other;
import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*;
@IModuleMetaData(name = "Test Module", type = EnumModuleType.OTHER, icon = "")
public class TestModule extends Module {
@ConfigValue.Boolean(name = "Boolean 1")
public boolean boolean1 = false;
@ConfigValue.Boolean(name = "Boolean 2")
public boolean boolean2 = false;
@ConfigValue.Boolean(name = "Boolean 3")
public boolean boolean3 = false;
@ConfigValue.Boolean(name = "Boolean 4")
public boolean boolean4 = false;
@ConfigValue.Boolean(name = "Boolean 5")
public boolean boolean5 = false;
@ConfigValue.Boolean(name = "Boolean 6")
public boolean boolean6 = false;
@ConfigValue.Boolean(name = "Boolean 7")
public boolean boolean7 = false;
@ConfigValue.Color(name = "Color 1")
public Color color1 = new Color(225,255,255);
@ConfigValue.Color(name = "Color 2")
public Color color2 = new Color(225,255,255);
@ConfigValue.Color(name = "Color 3")
public Color color3 = new Color(225,255,255);
@ConfigValue.Color(name = "Color 4")
public Color color4 = new Color(225,255,255);
@ConfigValue.Color(name = "Color 5")
public Color color5 = new Color(225,255,255);
HUDElement hud;
private int width = 56;
private int height = 20;
public TestModule() {
hud = new HUDElement("test", width, height) {
@Override
public void onRender() {
render();
}
};
hud.setX(100);
hud.setY(100);
addHUD(hud);
}
public void render() {
int x = hud.getX();
int y = hud.getY();
int width = hud.getWidth();
int height = hud.getHeight();
RoundedUtils.drawSelectRoundedRect(x, y, width + x, height + y, 12, 12, 0, 0, new Color(50, 50,50, 150).getRGB());
}
@Override
public void onEnable() {
super.onEnable();
}
@Override
public void onDisable() {
super.onDisable();
}
}

View File

@ -14,9 +14,9 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import java.awt.*; import java.awt.*;

View File

@ -7,8 +7,8 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.MouseDownEvent; import rip.athena.client.events.input.MouseDownEvent;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.ClickCounter; import rip.athena.client.utils.ClickCounter;

View File

@ -18,8 +18,8 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.KeyDownEvent; import rip.athena.client.events.input.KeyDownEvent;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.render.ColorUtil; import rip.athena.client.utils.render.ColorUtil;
@ -215,9 +215,7 @@ public class Coordinates extends Module {
GL11.glScaled(1, 1, 1); GL11.glScaled(1, 1, 1);
GL11.glColor3f(1, 1, 1); GL11.glColor3f(1, 1, 1);
GL11.glPopMatrix(); GL11.glPopMatrix();
} } else {
if (this.displayMode.equalsIgnoreCase("Vertical")) {
GL11.glPushMatrix(); GL11.glPushMatrix();
GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glEnable(GL11.GL_ALPHA_TEST);
if (mc.thePlayer.posX > 0) { if (mc.thePlayer.posX > 0) {

View File

@ -12,10 +12,10 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.client.ClientTickEvent; import rip.athena.client.events.client.ClientTickEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import java.awt.*; import java.awt.*;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;

View File

@ -5,8 +5,8 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.MouseDownEvent; import rip.athena.client.events.input.MouseDownEvent;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.ClickCounter; import rip.athena.client.utils.ClickCounter;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;

View File

@ -12,8 +12,8 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.client.SwitchTextureEvent; import rip.athena.client.events.client.SwitchTextureEvent;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.render.ColorUtil; import rip.athena.client.utils.render.ColorUtil;

View File

@ -8,8 +8,8 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.entity.AttackEntityEvent; import rip.athena.client.events.entity.AttackEntityEvent;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.render.ColorUtil; import rip.athena.client.utils.render.ColorUtil;

View File

@ -14,9 +14,9 @@ import rip.athena.api.module.Module;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import java.awt.*; import java.awt.*;

View File

@ -6,8 +6,8 @@ import rip.athena.api.module.EnumModuleType;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.api.config.ConfigValue; import rip.athena.api.config.ConfigValue;
import rip.athena.api.module.annotations.IModuleMetaData; import rip.athena.api.module.annotations.IModuleMetaData;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.network.IngoingPacketEvent; import rip.athena.client.events.network.IngoingPacketEvent;
import rip.athena.client.ui.hud.HUDElement; import rip.athena.client.ui.hud.HUDElement;
import rip.athena.client.utils.render.HUDUtil; import rip.athena.client.utils.render.HUDUtil;

View File

@ -16,7 +16,7 @@ public enum PrimaryTheme implements ColorUtil {
DARK("Dark", new Color(30, 31, 35, 255).getRGB(), new Color(43, 44, 48, 255).getRGB(), new Color(35, 35, 35, 255).getRGB(), -1), DARK("Dark", new Color(30, 31, 35, 255).getRGB(), new Color(43, 44, 48, 255).getRGB(), new Color(35, 35, 35, 255).getRGB(), -1),
WHITE("White", new Color(255, 255, 255, 255).getRGB(), new Color(100, 100, 100, 255).getRGB(), new Color(50, 50, 50, 255).getRGB(), new Color(0,0,0).getRGB()), WHITE("White", new Color(255, 255, 255, 255).getRGB(), new Color(100, 100, 100, 255).getRGB(), new Color(50, 50, 50, 255).getRGB(), new Color(0,0,0).getRGB()),
TRANSPARENT("Gradient", new Color(200, 200, 200, 80).getRGB(), new Color(150, 150, 150, 100).getRGB(), new Color(100, 100, 100, 255).getRGB(), new Color(255, 255, 255).getRGB()); TRANSPARENT("Transparent", new Color(30, 31, 35, 200).getRGB(), new Color(43, 44, 48, 200).getRGB(), new Color(35, 35, 35, 200).getRGB(), -1);
private final String theme; private final String theme;
private final int firstColor, secondColor, thirdColor, textColor; private final int firstColor, secondColor, thirdColor, textColor;

View File

@ -10,7 +10,7 @@ public enum Category {
MODS("MODS", "Athena/gui/menu/mods.png"), MODS("MODS", "Athena/gui/menu/mods.png"),
SETTINGS("SETTINGS", "Athena/gui/menu/settings.png"), SETTINGS("SETTINGS", "Athena/gui/menu/settings.png"),
MACROS("MACROS", "Athena/gui/mods/cps.png"), MACROS("MACROS", "Athena/gui/mods/cps.png"),
WAYPOINTS("WAYPOINTS", "Athena/gui/menu/waypoints.png"), //WAYPOINTS("WAYPOINTS", "Athena/gui/menu/waypoints.png"),
PROFILES("PROFILES", "Athena/gui/menu/profiles.png"), PROFILES("PROFILES", "Athena/gui/menu/profiles.png"),
COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png"), COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png"),
//COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png"), //COSMETICS("COSMETICS", "Athena/gui/menu/cosmetics.png"),

View File

@ -3,11 +3,14 @@ package rip.athena.client.ui.clickgui;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.api.config.save.Config; import rip.athena.api.config.save.Config;
import rip.athena.client.theme.impl.PrimaryTheme;
import rip.athena.client.ui.clickgui.components.mods.ModCategoryButton;
import rip.athena.client.ui.clickgui.pages.ModsPage; import rip.athena.client.ui.clickgui.pages.ModsPage;
import rip.athena.client.ui.framework.Menu; import rip.athena.client.ui.framework.Menu;
import rip.athena.client.ui.framework.MenuComponent; import rip.athena.client.ui.framework.MenuComponent;
import rip.athena.client.ui.framework.MinecraftMenuImpl; import rip.athena.client.ui.framework.MinecraftMenuImpl;
import rip.athena.client.ui.framework.components.MenuButton; import rip.athena.client.ui.framework.components.MenuButton;
import rip.athena.client.ui.framework.components.MenuCheckbox;
import rip.athena.client.ui.framework.components.MenuDraggable; import rip.athena.client.ui.framework.components.MenuDraggable;
import rip.athena.client.ui.framework.components.MenuScrollPane; import rip.athena.client.ui.framework.components.MenuScrollPane;
import rip.athena.client.ui.framework.draw.DrawImpl; import rip.athena.client.ui.framework.draw.DrawImpl;
@ -51,7 +54,6 @@ public class IngameMenu extends MinecraftMenuImpl implements DrawImpl {
@Override @Override
public void initGui() { public void initGui() {
if(initd) { if(initd) {
menu.getComponents().clear(); menu.getComponents().clear();
initd = false; initd = false;
@ -69,9 +71,16 @@ public class IngameMenu extends MinecraftMenuImpl implements DrawImpl {
int y = 59 + 60; int y = 59 + 60;
int height = 32; int height = 32;
int width = 205;
int x2 = 0;
if(Settings.smallBar) {
width = 40;
x2 = 152;
}
for(Category category : Category.values()) { for(Category category : Category.values()) {
MenuButton comp = new CategoryButton(category, new ResourceLocation(category.getIcon()), 0, y, 205, height) { MenuButton comp = new CategoryButton(category, new ResourceLocation(category.getIcon()), x2, y, width, height) {
@Override @Override
public void onAction() { public void onAction() {
if(IngameMenu.category != null) { if(IngameMenu.category != null) {
@ -129,19 +138,22 @@ public class IngameMenu extends MinecraftMenuImpl implements DrawImpl {
float value = guiScale / new ScaledResolution(mc).getScaleFactor(); float value = guiScale / new ScaledResolution(mc).getScaleFactor();
GlStateManager.scale(value, value, value); GlStateManager.scale(value, value, value);
//DrawUtils.drawRoundedRect(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + 58, 4, MENU_TOP_BG_COLOR); if(Settings.smallBar) {
RoundedUtils.drawSelectRoundedRect(menu.getX() + 150, menu.getY(), 200 + menu.getX(), menu.getHeight() + menu.getY(), 24, 24, 0, 0, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth()); RoundedUtils.drawSelectRoundedRect(menu.getX() + 220, menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 0, 0, 24, 24, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
} else {
if(Athena.INSTANCE.getThemeManager().getPrimaryTheme() != PrimaryTheme.TRANSPARENT) {
RoundedUtils.drawGradientRound(menu.getX() - 1, menu.getY() - 1, menu.getWidth() + 2, menu.getHeight() + 2, 10, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255)); RoundedUtils.drawGradientRound(menu.getX() - 1, menu.getY() - 1, menu.getWidth() + 2, menu.getHeight() + 2, 10, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
}
RoundedUtils.drawRoundedRect(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 16, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor()); RoundedUtils.drawRoundedRect(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 16, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
rip.athena.client.utils.font.FontManager.getProductSansBold(60).drawString(Athena.INSTANCE.getClientName(), menu.getX() + 40, menu.getY() + 17, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
rip.athena.client.utils.font.FontManager.getProductSansBold(60).drawString(Athena.INSTANCE.getClientName(), menu.getX() + 60, menu.getY() + 17, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); drawVerticalLine(menu.getX() + 215, menu.getY() + 60, menu.getHeight() - 60, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor());
//DrawUtils.drawImage(new ResourceLocation("Athena/logo/pride.png"), (int) (menu.getX() + FontManager.font1.getStringWidth(Athena.INSTANCE.getClientName().toUpperCase()) + 70), (int) (menu.getY() - 10 + FontManager.font1.getHeight(Athena.INSTANCE.getClientName().toUpperCase())), 30, 30);
drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth()); drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth());
}
GlStateManager.color(1,1,1);
if(category != null) { if(category != null) {
pageManager.getPage(category).onRender(); pageManager.getPage(category).onRender();

View File

@ -0,0 +1,212 @@
package rip.athena.client.ui.clickgui;
import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation;
import rip.athena.api.config.save.Config;
import rip.athena.api.module.Module;
import rip.athena.client.Athena;
import rip.athena.client.modules.other.Settings;
import rip.athena.client.theme.impl.PrimaryTheme;
import rip.athena.client.ui.clickgui.components.mods.CategoryButton;
import rip.athena.client.ui.clickgui.pages.ModsPage;
import rip.athena.client.ui.framework.Menu;
import rip.athena.client.ui.framework.MenuComponent;
import rip.athena.client.ui.framework.MinecraftMenuImpl;
import rip.athena.client.ui.framework.components.MenuButton;
import rip.athena.client.ui.framework.components.MenuDraggable;
import rip.athena.client.ui.framework.components.MenuScrollPane;
import rip.athena.client.ui.framework.draw.DrawImpl;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*;
import java.util.ArrayList;
import java.util.List;
/**
* @author Athena Development
* @project Athena-Client
* @date 6/2/2023
*/
public class IngameMenuOld extends MinecraftMenuImpl implements DrawImpl {
public static int MENU_ALPHA = 255;
public static int MENU_TOP_BG_COLOR = new Color(30, 30, 30, MENU_ALPHA).getRGB();
public static int MENU_PANE_BG_COLOR = new Color(35, 35, 35, MENU_ALPHA).getRGB();
public static int MENU_HEADER_TEXT_COLOR = new Color(255, 255, 255, MENU_ALPHA).getRGB();
public static int MENU_LINE_COLOR = new Color(25, 25, 28, IngameMenuOld.MENU_ALPHA).getRGB();
public static PageManager pageManager;
public static Category category = Category.MODS;
private static boolean initd;
private static int savedWidth = -1;
private static int savedHeight = -1;
public IngameMenuOld(Module feature, Menu menu) {
super(feature, menu);
//pageManager = new PageManager(this, menu);
}
@Override
public void initGui() {
if(initd) {
menu.getComponents().clear();
initd = false;
}
if(!initd) {
for(IPage page : pageManager.getPages().values()) {
page.onInit();
}
menu.addComponent(new MenuDraggable(0, 0, menu.getWidth(), 58));
int x = 175;
//int y = 58 / 2 + 2;
int y = 59 + 60;
int height = 32;
for(Category category : Category.values()) {
MenuButton comp = new CategoryButton(category, new ResourceLocation(category.getIcon()), 0, y, 205, height) {
@Override
public void onAction() {
if(IngameMenuOld.category != null) {
pageManager.getPage(IngameMenuOld.category).onUnload();
}
IngameMenuOld.category = category;
for(MenuComponent component : menu.getComponents()) {
if(component instanceof CategoryButton) {
CategoryButton button = (CategoryButton) component;
button.setActive(component == this);
}
}
initPage();
}
};
if(category == IngameMenuOld.category) {
comp.setActive(true);
}
menu.addComponent(comp);
if(Settings.customGuiFont) {
x += rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width(category.getName()) + 20;
} else {
x += mc.fontRendererObj.getStringWidth(category.getName()) + 20;
}
y += 40;
}
initPage();
initd = true;
}
if(category != null) {
pageManager.getPage(category).onOpen();
}
super.initGui();
}
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
if(savedWidth != mc.displayWidth || savedHeight != mc.displayHeight) {
savedWidth = mc.displayWidth;
savedHeight = mc.displayHeight;
ScaledResolution sr = new ScaledResolution(mc);
menu.setX(sr.getScaledWidth() / 2);
menu.setY(sr.getScaledHeight() / 2);
}
GlStateManager.pushMatrix();
float value = guiScale / new ScaledResolution(mc).getScaleFactor();
GlStateManager.scale(value, value, value);
drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth());
if(Athena.INSTANCE.getThemeManager().getPrimaryTheme() != PrimaryTheme.TRANSPARENT) {
RoundedUtils.drawGradientRound(menu.getX() - 1, menu.getY() - 1, menu.getWidth() + 2, menu.getHeight() + 2, 10, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
}
RoundedUtils.drawRoundedRect(menu.getX(), menu.getY(), menu.getX() + menu.getWidth(), menu.getY() + menu.getHeight(), 16, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
rip.athena.client.utils.font.FontManager.getProductSansBold(60).drawString(Athena.INSTANCE.getClientName(), menu.getX() + 60, menu.getY() + 17, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
drawShadowDown(menu.getX(), menu.getY() + 58, menu.getWidth());
if(category != null) {
pageManager.getPage(category).onRender();
}
GlStateManager.popMatrix();
super.drawScreen(mouseX, mouseY, partialTicks);
GlStateManager.pushMatrix();
GlStateManager.scale(value, value, value);
for(MenuComponent component : menu.getComponents()) {
if(component instanceof MenuScrollPane) {
MenuScrollPane scrollpane = (MenuScrollPane) component;
scrollpane.drawExtras();
}
}
GlStateManager.popMatrix();
GlStateManager.color(1,1,1);
}
public void initPage() {
List<MenuComponent> remove = new ArrayList<>();
for(MenuComponent component : menu.getComponents()) {
if(component instanceof CategoryButton || component instanceof MenuDraggable) {
continue;
}
remove.add(component);
}
menu.getComponents().removeAll(remove);
pageManager.getPage(category).onLoad();
}
public void openSettings(Module parent) {
if(category != null) {
pageManager.getPage(category).onUnload();
}
category = Category.MODS;
pageManager.getPage(ModsPage.class, Category.MODS).activeModule = parent;
initPage();
}
@Override
public void onGuiClosed() {
if(category != null) {
pageManager.getPage(category).onClose();
}
super.onGuiClosed();
new Thread(() -> {
Config config = Athena.INSTANCE.getConfigManager().getLoadedConfig();
if(config != null) {
config.save();
}
}).start();
}
}

View File

@ -31,9 +31,8 @@ public class PageManager {
pages.put(Category.MODS, new ModsPage(mc, menu, parent)); pages.put(Category.MODS, new ModsPage(mc, menu, parent));
pages.put(Category.SETTINGS, new SettingsPage(mc, menu, parent)); pages.put(Category.SETTINGS, new SettingsPage(mc, menu, parent));
pages.put(Category.MACROS, new MacrosPage(mc, menu, parent)); pages.put(Category.MACROS, new MacrosPage(mc, menu, parent));
pages.put(Category.WAYPOINTS, new WaypointsPage(mc, menu, parent)); //pages.put(Category.WAYPOINTS, new WaypointsPage(mc, menu, parent));
pages.put(Category.PROFILES, new ProfilesPage(mc, menu, parent)); pages.put(Category.PROFILES, new ProfilesPage(mc, menu, parent));
//pages.put(Category.COSMETICS, new CosmeticsPage(mc, menu, parent));
pages.put(Category.COSMETICS, new CosmeticsPage(mc, menu, parent)); pages.put(Category.COSMETICS, new CosmeticsPage(mc, menu, parent));
pages.put(Category.THEMES, new ThemesPage(mc, menu, parent)); pages.put(Category.THEMES, new ThemesPage(mc, menu, parent));
} }

View File

@ -77,6 +77,7 @@ public class CosmeticGenericButton extends MacroButton {
drawText(text, x + (width / 2 - getStringWidth(text) / 2), y + (height / 2 - getStringHeight(text) / 2), textColor); drawText(text, x + (width / 2 - getStringWidth(text) / 2), y + (height / 2 - getStringHeight(text) / 2), textColor);
GlStateManager.color(1,1,1);
mouseDown = false; mouseDown = false;
} }
} }

View File

@ -8,7 +8,9 @@ import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
import rip.athena.client.ui.clickgui.IngameMenu; import rip.athena.client.ui.clickgui.IngameMenu;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;
import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -19,8 +21,8 @@ import java.awt.*;
*/ */
public class FlipButton extends MenuButton { public class FlipButton extends MenuButton {
public static final int NORMAL_ON = new Color(15, 58, 28, IngameMenu.MENU_ALPHA).getRGB(); public static final int NORMAL_ON = new Color(15, 200, 28, IngameMenu.MENU_ALPHA).getRGB();
public static final int NORMAL_OFF = new Color(58, 15, 17, IngameMenu.MENU_ALPHA).getRGB(); public static final int NORMAL_OFF = new Color(200, 15, 17, IngameMenu.MENU_ALPHA).getRGB();
public static final int HOVER_ON = new Color(23, 92, 44, IngameMenu.MENU_ALPHA).getRGB(); public static final int HOVER_ON = new Color(23, 92, 44, IngameMenu.MENU_ALPHA).getRGB();
public static final int HOVER_OFF = new Color(94, 25, 28, IngameMenu.MENU_ALPHA).getRGB(); public static final int HOVER_OFF = new Color(94, 25, 28, IngameMenu.MENU_ALPHA).getRGB();
@ -59,19 +61,6 @@ public class FlipButton extends MenuButton {
int width = (this.width == -1 && this.height == -1) ? (getStringWidth(text) + minOffset * 2) : this.width; int width = (this.width == -1 && this.height == -1) ? (getStringWidth(text) + minOffset * 2) : this.width;
int height = (this.width == -1 && this.height == -1) ? (getStringHeight(text) + minOffset * 2) : this.height; int height = (this.width == -1 && this.height == -1) ? (getStringHeight(text) + minOffset * 2) : this.height;
int linePopupColor = getColor(DrawType.LINE, ButtonState.POPUP);
int backgroundColor = getColor(DrawType.BACKGROUND, lastState);
int lineColor = getColor(DrawType.LINE, lastState);
int textColor = getColor(DrawType.TEXT, lastState);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
//drawHorizontalLine(x, y, width + 1, 1, lineColor);
//drawVerticalLine(x, y + 1, height - 1, 1, linePopupColor);
//drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
//drawVerticalLine(x + width, y + 1, height - 1, 1, linePopupColor);
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
x += 10; x += 10;
@ -80,14 +69,9 @@ public class FlipButton extends MenuButton {
y += 5; y += 5;
height -= 10; height -= 10;
DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 1, y + height + 1, 4.0f, new Color(50, 50, 50, 255).getRGB()); RoundedUtils.drawGradientRound(x, y, width, height, 2.0f, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, new Color(35, 35, 35, 255).getRGB()); DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, new Color(35, 35, 35, 255).getRGB());
/*drawHorizontalLine(x, y, width + 1, 1, linePopupColor);
drawVerticalLine(x, y + 1, height - 1, 1, linePopupColor);
drawHorizontalLine(x, y + height, width + 1, 1, linePopupColor);
drawVerticalLine(x + width, y + 1, height - 1, 1, linePopupColor);*/
int color = active ? NORMAL_ON : NORMAL_OFF; int color = active ? NORMAL_ON : NORMAL_OFF;
if(lastState == ButtonState.HOVER || lastState == ButtonState.HOVERACTIVE) { if(lastState == ButtonState.HOVER || lastState == ButtonState.HOVERACTIVE) {
@ -101,11 +85,8 @@ public class FlipButton extends MenuButton {
if(active) { if(active) {
DrawUtils.drawRoundedRect(x, y, x + width / 2, y + height, 4.0f, color); DrawUtils.drawRoundedRect(x, y, x + width / 2, y + height, 4.0f, color);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width / 2, height, color);
} else { } else {
DrawUtils.drawRoundedRect(x + width - width / 2, y, x + width, y + height, 4.0f, color); DrawUtils.drawRoundedRect(x + width - width / 2, y, x + width, y + height, 4.0f, color);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + width - width / 2, y, width / 2, height, color);
} }
mouseDown = false; mouseDown = false;

View File

@ -66,26 +66,11 @@ public class MacroBase extends MenuComponent {
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL); int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL); int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor);
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 12.0f, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor()); RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 12.0f, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor());
/*drawHorizontalLine(x, y, width + 1, 1, lineColor);
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);
drawShadowUp(x, y, width + 1);
drawShadowLeft(x, y, height + 1);
drawShadowDown(x, y + height + 1, width + 1);
drawShadowRight(x + width + 1, y, height + 1);*/
//drawHorizontalLine(x, y, textWidth + 1, 1, linePopupColor);
//drawVerticalLine(x, y + 1, height - 1, 1, linePopupColor);
//drawHorizontalLine(x, y + height, textWidth +
drawText(text, x + spacing, y + height / 2 - getStringHeight(text) / 2, -1); drawText(text, x + spacing, y + height / 2 - getStringHeight(text) / 2, -1);
} }
@Override @Override

View File

@ -3,6 +3,7 @@ package rip.athena.client.ui.clickgui.components.macros;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.client.Athena;
import rip.athena.client.ui.framework.TextPattern; import rip.athena.client.ui.framework.TextPattern;
import rip.athena.client.ui.framework.draw.ButtonState; import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
@ -10,6 +11,8 @@ import rip.athena.client.ui.clickgui.IngameMenu;
import rip.athena.client.ui.clickgui.components.mods.SearchTextfield; import rip.athena.client.ui.clickgui.components.mods.SearchTextfield;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -68,6 +71,8 @@ public class MacroSlimTextField extends SearchTextfield {
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y + height - 3, width, 3, lineColor); //rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y + height - 3, width, 3, lineColor);
//RoundedUtils.drawGradientRound(x - 1, y + 5, width + 2, height - 5, 2.0f, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
RoundedUtils.drawRoundedRect(x, y + 5, width + x, height + y, 2.0f, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
String textToDraw = text; String textToDraw = text;

View File

@ -9,8 +9,10 @@ import rip.athena.client.ui.framework.draw.DrawType;
import rip.athena.client.ui.clickgui.IngameMenu; import rip.athena.client.ui.clickgui.IngameMenu;
import rip.athena.client.ui.clickgui.components.mods.SearchTextfield; import rip.athena.client.ui.clickgui.components.mods.SearchTextfield;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -78,7 +80,8 @@ public class MacroTextfield extends SearchTextfield {
DrawUtils.drawRoundedRect(x - 3, y - 3, x + width + 4, y + height + 4, 4, 369098752); DrawUtils.drawRoundedRect(x - 3, y - 3, x + width + 4, y + height + 4, 4, 369098752);
DrawUtils.drawRoundedRect(x - 2, y - 2, x + width + 3, y + height + 3, 4, 587202560);*/ DrawUtils.drawRoundedRect(x - 2, y - 2, x + width + 3, y + height + 3, 4, 587202560);*/
DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 2, y + height + 2, 4, lineColor); //DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 2, y + height + 2, 4, lineColor);
RoundedUtils.drawGradientRound(x - 1, y - 1, width + 2, height + 2, 2.0f, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
//DrawUtils.drawRoundedRect(x, y, x + width + 1, y + height + 1, 4, lineColor); //DrawUtils.drawRoundedRect(x, y, x + width + 1, y + height + 1, 4, lineColor);
DrawUtils.drawRoundedRect(x, y, x + width + 1, y + height + 1, 4, backgroundColor); DrawUtils.drawRoundedRect(x, y, x + width + 1, y + height + 1, 4, backgroundColor);

View File

@ -1,8 +1,10 @@
package rip.athena.client.ui.clickgui.components.mods; package rip.athena.client.ui.clickgui.components.mods;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.ui.clickgui.IngameMenu;
import rip.athena.client.ui.framework.components.MenuButton; import rip.athena.client.ui.framework.components.MenuButton;
import rip.athena.client.ui.framework.draw.ButtonState; import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
@ -36,6 +38,11 @@ public class CategoryButton extends MenuButton {
this.image = image; this.image = image;
} }
public CategoryButton(String category, ResourceLocation image, int x, int y, int width, int height) {
super(category, x, y, width, height);
this.image = image;
}
@Override @Override
public void onInitColors() { public void onInitColors() {
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(30, 30, 30, 255)); setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(30, 30, 30, 255));
@ -54,17 +61,31 @@ public class CategoryButton extends MenuButton {
int width = (this.width == -1 && this.height == -1) ? (getStringWidth(text) + minOffset * 2) : this.width; int width = (this.width == -1 && this.height == -1) ? (getStringWidth(text) + minOffset * 2) : this.width;
int height = (this.width == -1 && this.height == -1) ? (getStringHeight(text) + minOffset * 2) : this.height; int height = (this.width == -1 && this.height == -1) ? (getStringHeight(text) + minOffset * 2) : this.height;
if(isActive()) { if(Settings.smallBar) {
RoundedUtils.drawRound(x + 30, y, width - 70, height, 12, new Color(10,10,10, 150)); if (isActive()) {
RoundedUtils.drawRound(x + 5, y, width - 5, height, 10, new Color(10, 10, 10, 150));
RoundedUtils.drawRoundedGradientOutlineCorner(x + 5, y, width + x, height + y, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB());
}
GlStateManager.pushMatrix();
DrawUtils.drawImage(image, x + 10, y + 3, 25, 25);
GlStateManager.popMatrix();
} else {
if (isActive()) {
RoundedUtils.drawRound(x + 30, y, width - 70, height, 12, new Color(10, 10, 10, 150));
RoundedUtils.drawRoundedGradientOutlineCorner(x + 30, y, width + x - 40, height + y, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB()); RoundedUtils.drawRoundedGradientOutlineCorner(x + 30, y, width + x - 40, height + y, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB());
} }
if(Settings.customGuiFont) { if (Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getNunitoBold(25).drawString(text, x + 70, y + height / 2 - (getStringHeight(text) / 2) + 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); rip.athena.client.utils.font.FontManager.getNunitoBold(25).drawString(text, x + 70, y + height / 2 - (getStringHeight(text) / 2) + 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2), Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2), Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }
GlStateManager.pushMatrix();
DrawUtils.drawImage(image, x + 35, y + 3, 25, 25); DrawUtils.drawImage(image, x + 35, y + 3, 25, 25);
GlStateManager.popMatrix();
}
GlStateManager.color(1,1,1);
mouseDown = false; mouseDown = false;
} }

View File

@ -5,6 +5,8 @@ import rip.athena.client.Athena;
import rip.athena.client.ui.framework.components.MenuCheckbox; import rip.athena.client.ui.framework.components.MenuCheckbox;
import rip.athena.client.ui.framework.draw.ButtonState; import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
import rip.athena.client.utils.animations.simple.SimpleAnimation;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -16,6 +18,9 @@ import java.awt.*;
*/ */
public class MenuModCheckbox extends MenuCheckbox { public class MenuModCheckbox extends MenuCheckbox {
private SimpleAnimation switchAnimation = new SimpleAnimation(0.0F);
public MenuModCheckbox(int x, int y, int width, int height) { public MenuModCheckbox(int x, int y, int width, int height) {
super("", x, y, width, height); super("", x, y, width, height);
textOffset = 0; textOffset = 0;
@ -48,35 +53,23 @@ public class MenuModCheckbox extends MenuCheckbox {
GlStateManager.color(1, 1, 1); GlStateManager.color(1, 1, 1);
if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.ACTIVE)) { if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.ACTIVE)) {
RoundedUtils.drawGradientRound(x - 1, y - 1, width + 2, height + 2, 4, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB()); RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor());
RoundedUtils.drawRoundedRect(x + 3, y + 3, x + width - 3, y + height - 3, 4, Color.BLACK.getRGB()); RoundedUtils.drawRoundedRect(x, y, x + width / 2, y + height, 4, new Color(20, 200, 50).getRGB());
// RoundedUtils.drawGradientRound(x + 2, y + 2, width - 3, height - 3, 3, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor());
} else if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.HOVER)) { } else if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.HOVER)) {
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB()); RoundedUtils.drawGradientRound(x - 1, y - 1, width + 2, height + 2, 4, ColorUtil.getClientColor(0, 255).brighter(), ColorUtil.getClientColor(90, 255).brighter(), ColorUtil.getClientColor(180, 255).brighter(), ColorUtil.getClientColor(270, 255).brighter());
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor()).brighter().getRGB());
RoundedUtils.drawRoundedRect(x + ((float) width / 2), y, x + width, y + height, 4, new Color(200, 50, 50).brighter().getRGB());
} else if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.HOVERACTIVE)) { } else if (backgroundColor == getColor(DrawType.BACKGROUND, ButtonState.HOVERACTIVE)) {
RoundedUtils.drawGradientRound(x - 1, y - 1, width + 2, height + 2, 4, ColorUtil.getClientColor(0, 255).brighter(), ColorUtil.getClientColor(90, 255).brighter(), ColorUtil.getClientColor(180, 255).brighter(), ColorUtil.getClientColor(270, 255).brighter());
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB()); RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor()).brighter().getRGB());
RoundedUtils.drawRoundedRect(x + 3, y + 3, x + width - 3, y + height - 3, 4, Color.BLACK.getRGB()); RoundedUtils.drawRoundedRect(x, y, x + width / 2, y + height, 4, new Color(20, 200, 50).brighter().getRGB());
// RoundedUtils.drawGradientRound(x + 2, y + 2, width - 3, height - 3, 3, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().darker(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().darker(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().darker(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().darker());
} else { } else {
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getTheme().getThirdColor().getRGB()); RoundedUtils.drawGradientRound(x - 1, y - 1, width + 2, height + 2, 4, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
// RoundedUtils.drawRoundedGradientOutlineCorner(x + 2, y, x + width - 2, y + height - 3, 1, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB()); RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 4, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getThirdColor());
RoundedUtils.drawRoundedRect(x + ((float) width / 2), y, x + width, y + height, 4, new Color(200, 50, 50).getRGB());
} }
/*drawHorizontalLine(x, y, width + 1, 1, lineColor);
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + 2, y + 2, width - 3, height - 3, lineColor);
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + 3, y + 3, width - 5, height - 5, backgroundColor);*/
//DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4, lineColor);
//DrawUtils.drawRoundedRect(x + 4, y + 4, x + width - 4, y + height - 4, 1, backgroundColor);
drawTooltip(); drawTooltip();
mouseDown = false; mouseDown = false;

View File

@ -38,17 +38,17 @@ public class MenuModColorPicker extends MenuColorPicker {
GlStateManager.color(1, 1, 1); GlStateManager.color(1, 1, 1);
drawHorizontalLine(x, y, width + 1, 1, lineColor); /*drawHorizontalLine(x, y, width + 1, 1, lineColor);
drawVerticalLine(x, y + 1, height - 1, 1, lineColor); drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
drawHorizontalLine(x, y + height, width + 1, 1, lineColor); drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor); drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);*/
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(x + 2, y + 2, width - 3, height - 3, lineColor); rip.athena.client.ui.framework.draw.DrawImpl.drawRect(x + 3, y + 2, width - 1, height - 3, lineColor);
int index = 0; int index = 0;
for(int h = y; h < y + height - 5; h++) { for(int h = y; h < y + height - 5; h++) {
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(x + 3, h + 3, width - 5, 1, disabled ? lightenColor(index, 7, color).getRGB() : darkenColor(index, 7, color).getRGB()); rip.athena.client.ui.framework.draw.DrawImpl.drawRect(x + 5, h + 3, width - 5, 1, /*disabled ? */lightenColor(index, 0, color).getRGB()/* : darkenColor(index, 7, color).getRGB()*/);
index++; index++;
} }

View File

@ -10,6 +10,7 @@ import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
@ -162,8 +163,9 @@ public class MenuModKeybind extends MenuComponent {
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
DrawUtils.drawRoundedRect(x, y, x + width, y + height, 4.0f, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); RoundedUtils.drawGradientRound(x, y, width, height, 2.0f, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
RoundedUtils.drawRoundedGradientOutlineCorner(x, y, x + width, y + height, 1, 12, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB()); DrawUtils.drawRoundedRect(x, y, x + width, y + height, 2.0f, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor());
//RoundedUtils.drawRoundedGradientOutlineCorner(x, y, x + width, y + height, 1, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor().getRGB());
//DrawUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 4.0f, new Color(35, 35, 35, 255).getRGB()); //DrawUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 4.0f, new Color(35, 35, 35, 255).getRGB());

View File

@ -9,6 +9,7 @@ import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
@ -101,7 +102,8 @@ public class MenuModSlider extends MenuSlider {
linePos += minOffset; linePos += minOffset;
} }
DrawUtils.drawRoundedRect(x + 1, y + 1, x + linePos, y + height - 1, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB()); //DrawUtils.drawRoundedRect(x + 1, y + 1, x + linePos, y + height - 1, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB());
RoundedUtils.drawGradientRound(x + 1, y + 1, linePos, height - 1, 4, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
// RoundedUtils.drawRoundedRect(x + 1, y + 1, linePos, height - 1, 6 ,Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB()); // RoundedUtils.drawRoundedRect(x + 1, y + 1, linePos, height - 1, 6 ,Athena.INSTANCE.getThemeManager().getTheme().getFirstColor().getRGB());
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + 1, y + 1, linePos, height - 1, backgroundColor); //rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x + 1, y + 1, linePos, height - 1, backgroundColor);
@ -113,7 +115,7 @@ public class MenuModSlider extends MenuSlider {
cursorPos = cursorWidth; cursorPos = cursorWidth;
} }
DrawUtils.drawRoundedRect(x + cursorPos - cursorWidth, y + 1, x + cursorPos, y + height - 1, 6, -1); DrawUtils.drawRoundedRect(x + cursorPos - cursorWidth + 10, y, x + cursorPos, y + height, 2, -1);
// DrawUtils.drawRoundedRect(x + cursorPos - cursorWidth, y, x + cursorWidth + 2, y + height + 1, 4, linePopupColor); // DrawUtils.drawRoundedRect(x + cursorPos - cursorWidth, y, x + cursorWidth + 2, y + height + 1, 4, linePopupColor);
// DrawUtils.drawRoundedRect(x + 1 + cursorPos - cursorWidth, y + 1, cursorWidth, height - 1, 4, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); // DrawUtils.drawRoundedRect(x + 1 + cursorPos - cursorWidth, y + 1, cursorWidth, height - 1, 4, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());

View File

@ -66,18 +66,32 @@ public class ModCategoryButton extends MenuButton {
GlStateManager.color(1, 1, 1); GlStateManager.color(1, 1, 1);
if(isActive()) { if(Settings.smallBar) {
RoundedUtils.drawRound(x + 17, y, width - 23, height - 4, 12, new Color(10,10,10, 150)); if (text.equalsIgnoreCase("EDIT HUD")) {
RoundedUtils.drawRoundedGradientOutlineCorner(x + 17, y, width + x - 7, height + y - 4, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB()); DrawUtils.drawImage(image, x + 10, y + 3, 25, 25);
//RoundedUtils.drawGradientRound(x + 17, y - 1, width - 23, height - 4, 12, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor());
//RoundedUtils.drawRoundedRect(x + 17, y - 1, x + width - 6, y + height - 4, 12, new Color(50,50,50,255).getRGB());
//RoundedUtils.drawRoundedRect(x + 18, y, x + width - 7, y + height - 5, 12, backgroundColor);
//drawHorizontalLine(x + (width / 2 - getStringWidth(text) / 2), y + 29, (int)Minecraft.getMinecraft().fontRendererObj.getStringWidth(text), 2, textColor);
} }
if(Settings.customGuiFont) { if (isActive()) {
if(text.equalsIgnoreCase("EDIT HUD")) { RoundedUtils.drawRound(x + 17, y, width - 23, height - 4, 12, new Color(10, 10, 10, 150));
RoundedUtils.drawRoundedGradientOutlineCorner(x + 17, y, width + x - 7, height + y - 4, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB());
}
if (Settings.customGuiFont) {
if (!text.equalsIgnoreCase("EDIT HUD")) {
rip.athena.client.utils.font.FontManager.getProductSansBold(25).drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
}
} else {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
}
} else {
if (isActive()) {
RoundedUtils.drawRound(x + 17, y, width - 23, height - 4, 12, new Color(10, 10, 10, 150));
RoundedUtils.drawRoundedGradientOutlineCorner(x + 17, y, width + x - 7, height + y - 4, 1, 12, ColorUtil.getClientColor(0, 255).getRGB(), ColorUtil.getClientColor(90, 255).getRGB(), ColorUtil.getClientColor(180, 255).getRGB(), ColorUtil.getClientColor(270, 255).getRGB());
}
if (Settings.customGuiFont) {
if (text.equalsIgnoreCase("EDIT HUD")) {
rip.athena.client.utils.font.FontManager.getProductSansBold(35).drawString(text, x + (width / 2 - getStringWidth(text) / 2) - 15, y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); rip.athena.client.utils.font.FontManager.getProductSansBold(35).drawString(text, x + (width / 2 - getStringWidth(text) / 2) - 15, y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} else { } else {
rip.athena.client.utils.font.FontManager.getProductSansBold(25).drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); rip.athena.client.utils.font.FontManager.getProductSansBold(25).drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
@ -86,9 +100,10 @@ public class ModCategoryButton extends MenuButton {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2) - 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }
if(text.equalsIgnoreCase("EDIT HUD")) { if (text.equalsIgnoreCase("EDIT HUD")) {
DrawUtils.drawImage(image, x + 25, y + 3, 25, 25); DrawUtils.drawImage(image, x + 25, y + 3, 25, 25);
} }
}
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width - 10, height, backgroundColor); //rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width - 10, height, backgroundColor);
/*DrawUtils.drawRoundedRect(x + 9, y - 1, x + width - 19, y + height + 1, 4, new Color(50,50,50,255).getRGB()); /*DrawUtils.drawRoundedRect(x + 9, y - 1, x + width - 19, y + height + 1, 4, new Color(50,50,50,255).getRGB());
DrawUtils.drawRoundedRect(x + 10, y, x + width - 20, y + height, 4, backgroundColor); DrawUtils.drawRoundedRect(x + 10, y, x + width - 20, y + height, 4, backgroundColor);
@ -98,7 +113,6 @@ public class ModCategoryButton extends MenuButton {
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2), textColor); Minecraft.getMinecraft().fontRendererObj.drawString(text, x + (width / 2 - getStringWidth(text) / 2), y + height / 2 - (getStringHeight(text) / 2), textColor);
}*/ }*/
mouseDown = false; mouseDown = false;
} }

View File

@ -11,6 +11,8 @@ import rip.athena.client.ui.framework.draw.DrawType;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
import rip.athena.client.utils.animations.simple.SimpleAnimation;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -142,7 +144,6 @@ public class ModScrollPane extends MenuScrollPane {
} }
} }
Collections.sort(components, (a, b) -> Integer.compare(a.getPriority().getPriority(), b.getPriority().getPriority())); Collections.sort(components, (a, b) -> Integer.compare(a.getPriority().getPriority(), b.getPriority().getPriority()));
Collections.reverse(components); Collections.reverse(components);
@ -229,27 +230,8 @@ public class ModScrollPane extends MenuScrollPane {
scrollerHeight -= 3; scrollerHeight -= 3;
GlStateManager.color(1, 1,1); GlStateManager.color(1, 1,1);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 3, y - 2, scrollerWidth + 6, scrollerHeight + 8, 83886080);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 2, y - 1, scrollerWidth + 4, scrollerHeight + 6, 369098752);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 1, y, scrollerWidth + 2, scrollerHeight + 4, 587202560);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX, y + 1, scrollerWidth, scrollerHeight + 2, getColor(DrawType.LINE, ButtonState.NORMAL));
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX + 1, y + 2, scrollerWidth - 2, scrollerHeight, getColor(DrawType.BACKGROUND, ButtonState.NORMAL));
RoundedUtils.drawRoundedRect(scrollerX + 2, y + 2, scrollerX + scrollerWidth - 2, y + scrollerHeight, 6, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); RoundedUtils.drawRoundedRect(scrollerX + 2, y + 2, scrollerX + scrollerWidth - 2, y + scrollerHeight, 6, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor());
RoundedUtils.drawGradientRound(scrollerX, newY - 3, scrollerWidth, newSize, 6, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
//RoundedUtils.drawRoundedRect(scrollerX - 3, newY - 3, scrollerWidth + 6, newSize + 6, 12, -1);
RoundedUtils.drawGradientRound(scrollerX, newY - 3, scrollerWidth, newSize, 6,Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor());
//RoundedUtils.drawRoundedRect(scrollerX, newY - 3, scrollerX + scrollerWidth, newY + newSize, 6, -1);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 3, newY - 3, scrollerWidth + 6, newSize + 6, 83886080);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 2, newY - 2, scrollerWidth + 4, newSize + 4, 369098752);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX - 1, newY - 1, scrollerWidth + 2, newSize + 2, 587202560);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX, newY, scrollerWidth, newSize, getColor(DrawType.LINE, scrollerState));
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(scrollerX + 1, newY + 1, scrollerWidth - 2, newSize - 2, getColor(DrawType.BACKGROUND, scrollerState));
} }
} }

View File

@ -67,7 +67,7 @@ public class SearchTextfield extends MenuTextField {
GlStateManager.color(1, 1,1); GlStateManager.color(1, 1,1);
RoundedUtils.drawRoundedRect(x - 4, y - 4, x + width + 5, y + height + 5, 24, 83886080); //RoundedUtils.drawRoundedRect(x - 4, y - 4, x + width + 5, y + height + 5, 24, 83886080);
RoundedUtils.drawRoundedRect(x - 2, y - 2, x + width + 3, y + height + 3, 24, 587202560); RoundedUtils.drawRoundedRect(x - 2, y - 2, x + width + 3, y + height + 3, 24, 587202560);
/*DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 2, y + height + 2, 10, lineColor); /*DrawUtils.drawRoundedRect(x - 1, y - 1, x + width + 2, y + height + 2, 10, lineColor);
@ -107,7 +107,7 @@ public class SearchTextfield extends MenuTextField {
if(comp < index){ if(comp < index){
textToDraw = textToDraw.substring(1); textToDraw = textToDraw.substring(1);
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
labelWidth = (int) rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width(textToDraw + 1); labelWidth = (int) rip.athena.client.utils.font.FontManager.getProductSansLight(30).width(textToDraw + 1);
} else { } else {
labelWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw + 1); labelWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw + 1);
} }
@ -115,7 +115,7 @@ public class SearchTextfield extends MenuTextField {
} else if(comp > index){ } else if(comp > index){
textToDraw = textToDraw.substring(0, textToDraw.length() - 1); textToDraw = textToDraw.substring(0, textToDraw.length() - 1);
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
labelWidth = (int) rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width(textToDraw + 1); labelWidth = (int) rip.athena.client.utils.font.FontManager.getProductSansLight(30).width(textToDraw + 1);
} else { } else {
labelWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw + 1); labelWidth = Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw + 1);
} }
@ -137,7 +137,7 @@ public class SearchTextfield extends MenuTextField {
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
textHeight = (int) FontManager.baloo17.getHeight(textToDraw); textHeight = (int) FontManager.baloo17.getHeight(textToDraw);
drawVerticalLine(x + 10 + (int)rip.athena.client.utils.font.FontManager.getNunito(20).width(textToDraw.substring(0, toRender)) + 1, y + height / 2 - textHeight / 2, textHeight, 1, textColor); drawVerticalLine(x + 10 + (int)rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width(textToDraw.substring(0, toRender)) + 1, y + height / 2 - textHeight / 2, textHeight, 1, textColor);
} else { } else {
textHeight = Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT; textHeight = Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT;
drawVerticalLine(x + 10 + (int)Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw.substring(0, toRender)) + 1, y + height / 2 - textHeight / 2, textHeight, 1, textColor); drawVerticalLine(x + 10 + (int)Minecraft.getMinecraft().fontRendererObj.getStringWidth(textToDraw.substring(0, toRender)) + 1, y + height / 2 - textHeight / 2, textHeight, 1, textColor);
@ -162,7 +162,7 @@ public class SearchTextfield extends MenuTextField {
} }
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getNunito(20).drawString(textToDraw, x + 10 + minOffset + xAdd, y + 2 + (float) height / 2 - (float) (int) rip.athena.client.utils.font.FontManager.getNunito(20).height() / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString(textToDraw, x + 10 + minOffset + xAdd, y + 2 + (float) height / 2 - (float) (int) rip.athena.client.utils.font.FontManager.getNunito(20).height() / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString(textToDraw, x + 10 + minOffset + xAdd, (int) (y + (float) height / 2 - (float) (int) Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2), Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); Minecraft.getMinecraft().fontRendererObj.drawString(textToDraw, x + 10 + minOffset + xAdd, (int) (y + (float) height / 2 - (float) (int) Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2), Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }

View File

@ -9,6 +9,7 @@ import rip.athena.client.ui.framework.draw.ButtonState;
import rip.athena.client.ui.framework.draw.DrawType; import rip.athena.client.ui.framework.draw.DrawType;
import rip.athena.client.ui.clickgui.IngameMenu; import rip.athena.client.ui.clickgui.IngameMenu;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*; import java.awt.*;
@ -44,9 +45,7 @@ public class ProfilesBase extends MenuComponent {
@Override @Override
public void onInitColors() { public void onInitColors() {
setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA)); setColor(DrawType.TEXT, ButtonState.NORMAL, new Color(255, 255, 255, IngameMenu.MENU_ALPHA));
setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, IngameMenu.MENU_ALPHA)); setColor(DrawType.BACKGROUND, ButtonState.NORMAL, new Color(35, 35, 35, IngameMenu.MENU_ALPHA));
setColor(DrawType.LINE, ButtonState.NORMAL, new Color(48, 47, 49, IngameMenu.MENU_ALPHA)); setColor(DrawType.LINE, ButtonState.NORMAL, new Color(48, 47, 49, IngameMenu.MENU_ALPHA));
} }
@ -57,25 +56,12 @@ public class ProfilesBase extends MenuComponent {
int mouseX = parent.getMouseX(); int mouseX = parent.getMouseX();
int width = this.width; int width = this.width;
int lineColor = getColor(DrawType.LINE, ButtonState.NORMAL);
int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL); int textColor = getColor(DrawType.TEXT, ButtonState.NORMAL);
int backgroundColor = getColor(DrawType.BACKGROUND, ButtonState.NORMAL);
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(x, y, width, height, backgroundColor); //RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 12.0f, new Color(50,50,50,255).getRGB());
//RoundedUtils.drawGradientRound(x, y, width, height, 6f, ColorUtil.getClientColor(0, 255), ColorUtil.getClientColor(90, 255), ColorUtil.getClientColor(180, 255), ColorUtil.getClientColor(270, 255));
/*drawHorizontalLine(x, y, width + 1, 1, lineColor);
drawVerticalLine(x, y + 1, height - 1, 1, lineColor);
drawHorizontalLine(x, y + height, width + 1, 1, lineColor);
drawVerticalLine(x + width, y + 1, height - 1, 1, lineColor);*/
/*drawShadowUp(x, y, width + 1);
drawShadowLeft(x, y, height + 1);
drawShadowDown(x, y + height + 1, width + 1);
drawShadowRight(x + width + 1, y, height + 1);*/
RoundedUtils.drawRoundedRect(x, y, x + width, y + height, 12.0f, new Color(50,50,50,255).getRGB());
RoundedUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 12.0f, new Color(35,35,35,255).getRGB()); RoundedUtils.drawRoundedRect(x + 1, y + 1, x + width - 1, y + height - 1, 12.0f, new Color(35,35,35,255).getRGB());
drawText(text, x + width / 2 - getStringWidth(text) / 2, y + 30, textColor); drawText(text, x + width / 2 - getStringWidth(text) / 2, y + 30, textColor);

View File

@ -2,6 +2,7 @@ package rip.athena.client.ui.clickgui.pages;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GlStateManager;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.cosmetics.cape.Cape; import rip.athena.client.cosmetics.cape.Cape;
import rip.athena.client.ui.clickgui.IngameMenu; import rip.athena.client.ui.clickgui.IngameMenu;
@ -12,6 +13,8 @@ import rip.athena.client.ui.clickgui.components.mods.ModScrollPane;
import rip.athena.client.ui.clickgui.pages.cosmetics.CosmeticType; import rip.athena.client.ui.clickgui.pages.cosmetics.CosmeticType;
import rip.athena.client.ui.framework.Menu; import rip.athena.client.ui.framework.Menu;
import java.awt.*;
/** /**
* @author Athena Development * @author Athena Development
* @project Athena-Client * @project Athena-Client
@ -153,8 +156,9 @@ public class CosmeticsPage extends Page {
int x = menu.getX() + menu.getWidth() - width + 20; int x = menu.getX() + menu.getWidth() - width + 20;
int y = menu.getY() + 59; int y = menu.getY() + 59;
int height = 32; int height = 32;
GlStateManager.color(1,1,1);
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
} }
@Override @Override

View File

@ -11,7 +11,7 @@ import rip.athena.client.ui.clickgui.components.mods.MenuModKeybind;
import rip.athena.client.ui.clickgui.components.mods.ModScrollPane; import rip.athena.client.ui.clickgui.components.mods.ModScrollPane;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
import rip.athena.api.macros.Macro; import rip.athena.api.macro.Macro;
import rip.athena.client.modules.other.Settings; import rip.athena.client.modules.other.Settings;
import rip.athena.client.utils.font.FontManager; import rip.athena.client.utils.font.FontManager;
@ -161,26 +161,19 @@ public class MacrosPage extends Page {
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
FontManager.getNunitoBold(30).drawString("MACROS", menu.getX() + 235, menu.getY() + 80, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); FontManager.getNunitoBold(30).drawString("MACROS", menu.getX() + 235, menu.getY() + 80, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString("MACROS", menu.getX() + 235, menu.getY() + 80, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); Minecraft.getMinecraft().fontRendererObj.drawString("MACROS", menu.getX() + 235, menu.getY() + 80, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }
//drawHorizontalLine(menu.getX() + 31, menu.getY() + 110, menu.getWidth() - width - 31 * 2, 3, IngameMenu.MENU_LINE_COLOR);
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, menu.getHeight() - 58, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, height + 1, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("ADD NEW MACRO", menu.getX() + menu.getWidth() - width / 2 - (double) FontManager.getProductSansRegular(30).width("ADD NEW MACRO") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("ADD NEW MACRO", menu.getX() + menu.getWidth() - width / 2 - (double) FontManager.getProductSansRegular(30).width("ADD NEW MACRO") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString("ADD NEW MACRO", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("ADD NEW MACRO") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); Minecraft.getMinecraft().fontRendererObj.drawString("ADD NEW MACRO", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("ADD NEW MACRO") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }
drawShadowDown(menu.getX() + menu.getWidth() - width, y - 1, width);
y += 60; y += 60;

View File

@ -68,7 +68,7 @@ public class ModsPage extends Page {
int height = 32; int height = 32;
GlStateManager.color(1,1,1); GlStateManager.color(1,1,1);
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
y += 50; y += 50;
@ -79,7 +79,7 @@ public class ModsPage extends Page {
} }
y = menu.getY() + menu.getHeight() - height; y = menu.getY() + menu.getHeight() - height;
drawShadowUp(menu.getX(), y - 10, 215); //drawShadowUp(menu.getX(), y - 10, 215);
if (modCategory != null) { if (modCategory != null) {
if (Settings.customGuiFont) { if (Settings.customGuiFont) {
@ -89,17 +89,6 @@ public class ModsPage extends Page {
mc.fontRendererObj.drawString(activeModule != null ? "SETTINGS | " : modCategory.getText(), menu.getX() + 255, menu.getY() + 25, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor()); mc.fontRendererObj.drawString(activeModule != null ? "SETTINGS | " : modCategory.getText(), menu.getX() + 255, menu.getY() + 25, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getTextColor());
} }
if (activeModule != null) { if (activeModule != null) {
int offset = (int) rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width("SETTINGS | ");
String text = activeModule.getName().toUpperCase().trim();
//drawShadowUp(menu.getX() + 255, menu.getY() + 110 + 25 + 2, menu.getWidth() - 286);
//drawShadowLeft(menu.getX() + 255 + 2, menu.getY() + 110 + 25, menu.getHeight() - 110 - 50 - 5);
//drawShadowDown(menu.getX() + 255, menu.getY() + menu.getHeight() - 27 - 5, menu.getWidth() - 286);
//drawShadowRight(menu.getX() + menu.getWidth() - 33, menu.getY() + 110 + 25, menu.getHeight() - 110 - 50 - 5);
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + 255, menu.getY() + 110 + 25, menu.getWidth() - 255 - 31, menu.getHeight() - 110 - 50 - 5, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor());
//rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX() + 255 + 1, menu.getY() + 110 + 25 + 1, menu.getWidth() - 255 - 33, menu.getHeight() - 110 - 52 - 5, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor());
if (activeModule instanceof Crosshair) { if (activeModule instanceof Crosshair) {
Crosshair crosshair = (Crosshair) activeModule; Crosshair crosshair = (Crosshair) activeModule;
int w = 86; int w = 86;
@ -219,7 +208,15 @@ public class ModsPage extends Page {
ModScrollPane pane = new ModScrollPane(255, 140, menu.getWidth() - 255 - 32, menu.getHeight() - 141, false); ModScrollPane pane = new ModScrollPane(255, 140, menu.getWidth() - 255 - 32, menu.getHeight() - 141, false);
menu.addComponent(pane); menu.addComponent(pane);
menu.addComponent(new ModCategoryButton("EDIT HUD", new ResourceLocation("Athena/gui/menu/edit.png"), 0, menu.getHeight() - height - 5, 225, height) { int width = 225;
int x2 = 0;
if(Settings.smallBar) {
width = 40;
x2 = 152;
}
menu.addComponent(new ModCategoryButton("EDIT HUD", new ResourceLocation("Athena/gui/menu/edit.png"), x2, menu.getHeight() - height - 5, width, height) {
@Override @Override
public void onAction() { public void onAction() {
setActive(false); setActive(false);
@ -261,7 +258,7 @@ public class ModsPage extends Page {
if (configEntry instanceof BooleanEntry) { if (configEntry instanceof BooleanEntry) {
BooleanEntry entry = (BooleanEntry) configEntry; BooleanEntry entry = (BooleanEntry) configEntry;
MenuModCheckbox checkbox = new MenuModCheckbox(0, 0, 15, 15) { MenuModCheckbox checkbox = new MenuModCheckbox(0, 0, 30, 15) {
@Override @Override
public void onAction() { public void onAction() {
entry.setValue(activeModule, isChecked()); entry.setValue(activeModule, isChecked());
@ -274,7 +271,7 @@ public class ModsPage extends Page {
} else if (configEntry instanceof ColorEntry) { } else if (configEntry instanceof ColorEntry) {
ColorEntry entry = (ColorEntry) configEntry; ColorEntry entry = (ColorEntry) configEntry;
toAdd.add(new MenuModColorPicker(0, 0, 15, 15, ((Color) entry.getValue(activeModule)).getRGB()) { toAdd.add(new MenuModColorPicker(0, 0, 35, 20, ((Color) entry.getValue(activeModule)).getRGB()) {
@Override @Override
public void onAction() { public void onAction() {
entry.setValue(activeModule, getColor()); entry.setValue(activeModule, getColor());

View File

@ -233,19 +233,14 @@ public class ProfilesPage extends Page {
int y = menu.getY() + 59; int y = menu.getY() + 59;
int height = 32; int height = 32;
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getNunitoBold(30).drawString("PROFILES", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR); rip.athena.client.utils.font.FontManager.getNunitoBold(30).drawString("PROFILES", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
} else { } else {
Minecraft.getMinecraft().fontRendererObj.drawString("PROFILES", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR); Minecraft.getMinecraft().fontRendererObj.drawString("PROFILES", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
} }
//drawHorizontalLine(menu.getX() + 31, menu.getY() + 110, menu.getWidth() - width - 31 * 2, 3, IngameMenu.MENU_LINE_COLOR);
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("CREATE NEW PROFILE", menu.getX() + menu.getWidth() - (float) width / 2 - rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width("CREATE NEW PROFILE") / 2, y + (float) height / 2 - FontManager.baloo17.getHeight("CREATE NEW PROFILE") / 2, IngameMenu.MENU_HEADER_TEXT_COLOR); rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("CREATE NEW PROFILE", menu.getX() + menu.getWidth() - (float) width / 2 - rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width("CREATE NEW PROFILE") / 2, y + (float) height / 2 - FontManager.baloo17.getHeight("CREATE NEW PROFILE") / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
@ -253,8 +248,6 @@ public class ProfilesPage extends Page {
mc.fontRendererObj.drawString("CREATE NEW PROFILE", (int) (menu.getX() + menu.getWidth() - (float) width / 2 - mc.fontRendererObj.getStringWidth("CREATE NEW PROFILE") / 2), (int) (y + (float) height / 2 - mc.fontRendererObj.FONT_HEIGHT / 2), IngameMenu.MENU_HEADER_TEXT_COLOR); mc.fontRendererObj.drawString("CREATE NEW PROFILE", (int) (menu.getX() + menu.getWidth() - (float) width / 2 - mc.fontRendererObj.getStringWidth("CREATE NEW PROFILE") / 2), (int) (y + (float) height / 2 - mc.fontRendererObj.FONT_HEIGHT / 2), IngameMenu.MENU_HEADER_TEXT_COLOR);
} }
drawShadowDown(menu.getX() + menu.getWidth() - width, y - 1, width);
y += 60; y += 60;
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
@ -265,10 +258,6 @@ public class ProfilesPage extends Page {
y += 120; y += 120;
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, y, width, height + 1, ModCategoryButton.MAIN_COLOR);
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
drawShadowUp(menu.getX() + menu.getWidth() - width, y, width);
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("DOWNLOAD PROFILE", menu.getX() + menu.getWidth() - (float) width / 2 - rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width("DOWNLOAD PROFILE") / 2, y + (float) height / 2 - FontManager.baloo17.getHeight("DOWNLOAD PROFILE") / 2, IngameMenu.MENU_HEADER_TEXT_COLOR); rip.athena.client.utils.font.FontManager.getProductSansRegular(30).drawString("DOWNLOAD PROFILE", menu.getX() + menu.getWidth() - (float) width / 2 - rip.athena.client.utils.font.FontManager.getProductSansRegular(30).width("DOWNLOAD PROFILE") / 2, y + (float) height / 2 - FontManager.baloo17.getHeight("DOWNLOAD PROFILE") / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
} else { } else {

View File

@ -283,7 +283,7 @@ public class SettingsPage extends Page {
int y = menu.getY() + 59; int y = menu.getY() + 59;
int height = 32; int height = 32;
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
/*rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR); /*rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR); rip.athena.client.gui.framework.draw.DrawImpl.drawRect(menu.getX(), menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
@ -747,7 +747,7 @@ public class SettingsPage extends Page {
if(configEntry instanceof BooleanEntry) { if(configEntry instanceof BooleanEntry) {
BooleanEntry entry = (BooleanEntry) configEntry; BooleanEntry entry = (BooleanEntry) configEntry;
MenuModCheckbox checkbox = new MenuModCheckbox(0, 0, 15, 15) { MenuModCheckbox checkbox = new MenuModCheckbox(0, 0, 30, 15) {
@Override @Override
public void onAction() { public void onAction() {
entry.setValue(module, isChecked()); entry.setValue(module, isChecked());

View File

@ -56,7 +56,7 @@ public class ThemesPage extends Page {
RoundedUtils.drawGradientRound(menu.getX() + 295, menu.getY() + 110, menu.getWidth() / 4, 20, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor()); RoundedUtils.drawGradientRound(menu.getX() + 295, menu.getY() + 110, menu.getWidth() / 4, 20, 6, Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getFirstColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor(), Athena.INSTANCE.getThemeManager().getTheme().getSecondColor());
RoundedUtils.drawGradientRound(menu.getX() + 595, menu.getY() + 110, menu.getWidth() / 4, 20, 6, new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor())); RoundedUtils.drawGradientRound(menu.getX() + 595, menu.getY() + 110, menu.getWidth() / 4, 20, 6, new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getFirstColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()), new Color(Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()));
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
} }

View File

@ -204,7 +204,7 @@ public class WaypointsPage extends Page {
int y = menu.getY() + 59; int y = menu.getY() + 59;
int height = 32; int height = 32;
drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, Athena.INSTANCE.getThemeManager().getPrimaryTheme().getSecondColor()); drawVerticalLine(menu.getX() + 215, y + height - 30, height + 432, 3, new Color(0,0,0,0).getRGB());
if(Settings.customGuiFont) { if(Settings.customGuiFont) {
FontManager.vision16.drawString("WAYPOINTS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR); FontManager.vision16.drawString("WAYPOINTS", menu.getX() + 235, menu.getY() + 80, IngameMenu.MENU_HEADER_TEXT_COLOR);
@ -213,14 +213,8 @@ public class WaypointsPage extends Page {
} }
//drawHorizontalLine(menu.getX() + 31, menu.getY() + 110, menu.getWidth() - width - 31 * 2, 3, IngameMenu.MENU_LINE_COLOR); //drawHorizontalLine(menu.getX() + 31, menu.getY() + 110, menu.getWidth() - width - 31 * 2, 3, IngameMenu.MENU_LINE_COLOR);
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, menu.getHeight() - 58, MacrosPage.MENU_SIDE_BG_COLOR);
rip.athena.client.ui.framework.draw.DrawImpl.drawRect(menu.getX() + menu.getWidth() - width, menu.getY() + 58, width, height + 1, ModCategoryButton.MAIN_COLOR);
drawShadowDown(menu.getX() + menu.getWidth() - width, y + height, width);
Minecraft.getMinecraft().fontRendererObj.drawString("ADD NEW WAYPOINT", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("ADD NEW WAYPOINT") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, IngameMenu.MENU_HEADER_TEXT_COLOR); Minecraft.getMinecraft().fontRendererObj.drawString("ADD NEW WAYPOINT", menu.getX() + menu.getWidth() - width / 2 - Minecraft.getMinecraft().fontRendererObj.getStringWidth("ADD NEW WAYPOINT") / 2, y + height / 2 - Minecraft.getMinecraft().fontRendererObj.FONT_HEIGHT / 2, IngameMenu.MENU_HEADER_TEXT_COLOR);
drawShadowDown(menu.getX() + menu.getWidth() - width, y - 1, width);
y += 60; y += 60;
Minecraft.getMinecraft().fontRendererObj.drawString("ENTER NAME", x, y, IngameMenu.MENU_HEADER_TEXT_COLOR); Minecraft.getMinecraft().fontRendererObj.drawString("ENTER NAME", x, y, IngameMenu.MENU_HEADER_TEXT_COLOR);

View File

@ -305,7 +305,6 @@ public class MenuScrollPane extends MenuComponent {
} }
} }
Collections.sort(components, (a, b) -> Integer.compare(a.getPriority().getPriority(), b.getPriority().getPriority())); Collections.sort(components, (a, b) -> Integer.compare(a.getPriority().getPriority(), b.getPriority().getPriority()));
Collections.reverse(components); Collections.reverse(components);

View File

@ -5,14 +5,13 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import org.lwjgl.input.Mouse; import org.lwjgl.input.Mouse;
import rip.athena.api.module.Module;
import rip.athena.client.Athena;
import rip.athena.api.config.save.Config; import rip.athena.api.config.save.Config;
import rip.athena.api.font.FontManager; import rip.athena.api.font.FontManager;
import rip.athena.api.module.Module;
import rip.athena.client.Athena;
import rip.athena.client.modules.render.GUIMod;
import rip.athena.client.ui.framework.MinecraftMenuImpl; import rip.athena.client.ui.framework.MinecraftMenuImpl;
import rip.athena.client.ui.framework.draw.DrawImpl; import rip.athena.client.ui.framework.draw.DrawImpl;
import rip.athena.client.modules.render.GUIMod;
import rip.athena.client.utils.render.AssetUtils;
import java.awt.*; import java.awt.*;
import java.io.IOException; import java.io.IOException;
@ -25,7 +24,6 @@ import java.io.IOException;
public class HUDEditor extends MinecraftMenuImpl implements DrawImpl { public class HUDEditor extends MinecraftMenuImpl implements DrawImpl {
private final static rip.athena.client.ui.framework.Menu menu = new rip.athena.client.ui.framework.Menu("", Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight); private final static rip.athena.client.ui.framework.Menu menu = new rip.athena.client.ui.framework.Menu("", Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);
private final static ResourceLocation SETTINGS = AssetUtils.getResource("/gui/settings.png");
private final static int HELPER = new Color(200, 200, 200, 150).getRGB(); private final static int HELPER = new Color(200, 200, 200, 150).getRGB();
@ -321,14 +319,14 @@ public class HUDEditor extends MinecraftMenuImpl implements DrawImpl {
if(xDelta < 0) { if(xDelta < 0) {
xDelta = 0; xDelta = 0;
} else if(xDelta + selected.getWidth() * selected.getScale() > menu.getWidth() / SCALE) { } else if(xDelta + selected.getWidth() * selected.getScale() > (double) menu.getWidth() / SCALE) {
xDelta = Math.round(menu.getWidth() / SCALE - selected.getWidth() * (float)selected.getScale()); xDelta = Math.round((float) menu.getWidth() / SCALE - selected.getWidth() * (float)selected.getScale());
} }
if(yDelta < 0) { if(yDelta < 0) {
yDelta = 0; yDelta = 0;
} else if(yDelta + selected.getHeight() * selected.getScale() > menu.getHeight() / SCALE) { } else if(yDelta + selected.getHeight() * selected.getScale() > (double) menu.getHeight() / SCALE) {
yDelta = Math.round(menu.getHeight() / SCALE - selected.getHeight() * (float)selected.getScale()); yDelta = Math.round((float) menu.getHeight() / SCALE - selected.getHeight() * (float)selected.getScale());
} }
selected.setX(xDelta); selected.setX(xDelta);
@ -349,7 +347,7 @@ public class HUDEditor extends MinecraftMenuImpl implements DrawImpl {
@Override @Override
public int getStringWidth(String string) { public int getStringWidth(String string) {
return (int) rip.athena.client.utils.font.FontManager.getProductSansRegular(25).width(string); return rip.athena.client.utils.font.FontManager.getProductSansRegular(25).width(string);
} }
@Override @Override

View File

@ -1,5 +1,7 @@
package rip.athena.client.ui.hud; package rip.athena.client.ui.hud;
import lombok.Getter;
import lombok.Setter;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
/** /**
@ -8,15 +10,19 @@ import rip.athena.api.module.Module;
* @date 6/2/2023 * @date 6/2/2023
*/ */
@Setter
@Getter
public abstract class HUDElement implements IHUD { public abstract class HUDElement implements IHUD {
private Module parent; private Module parent;
private String identifier; private String identifier;
private int x;
private int y; private boolean visible;
private double scale;
private int width; private int width;
private int height; private int height;
private double scale; private int x;
private boolean visible; private int y;
public HUDElement(String identifier, int width, int height) { public HUDElement(String identifier, int width, int height) {
this.identifier = identifier; this.identifier = identifier;
@ -25,68 +31,4 @@ public abstract class HUDElement implements IHUD {
this.scale = 1; this.scale = 1;
this.visible = true; this.visible = true;
} }
public Module getParent() {
return parent;
}
public void setParent(Module parent) {
this.parent = parent;
}
public String getIdentifier() {
return identifier;
}
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
public int getWidth() {
return width;
}
public void setWidth(int width) {
this.width = width;
}
public int getHeight() {
return height;
}
public void setHeight(int height) {
this.height = height;
}
public double getScale() {
return scale;
}
public void setScale(double scale) {
this.scale = scale;
}
public boolean isVisible() {
return visible;
}
public void setVisible(boolean visible) {
this.visible = visible;
}
} }

View File

@ -5,9 +5,9 @@ import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -19,7 +19,7 @@ import java.util.List;
*/ */
public class HUDManager { public class HUDManager {
private List<HUDElement> elements; private final List<HUDElement> elements;
public HUDManager() { public HUDManager() {
elements = new ArrayList<>(); elements = new ArrayList<>();

View File

@ -1,26 +1,8 @@
package rip.athena.client.ui.menu; package rip.athena.client.ui.menu;
import net.minecraft.client.gui.*;
import java.awt.Color;
import java.awt.Desktop;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.List;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.io.Charsets;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.opengl.GLContext;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.*;
import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.texture.DynamicTexture; import net.minecraft.client.renderer.texture.DynamicTexture;
@ -31,6 +13,10 @@ import net.minecraft.util.ResourceLocation;
import net.minecraft.world.demo.DemoWorldServer; import net.minecraft.world.demo.DemoWorldServer;
import net.minecraft.world.storage.ISaveFormat; import net.minecraft.world.storage.ISaveFormat;
import net.minecraft.world.storage.WorldInfo; import net.minecraft.world.storage.WorldInfo;
import org.apache.commons.io.Charsets;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.opengl.GLContext;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.ui.menu.altmanager.GuiAccountManager; import rip.athena.client.ui.menu.altmanager.GuiAccountManager;
import rip.athena.client.ui.menu.altmanager.GuiAltManager; import rip.athena.client.ui.menu.altmanager.GuiAltManager;
@ -41,6 +27,14 @@ import rip.athena.client.utils.render.ColorUtil;
import rip.athena.client.utils.render.DrawUtils; import rip.athena.client.utils.render.DrawUtils;
import rip.athena.client.utils.render.RoundedUtils; import rip.athena.client.utils.render.RoundedUtils;
import java.awt.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URI;
import java.util.List;
import java.util.Random;
/** /**
* @author Athena Development * @author Athena Development
* @project Athena-Client * @project Athena-Client
@ -48,24 +42,16 @@ import rip.athena.client.utils.render.RoundedUtils;
*/ */
public class AthenaMenu extends GuiScreen implements GuiYesNoCallback public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
{ {
private static final AtomicInteger field_175373_f = new AtomicInteger(0);
private static final Logger logger = LogManager.getLogger(); private static final Logger logger = LogManager.getLogger();
private static final Random RANDOM = new Random(); private static final Random RANDOM = new Random();
private float updateCounter;
private String splashText; private String splashText;
private int panoramaTimer;
private DynamicTexture viewportTexture; private DynamicTexture viewportTexture;
private boolean field_175375_v = true;
private final Object threadLock = new Object(); private final Object threadLock = new Object();
private String openGLWarning1; private String openGLWarning1;
private String openGLWarning2; private String openGLWarning2;
private String openGLWarningLink; private String openGLWarningLink;
private static final ResourceLocation splashTexts = new ResourceLocation("texts/splashes.txt"); private static final ResourceLocation splashTexts = new ResourceLocation("texts/splashes.txt");
private static final ResourceLocation minecraftTitleTextures = new ResourceLocation("textures/gui/title/minecraft.png");
private static final ResourceLocation[] titlePanoramaPaths = new ResourceLocation[] {new ResourceLocation("Athena/menu/panorama_0.png"), new ResourceLocation("Athena/menu/panorama_1.png"), new ResourceLocation("Athena/menu/panorama_2.png"), new ResourceLocation("Athena/menu/panorama_3.png"), new ResourceLocation("Athena/menu/panorama_4.png"), new ResourceLocation("Athena/menu/panorama_5.png")};
public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information."; public static final String field_96138_a = "Please click " + EnumChatFormatting.UNDERLINE + "here" + EnumChatFormatting.RESET + " for more information.";
private int field_92024_r;
private int field_92023_s;
private int field_92022_t; private int field_92022_t;
private int field_92021_u; private int field_92021_u;
private int field_92020_v; private int field_92020_v;
@ -76,9 +62,6 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
private GuiScreen field_183503_M; private GuiScreen field_183503_M;
public Animation introAnimation; public Animation introAnimation;
public boolean closeIntro;
private CloseType closeType;
public AthenaMenu() public AthenaMenu()
{ {
@ -89,7 +72,7 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
try try
{ {
List<String> list = Lists.<String>newArrayList(); List<String> list = Lists.newArrayList();
bufferedreader = new BufferedReader(new InputStreamReader(Minecraft.getMinecraft().getResourceManager().getResource(splashTexts).getInputStream(), Charsets.UTF_8)); bufferedreader = new BufferedReader(new InputStreamReader(Minecraft.getMinecraft().getResourceManager().getResource(splashTexts).getInputStream(), Charsets.UTF_8));
String s; String s;
@ -115,27 +98,18 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
} }
} }
} }
} } catch (IOException ignored) {}
catch (IOException var12) finally {
{
;
}
finally
{
if (bufferedreader != null) if (bufferedreader != null)
{ {
try try
{ {
bufferedreader.close(); bufferedreader.close();
} }
catch (IOException var11) catch (IOException ignored) {}
{
;
}
} }
} }
this.updateCounter = RANDOM.nextFloat();
this.openGLWarning1 = ""; this.openGLWarning1 = "";
if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported()) if (!GLContext.getCapabilities().OpenGL20 && !OpenGlHelper.areShadersSupported())
@ -144,12 +118,6 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
this.openGLWarning2 = I18n.format("title.oldgl2", new Object[0]); this.openGLWarning2 = I18n.format("title.oldgl2", new Object[0]);
this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game"; this.openGLWarningLink = "https://help.mojang.com/customer/portal/articles/325948?ref=game";
} }
}
public void updateScreen()
{
++this.panoramaTimer;
} }
public boolean doesGuiPauseGame() public boolean doesGuiPauseGame()
@ -173,20 +141,18 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
int j = this.height / 4 + 78; int j = this.height / 4 + 78;
{ {
this.addSingleplayerMultiplayerButtons(j, 24); this.addSingleplayerMultiplayerButtons(j, 24);
} }
this.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 - 24, 98, 20, I18n.format("menu.options", new Object[0]))); this.buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 72 - 24, 98, 20, I18n.format("menu.options", new Object[0])));
this.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 - 24, 98, 20, "Store")); this.buttonList.add(new GuiButton(4, this.width / 2 + 2, j + 72 - 24, 98, 20, "Store"));
} }
private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_) private void addSingleplayerMultiplayerButtons(int p_73969_1_, int p_73969_2_)
{ {
this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer", new Object[0]))); this.buttonList.add(new GuiButton(1, this.width / 2 - 100, p_73969_1_, I18n.format("menu.singleplayer")));
this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.format("menu.multiplayer", new Object[0]))); this.buttonList.add(new GuiButton(2, this.width / 2 - 100, p_73969_1_ + p_73969_2_, I18n.format("menu.multiplayer")));
// this.buttonList.add(this.realmsButton = new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0]).replace("Minecraft", "").trim())); // this.buttonList.add(this.realmsButton = new GuiButton(14, this.width / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.format("menu.online", new Object[0]).replace("Minecraft", "").trim()));
} }
@ -222,7 +188,7 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
if (Desktop.isDesktopSupported()) { if (Desktop.isDesktopSupported()) {
Desktop.getDesktop().browse(new URI("http://store.athena.rip")); Desktop.getDesktop().browse(new URI("http://store.athena.rip"));
} }
} catch (Exception e){} } catch (Exception ignored){}
} }
if (button.id == 11) if (button.id == 11)
@ -265,12 +231,12 @@ public class AthenaMenu extends GuiScreen implements GuiYesNoCallback
try try
{ {
Class<?> oclass = Class.forName("java.awt.Desktop"); Class<?> oclass = Class.forName("java.awt.Desktop");
Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null, new Object[0]); Object object = oclass.getMethod("getDesktop", new Class[0]).invoke((Object)null);
oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new Object[] {new URI(this.openGLWarningLink)}); oclass.getMethod("browse", new Class[] {URI.class}).invoke(object, new URI(this.openGLWarningLink));
} }
catch (Throwable throwable) catch (Throwable throwable)
{ {
logger.error("Couldn\'t open link", throwable); logger.error("Couldn't open link", throwable);
} }
} }

View File

@ -1,10 +0,0 @@
package rip.athena.client.ui.menu;
/**
* @author Athena Development
* @project Athena-Client
* @date 6/10/2023
*/
public enum CloseType {
ACCOUNT, CREDIT;
}

View File

@ -265,7 +265,7 @@ public class GuiAccountManager extends GuiScreen {
} }
} }
scrollAnimation.setAnimation((float) scrollY, 16); scrollAnimation.setAnimation((float) scrollY, 10);
if(delete) { if(delete) {
Athena.INSTANCE.getAccountManager().getAccounts().remove(deleteAccount); Athena.INSTANCE.getAccountManager().getAccounts().remove(deleteAccount);

View File

@ -12,7 +12,7 @@ public class NotiRemovalThread implements Runnable {
@Override @Override
public void run() { public void run() {
while(true) { while(true) {
notifications.removeIf(noti -> noti.isDead()); notifications.removeIf(Notification::isDead);
try { try {
Thread.sleep(500); Thread.sleep(500);

View File

@ -24,7 +24,7 @@ public class Notification {
public Notification(String text, Color color) { public Notification(String text, Color color) {
this.text = text; this.text = text;
this.color = color; this.color = color;
start = System.currentTimeMillis(); this.start = System.currentTimeMillis();
} }
public String getText() { public String getText() {

View File

@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.render.RenderEvent; import rip.athena.client.events.render.RenderEvent;
import rip.athena.client.events.types.render.RenderType; import rip.athena.client.events.render.RenderType;
import java.awt.*; import java.awt.*;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -16,11 +16,11 @@ public class MouseUtils {
public static Scroll scroll() { public static Scroll scroll() {
int mouse = Mouse.getDWheel(); int mouse = Mouse.getDWheel();
if(mouse > 0) { if (mouse > 0) {
return Scroll.UP; return Scroll.UP;
}else if(mouse < 0) { } else if (mouse < 0) {
return Scroll.DOWN; return Scroll.DOWN;
}else { } else {
return null; return null;
} }
} }

View File

@ -8,11 +8,11 @@ import java.text.DecimalFormat;
* @date 6/10/2023 * @date 6/10/2023
*/ */
public class NumberUtils { public class NumberUtils {
public static enum Format { public enum Format {
Ones, Tenths, Hundredths; Ones, Tenths, Hundredths;
} }
public static String getStringValueOfLong(long value, Format format) { public static String getStringValueOfLong(long value, Format format) {
return String.valueOf((new DecimalFormat(getDecimalFormat(format))).format(value)); return (new DecimalFormat(getDecimalFormat(format))).format(value);
} }
public static String getStringValueOfFloat(float value, Format format) { public static String getStringValueOfFloat(float value, Format format) {
return String.valueOf((new DecimalFormat(getDecimalFormat(format))).format(value)); return String.valueOf((new DecimalFormat(getDecimalFormat(format))).format(value));

View File

@ -4,6 +4,7 @@ import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.ThreadContext; import org.apache.logging.log4j.ThreadContext;
import rip.athena.client.Athena;
/** /**
* @author Athena Development * @author Athena Development
@ -52,4 +53,14 @@ public class PrefixedLogger {
logger.log(Level.ERROR, "[{}] {}", ThreadContext.get("LOG_PREFIX"), message); logger.log(Level.ERROR, "[{}] {}", ThreadContext.get("LOG_PREFIX"), message);
} }
/**
* Logs a debug message.
*
* @param message The message to log.
*/
public void debug(String message) {
if(Athena.INSTANCE.isDebug()) {
logger.log(Level.DEBUG, "[{}] {}", ThreadContext.get("LOG_PREFIX"), message);
}
}
} }

View File

@ -107,5 +107,4 @@ public class StringUtils {
} }
return s; return s;
} }
} }

View File

@ -24,6 +24,7 @@ public class DiscordRPC {
private Core core; private Core core;
public DiscordRPC() { public DiscordRPC() {
if(System.getProperty("os.name").equalsIgnoreCase("win")) {
try { try {
File discordLibrary = downloadNativeLibrary(); File discordLibrary = downloadNativeLibrary();
if (discordLibrary == null) { if (discordLibrary == null) {
@ -38,6 +39,7 @@ public class DiscordRPC {
e.printStackTrace(); e.printStackTrace();
} }
} }
}
public static File downloadNativeLibrary() throws IOException { public static File downloadNativeLibrary() throws IOException {
// Find out which name Discord's library has (.dll for Windows, .so for Linux) // Find out which name Discord's library has (.dll for Windows, .so for Linux)

View File

@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiScreen;
import rip.athena.api.module.Module; import rip.athena.api.module.Module;
import rip.athena.client.Athena; import rip.athena.client.Athena;
import rip.athena.client.events.SubscribeEvent; import rip.athena.api.event.SubscribeEvent;
import rip.athena.client.events.types.input.KeyDownEvent; import rip.athena.client.events.input.KeyDownEvent;
import rip.athena.client.events.types.input.KeyUpEvent; import rip.athena.client.events.input.KeyUpEvent;
import rip.athena.client.modules.render.GUIMod; import rip.athena.client.modules.render.GUIMod;
import java.util.stream.Collectors; import java.util.stream.Collectors;

Some files were not shown because too many files have changed in this diff Show More