Package com.csse3200.game.ui.cutscene
Record Class CutsceneReaderComponent.TextBox
java.lang.Object
java.lang.Record
com.csse3200.game.ui.cutscene.CutsceneReaderComponent.TextBox
- Record Components:
text- The text to be drawn inside the text box.background- null means use the current background. Otherwise, can contain path to background asset to be used for this text box.
- Enclosing class:
CutsceneReaderComponent
Record object that represents information about a text box.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TextBox
Creates an instance of aTextBoxrecord class.- Parameters:
text- the value for thetextrecord componentbackground- the value for thebackgroundrecord 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 withObjects::equals(Object,Object). -
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
background
Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-