Enum Class InputResult

java.lang.Object
java.lang.Enum<InputResult>
io.github.cottonmc.cotton.gui.widget.data.InputResult
All Implemented Interfaces:
Serializable, Comparable<InputResult>, Constable

public enum InputResult extends Enum<InputResult>
Specifies whether an input event was ignored or processed. Used for mouse and keyboard input events.
Since:
4.0.0
  • Enum Constant Details

  • Method Details

    • values

      public static InputResult[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static InputResult valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • or

      public InputResult or(InputResult other)
      Combines this input result with another. The combination is PROCESSED is at least one of the inputs is.
      Parameters:
      other - the other input result
      Returns:
      the combined input result
      Since:
      9.0.0
    • of

      public static InputResult of(boolean processed)
      Gets the corresponding input result for a processed boolean.
      Parameters:
      processed - whether an input event was processed
      Returns:
      PROCESSED if true, IGNORED otherwise