UIFitter

Utility class for screen position and scaling adjustments in RareEngine2

Overview

The UIFitter class provides methods to adjust UI elements' positions and scales according to different screen sizes, ensuring a responsive and adaptive UI across various devices.

Method Summary

Vector2 getPosition(Vector2 fakeScreenSize, Vector2 realScreenSize, Vector2 fakePosition)
Calculates the real screen position based on the fake screen size, real screen size, and fake position of the UI element. This ensures that the UI element maintains its relative position across different screen resolutions.
Vector2 getRealScreenScale(Vector2 fakeScreenSize, Vector2 realScreenSize, Vector2 fakeScreenScale)
Computes the scale factor for the real screen based on the fake screen size and the desired fake screen scale, ensuring UI elements scale properly on various screen sizes.