Record Class ConfigEffect.Context

java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.gui.theme.ConfigEffect.Context
Record Components:
mouseX - the mouse, in GUI pixels; -1 (both) while a popup redraws the page under it
time - seconds since the game started, for animating without keeping state
partialTick - how far between ticks this frame is
inWorld - whether a world is open (the screen shows it, blurred)
Enclosing interface:
ConfigEffect

public static record ConfigEffect.Context(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld) extends Record
The screen being drawn.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Context(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld)
    Creates an instance of a Context record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The accent color of the current mode, ARGB.
    Returns the value of the colors record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Whether the mouse is over the screen (not a popup's redraw of the page under it).
    int
    Returns the value of the height record component.
    boolean
    Returns the value of the inWorld record component.
    Returns the value of the mode record component.
    int
    Returns the value of the mouseX record component.
    int
    Returns the value of the mouseY record component.
    float
    Returns the value of the partialTick record component.
    Returns the value of the theme record component.
    float
    Returns the value of the time record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the width record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Context

      public Context(int width, int height, int mouseX, int mouseY, float time, float partialTick, ConfigTheme theme, ConfigColorScheme colors, ConfigTheme.Mode mode, boolean inWorld)
      Creates an instance of a Context record class.
      Parameters:
      width - the value for the width record component
      height - the value for the height record component
      mouseX - the value for the mouseX record component
      mouseY - the value for the mouseY record component
      time - the value for the time record component
      partialTick - the value for the partialTick record component
      theme - the value for the theme record component
      colors - the value for the colors record component
      mode - the value for the mode record component
      inWorld - the value for the inWorld record component
  • Method Details

    • accent

      public int accent()
      The accent color of the current mode, ARGB.
    • hasMouse

      public boolean hasMouse()
      Whether the mouse is over the screen (not a popup's redraw of the page under it).
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • height

      public int height()
      Returns the value of the height record component.
      Returns:
      the value of the height record component
    • mouseX

      public int mouseX()
      Returns the value of the mouseX record component.
      Returns:
      the value of the mouseX record component
    • mouseY

      public int mouseY()
      Returns the value of the mouseY record component.
      Returns:
      the value of the mouseY record component
    • time

      public float time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • partialTick

      public float partialTick()
      Returns the value of the partialTick record component.
      Returns:
      the value of the partialTick record component
    • theme

      public ConfigTheme theme()
      Returns the value of the theme record component.
      Returns:
      the value of the theme record component
    • colors

      public ConfigColorScheme colors()
      Returns the value of the colors record component.
      Returns:
      the value of the colors record component
    • mode

      public ConfigTheme.Mode mode()
      Returns the value of the mode record component.
      Returns:
      the value of the mode record component
    • inWorld

      public boolean inWorld()
      Returns the value of the inWorld record component.
      Returns:
      the value of the inWorld record component