| | 1 | | using UnityEngine.UIElements; |
| | 2 | |
|
| | 3 | | public static class UiElementUtils |
| | 4 | | { |
| | 5 | | public static void SetElementDefaultStyle(IStyle elementStyle) |
| | 6 | | { |
| 4 | 7 | | elementStyle.right = 0; |
| 4 | 8 | | elementStyle.left = 0; |
| 4 | 9 | | elementStyle.top = 0; |
| 4 | 10 | | elementStyle.bottom = 0; |
| 4 | 11 | | elementStyle.width = new StyleLength(StyleKeyword.Auto); |
| 4 | 12 | | elementStyle.height = new StyleLength(StyleKeyword.Auto); |
| 4 | 13 | | elementStyle.position = new StyleEnum<Position>(Position.Absolute); |
| 4 | 14 | | elementStyle.justifyContent = new StyleEnum<Justify>(Justify.Center); |
| 4 | 15 | | elementStyle.alignItems = new StyleEnum<Align>(Align.Center); |
| 4 | 16 | | } |
| | 17 | | } |