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 Summary
FieldsModifier and TypeFieldDescriptionstatic final MenuLayoutConfigThe standard default layout definitions mirroring the 1.21 vanilla UI configuration, adjusted to fit the expanded slots. -
Constructor Summary
ConstructorsConstructorDescriptionMenuLayoutConfig(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 aMenuLayoutConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thebackwardButtonHeightrecord component.intReturns the value of thebackwardButtonWidthrecord component.intReturns the value of thebackwardXOffsetrecord component.intReturns the value of thebackwardYOffsetrecord component.intReturns the value of theenchantingButtonHeightrecord component.intReturns the value of theenchantingButtonXOffsetrecord component.intReturns the value of theenchantingButtonYOffsetrecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theexperienceBarHeightrecord component.intReturns the value of theexperienceBarWidthrecord component.intReturns the value of theexperienceBarXOffsetrecord component.intReturns the value of theexperienceBarYOffsetrecord component.intReturns the value of theforwardButtonHeightrecord component.intReturns the value of theforwardButtonWidthrecord component.intReturns the value of theforwardXOffsetrecord component.intReturns the value of theforwardYOffsetrecord component.final inthashCode()Returns a hash code value for this object.intpageSize()Returns the value of thepageSizerecord component.intReturns the value of thererollButtonHeightrecord component.intReturns the value of thererollButtonWidthrecord component.intReturns the value of thererollButtonXOffsetrecord component.intReturns the value of thererollButtonYOffsetrecord component.intReturns the value of thererollCostHeightrecord component.intReturns the value of thererollCostWidthrecord component.intReturns the value of thererollCostXOffsetrecord component.intReturns the value of thererollCostYOffsetrecord component.intReturns the value of thescreenHeightAdjustmentrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
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 aMenuLayoutConfigrecord class.- Parameters:
screenHeightAdjustment- the value for thescreenHeightAdjustmentrecord componentrerollButtonXOffset- the value for thererollButtonXOffsetrecord componentrerollButtonYOffset- the value for thererollButtonYOffsetrecord componentrerollButtonWidth- the value for thererollButtonWidthrecord componentrerollButtonHeight- the value for thererollButtonHeightrecord componentrerollCostWidth- the value for thererollCostWidthrecord componentrerollCostHeight- the value for thererollCostHeightrecord componentrerollCostXOffset- the value for thererollCostXOffsetrecord componentrerollCostYOffset- the value for thererollCostYOffsetrecord componentenchantingButtonXOffset- the value for theenchantingButtonXOffsetrecord componentenchantingButtonYOffset- the value for theenchantingButtonYOffsetrecord componentenchantingButtonHeight- the value for theenchantingButtonHeightrecord componentpageSize- the value for thepageSizerecord componentbackwardButtonWidth- the value for thebackwardButtonWidthrecord componentbackwardButtonHeight- the value for thebackwardButtonHeightrecord componentforwardButtonWidth- the value for theforwardButtonWidthrecord componentforwardButtonHeight- the value for theforwardButtonHeightrecord componentbackwardXOffset- the value for thebackwardXOffsetrecord componentbackwardYOffset- the value for thebackwardYOffsetrecord componentforwardXOffset- the value for theforwardXOffsetrecord componentforwardYOffset- the value for theforwardYOffsetrecord componentexperienceBarXOffset- the value for theexperienceBarXOffsetrecord componentexperienceBarYOffset- the value for theexperienceBarYOffsetrecord componentexperienceBarWidth- the value for theexperienceBarWidthrecord componentexperienceBarHeight- the value for theexperienceBarHeightrecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
screenHeightAdjustment
public int screenHeightAdjustment()Returns the value of thescreenHeightAdjustmentrecord component.- Returns:
- the value of the
screenHeightAdjustmentrecord component
-
rerollButtonXOffset
public int rerollButtonXOffset()Returns the value of thererollButtonXOffsetrecord component.- Returns:
- the value of the
rerollButtonXOffsetrecord component
-
rerollButtonYOffset
public int rerollButtonYOffset()Returns the value of thererollButtonYOffsetrecord component.- Returns:
- the value of the
rerollButtonYOffsetrecord component
-
rerollButtonWidth
public int rerollButtonWidth()Returns the value of thererollButtonWidthrecord component.- Returns:
- the value of the
rerollButtonWidthrecord component
-
rerollButtonHeight
public int rerollButtonHeight()Returns the value of thererollButtonHeightrecord component.- Returns:
- the value of the
rerollButtonHeightrecord component
-
rerollCostWidth
public int rerollCostWidth()Returns the value of thererollCostWidthrecord component.- Returns:
- the value of the
rerollCostWidthrecord component
-
rerollCostHeight
public int rerollCostHeight()Returns the value of thererollCostHeightrecord component.- Returns:
- the value of the
rerollCostHeightrecord component
-
rerollCostXOffset
public int rerollCostXOffset()Returns the value of thererollCostXOffsetrecord component.- Returns:
- the value of the
rerollCostXOffsetrecord component
-
rerollCostYOffset
public int rerollCostYOffset()Returns the value of thererollCostYOffsetrecord component.- Returns:
- the value of the
rerollCostYOffsetrecord component
-
enchantingButtonXOffset
public int enchantingButtonXOffset()Returns the value of theenchantingButtonXOffsetrecord component.- Returns:
- the value of the
enchantingButtonXOffsetrecord component
-
enchantingButtonYOffset
public int enchantingButtonYOffset()Returns the value of theenchantingButtonYOffsetrecord component.- Returns:
- the value of the
enchantingButtonYOffsetrecord component
-
enchantingButtonHeight
public int enchantingButtonHeight()Returns the value of theenchantingButtonHeightrecord component.- Returns:
- the value of the
enchantingButtonHeightrecord component
-
pageSize
public int pageSize()Returns the value of thepageSizerecord component.- Returns:
- the value of the
pageSizerecord component
-
backwardButtonWidth
public int backwardButtonWidth()Returns the value of thebackwardButtonWidthrecord component.- Returns:
- the value of the
backwardButtonWidthrecord component
-
backwardButtonHeight
public int backwardButtonHeight()Returns the value of thebackwardButtonHeightrecord component.- Returns:
- the value of the
backwardButtonHeightrecord component
-
forwardButtonWidth
public int forwardButtonWidth()Returns the value of theforwardButtonWidthrecord component.- Returns:
- the value of the
forwardButtonWidthrecord component
-
forwardButtonHeight
public int forwardButtonHeight()Returns the value of theforwardButtonHeightrecord component.- Returns:
- the value of the
forwardButtonHeightrecord component
-
backwardXOffset
public int backwardXOffset()Returns the value of thebackwardXOffsetrecord component.- Returns:
- the value of the
backwardXOffsetrecord component
-
backwardYOffset
public int backwardYOffset()Returns the value of thebackwardYOffsetrecord component.- Returns:
- the value of the
backwardYOffsetrecord component
-
forwardXOffset
public int forwardXOffset()Returns the value of theforwardXOffsetrecord component.- Returns:
- the value of the
forwardXOffsetrecord component
-
forwardYOffset
public int forwardYOffset()Returns the value of theforwardYOffsetrecord component.- Returns:
- the value of the
forwardYOffsetrecord component
-
experienceBarXOffset
public int experienceBarXOffset()Returns the value of theexperienceBarXOffsetrecord component.- Returns:
- the value of the
experienceBarXOffsetrecord component
-
experienceBarYOffset
public int experienceBarYOffset()Returns the value of theexperienceBarYOffsetrecord component.- Returns:
- the value of the
experienceBarYOffsetrecord component
-
experienceBarWidth
public int experienceBarWidth()Returns the value of theexperienceBarWidthrecord component.- Returns:
- the value of the
experienceBarWidthrecord component
-
experienceBarHeight
public int experienceBarHeight()Returns the value of theexperienceBarHeightrecord component.- Returns:
- the value of the
experienceBarHeightrecord component
-