modules list and remove broken stuff

This commit is contained in:
kawaiizenbo 2023-06-28 17:03:45 -07:00
parent 2a89f212e5
commit b58eedfb9c
16 changed files with 168 additions and 44 deletions

View file

@ -2,28 +2,43 @@ 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;
import me.kawaiizenbo.moonlight.module.settings.DoubleSetting;
import me.kawaiizenbo.moonlight.ui.HUD;
import me.kawaiizenbo.moonlight.util.ReflectionUtils;
import me.kawaiizenbo.moonlight.ui.HUDOverlay;
import me.kawaiizenbo.moonlight.util.ColorUtils;
public class HUDModule extends Module_
{
//public DoubleSetting r = new DoubleSetting("Red", 0x55, 0, 255, 0, ReflectionUtils.tryGetMethod("updateHUD()V", getClass()));
//public DoubleSetting g = new DoubleSetting("Green", 255, 0, 255, 0, ReflectionUtils.tryGetMethod("updateHUD()V", getClass()));
//public DoubleSetting b = new DoubleSetting("Blue", 255, 0, 255, 0, ReflectionUtils.tryGetMethod("updateHUD()V", getClass()));
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", "Enables or disables the Moonlight HUD.", Category.RENDER);
super("HUD", "The Moonlight HUD. Toggle to update.", Category.RENDER);
this.enabled = true;
//settings.add(r);
//settings.add(g);
//settings.add(b);
this.showInModulesList.value = false;
settings.add(clientTag);
settings.add(r);
settings.add(g);
settings.add(b);
//settings.add(color);
}
public static void updateHUD()
@Override
public void onEnable()
{
HUD.INSTANCE = new HUD();
super.onEnable();
HUDOverlay.INSTANCE.showClientTag = clientTag.value;
HUDOverlay.INSTANCE.hudColor =
ColorUtils.rgbaToInt(
(int)r.value,
(int)g.value,
(int)b.value,
255
);
}
}