Added percentage support to UIElements

This commit is contained in:
2023-05-09 23:51:12 -07:00
parent e6b93fe5db
commit 9f5c39b8d0
8 changed files with 127 additions and 88 deletions

View File

@ -1,16 +1,21 @@
<prefab name="VNTextbox" type="">
<asset type="truetype" name="font_main" />
<UIGrid columns="2" />
<UIBorder
ref="border"
borderSize="8, 8"
alignment="50, 0, 0, 0"
alignUnitLeft="UI_COMPONENT_ALIGN_UNIT_PERCENT"
ref="border"
alignX="UI_COMPONENT_ALIGN_STRETCH"
alignY="UI_COMPONENT_ALIGN_STRETCH"
/>
<child>
<UIBorder ref="border" borderSize="16, 16" alignment="32, 32, 320, 320" ref="border" />
<child>
<UILabel text="bruh" font="font_main" fontSize="32"
alignment="16, 16, -1, -1"
alignX="UI_COMPONENT_ALIGN_STRETCH"
alignY="UI_COMPONENT_ALIGN_STRETCH"
/>
</child>
<UILabel text="bruh" font="font_main" fontSize="32"
alignment="16, 16, -1, -1"
alignX="UI_COMPONENT_ALIGN_STRETCH"
alignY="UI_COMPONENT_ALIGN_STRETCH"
/>
</child>
</prefab>