Describe the bug
GuiComponent.setX() and .setY() make a call to setLocation(). setLocation() adjusts the location of the children components based on the delta. But then setX() and setY() also adjust the respective values for the children components.
To Reproduce
Steps to reproduce the behavior:
Create a GuiComponent with a child GuiComponent.
Call setX or setY on the parent component
The child component is in the wrong position.
Expected behavior
Only adjust the children components in one spot. Probably just remove the code in setX and setY that does it and let setLocation handle it.
Your System:
OS: Windows 11
LITIENGINE version: 0.5.2
Java JDK/JRE version: jdk-18.0.2.1
Screen resolution: 3,840 x 2,160
Additional context
A work-around could be only using setLocation. But the tweening framework uses only setX and setY, even with TweenType.POSITION_XY. On that same note, it might make more sense to use setLocation for TweenType.POSITION_XY. Regardless, you should be able to get past this, too, if you overwrite setTweenValues in the GuiComponent to use setLocation instead.
Describe the bug GuiComponent.setX() and .setY() make a call to setLocation(). setLocation() adjusts the location of the children components based on the delta. But then setX() and setY() also adjust the respective values for the children components.
To Reproduce Steps to reproduce the behavior:
Expected behavior Only adjust the children components in one spot. Probably just remove the code in setX and setY that does it and let setLocation handle it.
Your System:
Additional context A work-around could be only using setLocation. But the tweening framework uses only setX and setY, even with TweenType.POSITION_XY. On that same note, it might make more sense to use setLocation for TweenType.POSITION_XY. Regardless, you should be able to get past this, too, if you overwrite setTweenValues in the GuiComponent to use setLocation instead.