Hello BIS team,
I would like to request a feature that enables us to rotate dialog controls.
I am working on UI code for Epoch mod development team and I constantly feel limited by such a simple thing as not being able to rotate UI elements.
But I understand that it's not an easy task to implement it because of the way 2D 4 element arrays work, so I'd like to share some suggestions:
- Have engine calculate pivot point for rotation, which is always a centre of Control, this way we could be left with a simple float that needs to be adjusted, such as:
_ctrl ctrlSetRotation 360;
ctrlRotation _ctrl; //360
- Give us ability to set pivot points that are NOT relative to the control. Each control would have pivot point set to centre by default if not defined.
Defining pivot could work like this:
_ctrl ctrlSetRotationPivot [x, (y + h) / 2]; //centered along y, aligned to left
_ctrl ctrlSetRotation 180;
The idea is not to change the way UI currently works, but to add an extra features to it instead.
For CT_OBJECT (types 80 and 82) we could just use pivot point read from p3d file as is, I suppose
Something as simple as rotations would allow mod developers to create higher quality UI modifications even if the whole system might feel alien to beginners, it could still spark some extra interest from players getting into development, too.