Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoTotem in pvp info #321

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import me.ionar.salhack.module.combat.AutoCrystalRewrite;
import me.ionar.salhack.module.combat.AutoTrap;
import me.ionar.salhack.module.combat.KillAuraModule;
import me.ionar.salhack.module.combat.AutoTotemModule;
import me.ionar.salhack.module.movement.SpeedModule;
import me.ionar.salhack.util.render.RenderUtil;

Expand All @@ -22,13 +23,16 @@ public PvPInfoComponent()
_autoTrap = (AutoTrap)ModuleManager.Get().GetMod(AutoTrap.class);
_speed = (SpeedModule)ModuleManager.Get().GetMod(SpeedModule.class);
_autoCrystalRewrite = (AutoCrystalRewrite)ModuleManager.Get().GetMod(AutoCrystalRewrite.class);
_autoTotem = (AutoTotemModule)ModuleManager.Get().GetMod(AutoTotemModule.class);

}

private KillAuraModule _killAura;
private AutoCrystalModule _autoCrystal;
private AutoTrap _autoTrap;
private SpeedModule _speed;
private AutoCrystalRewrite _autoCrystalRewrite;
private AutoTotemModule _autoTotem;

@Override
public void render(int p_MouseX, int p_MouseY, float p_PartialTicks)
Expand All @@ -39,13 +43,15 @@ public void render(int p_MouseX, int p_MouseY, float p_PartialTicks)
final String crystal = ChatFormatting.GRAY + "CA " + ChatFormatting.WHITE + ((_autoCrystal.isEnabled() || _autoCrystalRewrite.isEnabled()) ? ChatFormatting.GREEN + "ON" : ChatFormatting.RED + "OFF");
final String autoTrap = ChatFormatting.GRAY + "AT " + ChatFormatting.WHITE + (_autoTrap.isEnabled() ? ChatFormatting.GREEN + "ON" : ChatFormatting.RED + "OFF");
final String speed = ChatFormatting.GRAY + "S " + ChatFormatting.WHITE + (_speed.isEnabled() ? ChatFormatting.GREEN + "ON" : ChatFormatting.RED + "OFF");
final String autoTotem = ChatFormatting.GRAY + "T " + ChatFormatting.WHITE + (_autoTotem.isEnabled() ? ChatFormatting.GREEN + "ON" : ChatFormatting.RED + "OFF");

RenderUtil.drawStringWithShadow(aura, GetX(), GetY(), -1);
RenderUtil.drawStringWithShadow(crystal, GetX(), GetY()+12, -1);
RenderUtil.drawStringWithShadow(autoTrap, GetX(), GetY()+24, -1);
RenderUtil.drawStringWithShadow(speed, GetX(), GetY()+36, -1);
RenderUtil.drawStringWithShadow(autoTotem, GetX(), GetY()+48, -1);

SetWidth(RenderUtil.getStringWidth(aura));
SetHeight(RenderUtil.getStringHeight(crystal)+RenderUtil.getStringHeight(aura)+RenderUtil.getStringHeight(autoTrap)+RenderUtil.getStringHeight(speed));
SetHeight(RenderUtil.getStringHeight(crystal)+RenderUtil.getStringHeight(aura)+RenderUtil.getStringHeight(autoTrap)+RenderUtil.getStringHeight(speed)+RenderUtil.getStringHeight(autoTotem));
}
}