Record Class MenuLayoutConfig

java.lang.Object
java.lang.Record
johnsmith.enchantingoverhauled.client.gui.screen.enchant.MenuLayoutConfig
Record Components:
screenHeightAdjustment - The amount to increase the GUI's total height by.
rerollButtonXOffset - The X relative offset of the reroll button.
rerollButtonYOffset - The Y relative offset of the reroll button.
rerollButtonWidth - The standard width of the reroll button.
rerollButtonHeight - The standard height of the reroll button.
rerollCostWidth - The width of the reroll's lapis cost overlay sprite.
rerollCostHeight - The height of the reroll's lapis cost overlay sprite.
rerollCostXOffset - The relative X offset for the lapis cost sprite.
rerollCostYOffset - The relative Y offset for the lapis cost sprite.
enchantingButtonXOffset - The starting X offset for the enchantment list widgets.
enchantingButtonYOffset - The starting Y offset for the first enchantment widget.
enchantingButtonHeight - The height of a single enchantment widget row.
pageSize - The total number of enchantment widgets visible at one time.
backwardButtonWidth - The width of the previous page navigation arrow.
backwardButtonHeight - The height of the previous page navigation arrow.
forwardButtonWidth - The width of the next page navigation arrow.
forwardButtonHeight - The height of the next page navigation arrow.
backwardXOffset - The relative X offset of the previous page button.
backwardYOffset - The relative Y offset of the previous page button.
forwardXOffset - The relative X offset of the next page button.
forwardYOffset - The relative Y offset of the next page button.
experienceBarXOffset - The relative X offset for drawing the custom XP bar.
experienceBarYOffset - The relative Y offset for drawing the custom XP bar.
experienceBarWidth - The total visual width of the custom XP bar.
experienceBarHeight - The visual height of the custom XP bar.

public record MenuLayoutConfig(int screenHeightAdjustment, int rerollButtonXOffset, int rerollButtonYOffset, int rerollButtonWidth, int rerollButtonHeight, int rerollCostWidth, int rerollCostHeight, int rerollCostXOffset, int rerollCostYOffset, int enchantingButtonXOffset, int enchantingButtonYOffset, int enchantingButtonHeight, int pageSize, int backwardButtonWidth, int backwardButtonHeight, int forwardButtonWidth, int forwardButtonHeight, int backwardXOffset, int backwardYOffset, int forwardXOffset, int forwardYOffset, int experienceBarXOffset, int experienceBarYOffset, int experienceBarWidth, int experienceBarHeight) extends Record
A configuration record encapsulating all static positioning, dimensions, and offset logic for the components inside the Enchantment UI Screen.
  • Field Details

    • DEFAULT

      public static final MenuLayoutConfig DEFAULT
      The standard default layout definitions mirroring the 1.21 vanilla UI configuration, adjusted to fit the expanded slots.
  • Constructor Details

    • MenuLayoutConfig

      public MenuLayoutConfig(int screenHeightAdjustment, int rerollButtonXOffset, int rerollButtonYOffset, int rerollButtonWidth, int rerollButtonHeight, int rerollCostWidth, int rerollCostHeight, int rerollCostXOffset, int rerollCostYOffset, int enchantingButtonXOffset, int enchantingButtonYOffset, int enchantingButtonHeight, int pageSize, int backwardButtonWidth, int backwardButtonHeight, int forwardButtonWidth, int forwardButtonHeight, int backwardXOffset, int backwardYOffset, int forwardXOffset, int forwardYOffset, int experienceBarXOffset, int experienceBarYOffset, int experienceBarWidth, int experienceBarHeight)
      Creates an instance of a MenuLayoutConfig record class.
      Parameters:
      screenHeightAdjustment - the value for the screenHeightAdjustment record component
      rerollButtonXOffset - the value for the rerollButtonXOffset record component
      rerollButtonYOffset - the value for the rerollButtonYOffset record component
      rerollButtonWidth - the value for the rerollButtonWidth record component
      rerollButtonHeight - the value for the rerollButtonHeight record component
      rerollCostWidth - the value for the rerollCostWidth record component
      rerollCostHeight - the value for the rerollCostHeight record component
      rerollCostXOffset - the value for the rerollCostXOffset record component
      rerollCostYOffset - the value for the rerollCostYOffset record component
      enchantingButtonXOffset - the value for the enchantingButtonXOffset record component
      enchantingButtonYOffset - the value for the enchantingButtonYOffset record component
      enchantingButtonHeight - the value for the enchantingButtonHeight record component
      pageSize - the value for the pageSize record component
      backwardButtonWidth - the value for the backwardButtonWidth record component
      backwardButtonHeight - the value for the backwardButtonHeight record component
      forwardButtonWidth - the value for the forwardButtonWidth record component
      forwardButtonHeight - the value for the forwardButtonHeight record component
      backwardXOffset - the value for the backwardXOffset record component
      backwardYOffset - the value for the backwardYOffset record component
      forwardXOffset - the value for the forwardXOffset record component
      forwardYOffset - the value for the forwardYOffset record component
      experienceBarXOffset - the value for the experienceBarXOffset record component
      experienceBarYOffset - the value for the experienceBarYOffset record component
      experienceBarWidth - the value for the experienceBarWidth record component
      experienceBarHeight - the value for the experienceBarHeight record component
  • Method Details

    • 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. All components in this record class are compared with '=='.
      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.
    • screenHeightAdjustment

      public int screenHeightAdjustment()
      Returns the value of the screenHeightAdjustment record component.
      Returns:
      the value of the screenHeightAdjustment record component
    • rerollButtonXOffset

      public int rerollButtonXOffset()
      Returns the value of the rerollButtonXOffset record component.
      Returns:
      the value of the rerollButtonXOffset record component
    • rerollButtonYOffset

      public int rerollButtonYOffset()
      Returns the value of the rerollButtonYOffset record component.
      Returns:
      the value of the rerollButtonYOffset record component
    • rerollButtonWidth

      public int rerollButtonWidth()
      Returns the value of the rerollButtonWidth record component.
      Returns:
      the value of the rerollButtonWidth record component
    • rerollButtonHeight

      public int rerollButtonHeight()
      Returns the value of the rerollButtonHeight record component.
      Returns:
      the value of the rerollButtonHeight record component
    • rerollCostWidth

      public int rerollCostWidth()
      Returns the value of the rerollCostWidth record component.
      Returns:
      the value of the rerollCostWidth record component
    • rerollCostHeight

      public int rerollCostHeight()
      Returns the value of the rerollCostHeight record component.
      Returns:
      the value of the rerollCostHeight record component
    • rerollCostXOffset

      public int rerollCostXOffset()
      Returns the value of the rerollCostXOffset record component.
      Returns:
      the value of the rerollCostXOffset record component
    • rerollCostYOffset

      public int rerollCostYOffset()
      Returns the value of the rerollCostYOffset record component.
      Returns:
      the value of the rerollCostYOffset record component
    • enchantingButtonXOffset

      public int enchantingButtonXOffset()
      Returns the value of the enchantingButtonXOffset record component.
      Returns:
      the value of the enchantingButtonXOffset record component
    • enchantingButtonYOffset

      public int enchantingButtonYOffset()
      Returns the value of the enchantingButtonYOffset record component.
      Returns:
      the value of the enchantingButtonYOffset record component
    • enchantingButtonHeight

      public int enchantingButtonHeight()
      Returns the value of the enchantingButtonHeight record component.
      Returns:
      the value of the enchantingButtonHeight record component
    • pageSize

      public int pageSize()
      Returns the value of the pageSize record component.
      Returns:
      the value of the pageSize record component
    • backwardButtonWidth

      public int backwardButtonWidth()
      Returns the value of the backwardButtonWidth record component.
      Returns:
      the value of the backwardButtonWidth record component
    • backwardButtonHeight

      public int backwardButtonHeight()
      Returns the value of the backwardButtonHeight record component.
      Returns:
      the value of the backwardButtonHeight record component
    • forwardButtonWidth

      public int forwardButtonWidth()
      Returns the value of the forwardButtonWidth record component.
      Returns:
      the value of the forwardButtonWidth record component
    • forwardButtonHeight

      public int forwardButtonHeight()
      Returns the value of the forwardButtonHeight record component.
      Returns:
      the value of the forwardButtonHeight record component
    • backwardXOffset

      public int backwardXOffset()
      Returns the value of the backwardXOffset record component.
      Returns:
      the value of the backwardXOffset record component
    • backwardYOffset

      public int backwardYOffset()
      Returns the value of the backwardYOffset record component.
      Returns:
      the value of the backwardYOffset record component
    • forwardXOffset

      public int forwardXOffset()
      Returns the value of the forwardXOffset record component.
      Returns:
      the value of the forwardXOffset record component
    • forwardYOffset

      public int forwardYOffset()
      Returns the value of the forwardYOffset record component.
      Returns:
      the value of the forwardYOffset record component
    • experienceBarXOffset

      public int experienceBarXOffset()
      Returns the value of the experienceBarXOffset record component.
      Returns:
      the value of the experienceBarXOffset record component
    • experienceBarYOffset

      public int experienceBarYOffset()
      Returns the value of the experienceBarYOffset record component.
      Returns:
      the value of the experienceBarYOffset record component
    • experienceBarWidth

      public int experienceBarWidth()
      Returns the value of the experienceBarWidth record component.
      Returns:
      the value of the experienceBarWidth record component
    • experienceBarHeight

      public int experienceBarHeight()
      Returns the value of the experienceBarHeight record component.
      Returns:
      the value of the experienceBarHeight record component