// Path: src/main/java/net/spellcraftgaming/rpghud/main/ModRPGHud.java
// @Environment(EnvType.CLIENT)
// 
// public class ModRPGHud implements ClientModInitializer{
//     public final String MODID = "rpg-hud";
// 
// 	public static ModRPGHud instance;
//     
// 	public static boolean[] renderDetailsAgain = { false, false, false };
// 
// 	public static int screenOffset = 0;
// 	
// 	public Settings settings;
// 
// 	/** Map of all registered HUDs */
// 	public Map<String, Hud> huds = new LinkedHashMap<String, Hud>();
// 	
//     public void onInitializeClient()
//     {
//         instance = this;
// 		this.settings = new Settings();
// 		this.registerHud(new HudVanilla(MinecraftClient.getInstance(), "vanilla", "Vanilla"));
// 		this.registerHud(new HudSimple(MinecraftClient.getInstance(), "simple", "Simplified"));
// 		this.registerHud(new HudDefault(MinecraftClient.getInstance(), "default", "Default"));
// 		this.registerHud(new HudExtendedWidget(MinecraftClient.getInstance(), "extended", "Extended Widget"));
// 		this.registerHud(new HudFullTexture(MinecraftClient.getInstance(), "texture", "Full Texture"));
// 		//this.registerHud(new HudHotbarWidget(MinecraftClient.getInstance(), "hotbar", "Hotbar Widget"));
// 		this.registerHud(new HudModern(MinecraftClient.getInstance(), "modern", "Modern Style"));
// 
// 		if (!isHudKeyValid(this.settings.getStringValue(Settings.hud_type))) {
// 			this.settings.setSetting(Settings.hud_type, "vanilla");
// 		}
//         new RenderOverlay();
//         if (isClass("io.github.prospector.modmenu.ModMenu")) screenOffset = 12;
//     }
//     
// 	/**
// 	 * Register a new HUD
// 	 * 
// 	 * @param hud
// 	 *            the hud to be registered
// 	 */
// 	public void registerHud(Hud hud) {
// 		this.huds.put(hud.getHudKey(), hud);
// 	}
// 
// 	/** Returns the active HUD */
// 	public Hud getActiveHud() {
// 		return this.huds.get(this.settings.getStringValue(Settings.hud_type));
// 	}
// 
// 	/** Returns the vanilla HUD */
// 	public Hud getVanillaHud() {
// 		return this.huds.get("vanilla");
// 	}
// 
// 	public boolean isVanillaHud() {
// 	    return this.settings.getStringValue(Settings.hud_type) == "vanilla";
// 	}
// 	
// 	/** Checks if a Hud with the specified key is registered */
// 	public boolean isHudKeyValid(String key) {
// 		return this.huds.containsKey(key);
// 	}
// 	
// 	public static boolean isClass(String className) {
// 	    try  {
// 	        Class.forName(className);
// 	        return true;
// 	    }  catch (ClassNotFoundException e) {
// 	        return false;
// 	    }
// 	}
// }


import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.text.Text;
import net.spellcraftgaming.rpghud.main.ModRPGHud;

package net.spellcraftgaming.rpghud.gui;


@Environment(EnvType.CLIENT)
public class TextFieldWidgetMod extends TextFieldWidget {

    /** Variable to contain the (possible) setting of this button */
    public final String enumOptions;
    /** Array that contains the tooltip of this button */
    private String[] tooltip;
    
    private ValueType type;
    public TextFieldWidgetMod(TextRenderer fontIn, ValueType type, String setting, int xIn, int yIn, int widthIn, int heightIn, Text msg) {
        super(fontIn, xIn, yIn, widthIn, heightIn, msg);
        this.type = type;
        this.enumOptions = setting;
    }
    
    public TextFieldWidgetMod(TextRenderer fontIn, ValueType type, int xIn, int yIn, int widthIn, int heightIn, Text msg) {
        super(fontIn, xIn, yIn, widthIn, heightIn, msg);
        this.type = type;
        this.enumOptions = null;
    }
    
    public ValueType getValueType() {
        return type;
    }
    
    public enum ValueType{
        DOUBLE,
        POSITION;
    }
    
    @Override
    public void tick() {
        super.tick();
        
    }
    
    /**
     * Sets the tooltip of this button. Should be appended at the constructor.
     * 
     * @param tooltip
     *            The String which'll be the button's tooltip. Line breaks are
     *            managed via the /n symbol combination.
     * @return the button
     */
    public TextFieldWidgetMod setTooltip(String tooltip) {
        this.tooltip = tooltip.split("/n");
        return this;
    }
    
    /**
     * Sets the tooltip to the one the setting of hits button contain.
     * 
     * @return the button
     */
    public TextFieldWidgetMod setTooltip() {
        if (this.enumOptions != null)

// Path: src/main/java/net/spellcraftgaming/rpghud/main/ModRPGHud.java
// @Environment(EnvType.CLIENT)
// 
// public class ModRPGHud implements ClientModInitializer{
//     public final String MODID = "rpg-hud";
// 
// 	public static ModRPGHud instance;
//     
// 	public static boolean[] renderDetailsAgain = { false, false, false };
// 
// 	public static int screenOffset = 0;
// 	
// 	public Settings settings;
// 
// 	/** Map of all registered HUDs */
// 	public Map<String, Hud> huds = new LinkedHashMap<String, Hud>();
// 	
//     public void onInitializeClient()
//     {
//         instance = this;
// 		this.settings = new Settings();
// 		this.registerHud(new HudVanilla(MinecraftClient.getInstance(), "vanilla", "Vanilla"));
// 		this.registerHud(new HudSimple(MinecraftClient.getInstance(), "simple", "Simplified"));
// 		this.registerHud(new HudDefault(MinecraftClient.getInstance(), "default", "Default"));
// 		this.registerHud(new HudExtendedWidget(MinecraftClient.getInstance(), "extended", "Extended Widget"));
// 		this.registerHud(new HudFullTexture(MinecraftClient.getInstance(), "texture", "Full Texture"));
// 		//this.registerHud(new HudHotbarWidget(MinecraftClient.getInstance(), "hotbar", "Hotbar Widget"));
// 		this.registerHud(new HudModern(MinecraftClient.getInstance(), "modern", "Modern Style"));
// 
// 		if (!isHudKeyValid(this.settings.getStringValue(Settings.hud_type))) {
// 			this.settings.setSetting(Settings.hud_type, "vanilla");
// 		}
//         new RenderOverlay();
//         if (isClass("io.github.prospector.modmenu.ModMenu")) screenOffset = 12;
//     }
//     
// 	/**
// 	 * Register a new HUD
// 	 * 
// 	 * @param hud
// 	 *            the hud to be registered
// 	 */
// 	public void registerHud(Hud hud) {
// 		this.huds.put(hud.getHudKey(), hud);
// 	}
// 
// 	/** Returns the active HUD */
// 	public Hud getActiveHud() {
// 		return this.huds.get(this.settings.getStringValue(Settings.hud_type));
// 	}
// 
// 	/** Returns the vanilla HUD */
// 	public Hud getVanillaHud() {
// 		return this.huds.get("vanilla");
// 	}
// 
// 	public boolean isVanillaHud() {
// 	    return this.settings.getStringValue(Settings.hud_type) == "vanilla";
// 	}
// 	
// 	/** Checks if a Hud with the specified key is registered */
// 	public boolean isHudKeyValid(String key) {
// 		return this.huds.containsKey(key);
// 	}
// 	
// 	public static boolean isClass(String className) {
// 	    try  {
// 	        Class.forName(className);
// 	        return true;
// 	    }  catch (ClassNotFoundException e) {
// 	        return false;
// 	    }
// 	}
// }


// Path: src/main/java/net/spellcraftgaming/rpghud/gui/TextFieldWidgetMod.java
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.font.TextRenderer;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.text.Text;
import net.spellcraftgaming.rpghud.main.ModRPGHud;

package net.spellcraftgaming.rpghud.gui;


@Environment(EnvType.CLIENT)
public class TextFieldWidgetMod extends TextFieldWidget {

    /** Variable to contain the (possible) setting of this button */
    public final String enumOptions;
    /** Array that contains the tooltip of this button */
    private String[] tooltip;
    
    private ValueType type;
    public TextFieldWidgetMod(TextRenderer fontIn, ValueType type, String setting, int xIn, int yIn, int widthIn, int heightIn, Text msg) {
        super(fontIn, xIn, yIn, widthIn, heightIn, msg);
        this.type = type;
        this.enumOptions = setting;
    }
    
    public TextFieldWidgetMod(TextRenderer fontIn, ValueType type, int xIn, int yIn, int widthIn, int heightIn, Text msg) {
        super(fontIn, xIn, yIn, widthIn, heightIn, msg);
        this.type = type;
        this.enumOptions = null;
    }
    
    public ValueType getValueType() {
        return type;
    }
    
    public enum ValueType{
        DOUBLE,
        POSITION;
    }
    
    @Override
    public void tick() {
        super.tick();
        
    }
    
    /**
     * Sets the tooltip of this button. Should be appended at the constructor.
     * 
     * @param tooltip
     *            The String which'll be the button's tooltip. Line breaks are
     *            managed via the /n symbol combination.
     * @return the button
     */
    public TextFieldWidgetMod setTooltip(String tooltip) {
        this.tooltip = tooltip.split("/n");
        return this;
    }
    
    /**
     * Sets the tooltip to the one the setting of hits button contain.
     * 
     * @return the button
     */
    public TextFieldWidgetMod setTooltip() {
        if (this.enumOptions != null)

            return setTooltip(ModRPGHud.instance.settings.getSetting(this.enumOptions).getTooltip());
