Class ConfigEditors

java.lang.Object
net.ixdarklord.coolcatcore.api.config.client.ConfigEditors

public final class ConfigEditors extends Object
Client only: which widget edits which ConfigType in the config screen. A mod with its own type registers an editor for the type's class (or for one type instance); types without one get a text box using the type's parse/format.
  • Method Details

    • register

      public static void register(Class<? extends ConfigType> typeClass, ValueEditor.Factory<?> factory)
      The editor for every type of this class (and its subclasses, unless they have their own).
    • register

      public static <T> void register(ConfigType<T> type, ValueEditor.Factory<T> factory)
      The editor for one type instance, ahead of its class's.
    • create

      public static <T> ValueEditor create(EditSlot<T> slot, int width, int height)
      An editor for the slot's type.