// 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.gui.widget.ButtonWidget;
import net.minecraft.text.Text;
import net.spellcraftgaming.rpghud.main.ModRPGHud;
package net.spellcraftgaming.rpghud.gui;


@Environment(EnvType.CLIENT)
public class GuiButtonTooltip extends GuiButtonLib {

	/** Variable to contain the (possible) setting of this button */
	public final String enumOptions;
	public int id;
	/** Array that contains the tooltip of this button */
	private String[] tooltip;
	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, buttonText, ip);
		this.enumOptions = null;
	}

	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param width
	 *            the width of the button
	 * @param height
	 *            the height of the button
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, int width, int height, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, width, height, buttonText, ip);
		this.enumOptions = null;
	}
	
	public GuiButtonTooltip(int id, int x, int y, int width, int height, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, width, height, buttonText, ip);
		this.id = id;
		this.enumOptions = null;
	}

	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param setting
	 *            The possible setting of this button
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, String setting, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, 150, 20, buttonText, ip);
		this.enumOptions = setting;
	}

	/**
	 * 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 GuiButtonTooltip 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 GuiButtonTooltip 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/GuiButtonTooltip.java
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.text.Text;
import net.spellcraftgaming.rpghud.main.ModRPGHud;

package net.spellcraftgaming.rpghud.gui;


@Environment(EnvType.CLIENT)
public class GuiButtonTooltip extends GuiButtonLib {

	/** Variable to contain the (possible) setting of this button */
	public final String enumOptions;
	public int id;
	/** Array that contains the tooltip of this button */
	private String[] tooltip;
	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, buttonText, ip);
		this.enumOptions = null;
	}

	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param width
	 *            the width of the button
	 * @param height
	 *            the height of the button
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, int width, int height, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, width, height, buttonText, ip);
		this.enumOptions = null;
	}
	
	public GuiButtonTooltip(int id, int x, int y, int width, int height, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, width, height, buttonText, ip);
		this.id = id;
		this.enumOptions = null;
	}

	/**
	 * Initiates a new button
	 * 
	 * @param buttonId
	 *            The ID of the button
	 * @param x
	 *            The x position on the screen
	 * @param y
	 *            The y position on the screen
	 * @param setting
	 *            The possible setting of this button
	 * @param buttonText
	 *            The display Text of this button
	 */
	public GuiButtonTooltip(int x, int y, String setting, Text buttonText, ButtonWidget.PressAction ip) {
		super(x, y, 150, 20, buttonText, ip);
		this.enumOptions = setting;
	}

	/**
	 * 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 GuiButtonTooltip 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 GuiButtonTooltip setTooltip() {
		if (this.enumOptions != null)
			return setTooltip(ModRPGHud.instance.settings.getSetting(this.enumOptions).getTooltip());