Spell HUD rewrite and retexturing:
- Replaces the old hardcoded drawing methods with a new json-based system with support for multiple inbuilt and resource pack-defined skins. - Adds a config option for choosing the spell HUD skin, along with a custom config GUI screen allowing the user to select from a list of available skins with a preview of the currently selected skin. - Replaces the HUD texture file with a spell_hud subfolder, containing all the necessary textures and json files for the 12 inbuilt skins. - Adds a subtle sound effect and scroling animation when switching spells - Reorganises the control event code into a single handler class and converts this class and the spell HUD class to static event handlers. - Fixes the HUD position option which got broken in the previous spell HUD commit
This commit is contained in:
@@ -164,6 +164,10 @@ public final class Settings {
|
||||
public boolean showSummonedCreatureNames = true;
|
||||
/** <b>[Client-only]</b> The position of the spell HUD. */
|
||||
public GuiPosition spellHUDPosition = GuiPosition.BOTTOM_LEFT;
|
||||
|
||||
public static final String DEFAULT_HUD_SKIN_KEY = "default"; // Defined here so it's not in a client-only class.
|
||||
/** <b>[Client-only]</b> The string identifier of the skin used for the spell HUD. */
|
||||
public String spellHUDSkin = DEFAULT_HUD_SKIN_KEY;
|
||||
|
||||
/** Set of constants for each of the four positions that the spell HUD can be in. */
|
||||
public enum GuiPosition {
|
||||
@@ -190,6 +194,8 @@ public final class Settings {
|
||||
|
||||
GuiPosition(String name, boolean flipX, boolean flipY){
|
||||
this.name = name;
|
||||
this.flipX = flipX;
|
||||
this.flipY = flipY;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -458,6 +464,12 @@ public final class Settings {
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".spell_hud_position");
|
||||
spellHUDPosition = GuiPosition.fromName(property.getString());
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(CLIENT_CATEGORY, "spellHUDSkin", DEFAULT_HUD_SKIN_KEY, "The skin used for the spell HUD.", Wizardry.proxy.getSpellHUDSkins().toArray(new String[0]));
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".spell_hud_skin");
|
||||
Wizardry.proxy.setToHUDChooserEntry(property);
|
||||
spellHUDSkin = property.getString();
|
||||
propOrder.add(property.getName());
|
||||
|
||||
property = config.get(CLIENT_CATEGORY, "showSummonedCreatureNames", true, "Whether to show summoned creatures' names and owners above their heads.");
|
||||
property.setLanguageKey("config." + Wizardry.MODID + ".show_summoned_creature_names");
|
||||
|
||||
Reference in New Issue
Block a user