Pyroxenium / Basalt

A UI Framework for CC:Tweaked
MIT License
194 stars 38 forks source link

bug: XML labels not automatically resizing #100

Open Flerpharos opened 11 months ago

Flerpharos commented 11 months ago

What happened?

When labels are used with XML, they terminate unexpectedly. This occurs whether or not a space is present in the string, leading me to believe that the XML has a default size parameter that it sets, instead of calculating the size from the label text.

image

I tested this on CraftOS PC, as well as in 1.19.2 CC:Tweaked.

MRE:

local basalt = require("basalt")

basalt.createFrame():loadLayout("test.xml")
basalt.autoUpdate()

test.xml

<label text="HelloWorld" y="1" />
<label text="Hello World" y="2" />
<label text="HelloWorld" y="3" width="10" />
<label text="Hello World" y="4" width = "11" />

Computercraft client

Ingame (Default)

Relevant log output

No response

Latest Basalt Version