start of hud rework
This commit is contained in:
parent
a3e7e885ac
commit
9ab102a648
12 changed files with 98 additions and 91 deletions
|
@ -18,6 +18,7 @@ public abstract class Module
|
|||
public Category category;
|
||||
public boolean enabled;
|
||||
public ArrayList<Setting> settings;
|
||||
public boolean showEditButton;
|
||||
|
||||
public BooleanSetting showInModulesList = new BooleanSetting("Show in Modules List", true);
|
||||
public KeycodeSetting keybind = new KeycodeSetting("Keybind", 0);
|
||||
|
|
|
@ -14,7 +14,7 @@ public class ModuleManager
|
|||
registerModules(
|
||||
new Fly(),
|
||||
new NoFall(),
|
||||
new HUDModule(),
|
||||
new HUDEnabler(),
|
||||
new Step(),
|
||||
new Fullbright(),
|
||||
new Speed(),
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
package me.kawaiizenbo.moonlight.module.modules;
|
||||
|
||||
import me.kawaiizenbo.moonlight.module.Category;
|
||||
import me.kawaiizenbo.moonlight.module.Module;
|
||||
import me.kawaiizenbo.moonlight.module.settings.BooleanSetting;
|
||||
|
||||
public class HUDEnabler extends Module
|
||||
{
|
||||
public BooleanSetting legacyHud = new BooleanSetting("Legacy HUD", true);
|
||||
|
||||
public HUDEnabler()
|
||||
{
|
||||
super("HUD", "The Moonlight HUD.", Category.RENDER);
|
||||
this.enabled = true;
|
||||
this.showInModulesList.value = false;
|
||||
this.showEditButton = true;
|
||||
settings.add(legacyHud);
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
package me.kawaiizenbo.moonlight.module.modules;
|
||||
|
||||
import me.kawaiizenbo.moonlight.Moonlight;
|
||||
import me.kawaiizenbo.moonlight.module.Category;
|
||||
import me.kawaiizenbo.moonlight.module.Module;
|
||||
import me.kawaiizenbo.moonlight.module.settings.BooleanSetting;
|
||||
import me.kawaiizenbo.moonlight.module.settings.DoubleSetting;
|
||||
import me.kawaiizenbo.moonlight.ui.HUDOverlay;
|
||||
import me.kawaiizenbo.moonlight.util.ColorUtils;
|
||||
|
||||
public class HUDModule extends Module
|
||||
{
|
||||
public BooleanSetting clientTag = new BooleanSetting("Client Tag", true);
|
||||
public DoubleSetting r = new DoubleSetting("Red", 0x55, 0, 255, 0);
|
||||
public DoubleSetting g = new DoubleSetting("Green", 255, 0, 255, 0);
|
||||
public DoubleSetting b = new DoubleSetting("Blue", 255, 0, 255, 0);
|
||||
//public ColorSetting color = new ColorSetting("Color", 0x55FFFF, ReflectionUtils.tryGetMethod("updateHUD", getClass()));
|
||||
|
||||
public HUDModule()
|
||||
{
|
||||
super("HUD", "The Moonlight HUD. Toggle to update.", Category.RENDER);
|
||||
this.enabled = true;
|
||||
this.showInModulesList.value = false;
|
||||
|
||||
settings.add(clientTag);
|
||||
settings.add(r);
|
||||
settings.add(g);
|
||||
settings.add(b);
|
||||
//settings.add(color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEnable()
|
||||
{
|
||||
super.onEnable();
|
||||
HUDOverlay.INSTANCE.showClientTag = clientTag.value;
|
||||
Moonlight.uiColorA =
|
||||
ColorUtils.rgbaToInt(
|
||||
(int)r.value,
|
||||
(int)g.value,
|
||||
(int)b.value,
|
||||
255
|
||||
);
|
||||
Moonlight.uiColor =
|
||||
ColorUtils.rgbToInt(
|
||||
(int)r.value,
|
||||
(int)g.value,
|
||||
(int)b.value
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue