mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 05:41:31 +01:00
Better Hit Color
This commit is contained in:
parent
fa8199d82d
commit
9e45afdb35
@ -197,6 +197,7 @@ public class GuiColorPicker extends SilentScreen {
|
||||
protected void keyTyped(char typedChar, int keyCode) throws IOException {
|
||||
if (keyCode == Keyboard.KEY_ESCAPE) {
|
||||
ClickGUI.close = true;
|
||||
Client.getInstance().configManager.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
package net.silentclient.client.mods.render;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.silentclient.client.Client;
|
||||
import net.silentclient.client.event.EventTarget;
|
||||
import net.silentclient.client.event.impl.EventHitOverlay;
|
||||
import net.silentclient.client.mods.Mod;
|
||||
import net.silentclient.client.mods.ModCategory;
|
||||
|
||||
import java.awt.*;
|
||||
|
||||
public class HitColorMod extends Mod {
|
||||
public HitColorMod() {
|
||||
super("Hit Color", ModCategory.MODS, "silentclient/icons/mods/hitcolor.png");
|
||||
@ -15,17 +15,16 @@ public class HitColorMod extends Mod {
|
||||
|
||||
@Override
|
||||
public void setup() {
|
||||
this.addSliderSetting("Alpha", this, 0.8, 0, 1, false);
|
||||
this.addColorSetting("Color", this, new Color(255, 0, 0), 76);
|
||||
}
|
||||
|
||||
@EventTarget
|
||||
public void onHitOverlay(EventHitOverlay event) {
|
||||
Color color = new Color(1, 0, 0, 0.3F);
|
||||
float alpha = (float) Client.getInstance().getSettingsManager().getSettingByName(this, "Alpha").getValDouble();
|
||||
Color color = Client.getInstance().getSettingsManager().getSettingByName(this, "Color").getValColor();
|
||||
|
||||
event.setRed(color.getRed() / 255F);
|
||||
event.setGreen(color.getGreen() / 255F);
|
||||
event.setBlue(color.getBlue() / 255F);
|
||||
event.setAlpha(alpha);
|
||||
event.setAlpha(color.getAlpha() / 255F);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user