Record Class NativeUiViewport
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.screen.ui.NativeUiViewport
Desktop GuiData units, independent of Java's HUD scale.
-
Constructor Summary
ConstructorsConstructorDescriptionNativeUiViewport(int width, int height, int scale, float renderScale) Creates an instance of aNativeUiViewportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeUiViewportcurrent()static NativeUiViewportdesktop(int width, int height, int offset, int javaScale) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intheight()Returns the value of theheightrecord component.intpixel(float nativeCoordinate) doublepointer(double javaCoordinate) floatReturns the value of therenderScalerecord component.intscale()Returns the value of thescalerecord component.final StringtoString()Returns a string representation of this record class.intwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
NativeUiViewport
public NativeUiViewport(int width, int height, int scale, float renderScale) Creates an instance of aNativeUiViewportrecord class.- Parameters:
width- the value for thewidthrecord componentheight- the value for theheightrecord componentscale- the value for thescalerecord componentrenderScale- the value for therenderScalerecord component
-
-
Method Details
-
desktop
-
current
-
pointer
public double pointer(double javaCoordinate) -
pixel
public int pixel(float nativeCoordinate) -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
width
public int width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public int height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
scale
public int scale()Returns the value of thescalerecord component.- Returns:
- the value of the
scalerecord component
-
renderScale
public float renderScale()Returns the value of therenderScalerecord component.- Returns:
- the value of the
renderScalerecord component
-