bug: XML labels not automatically resizing #100

Open
opened 2023-12-05 16:51:47 +08:00 by Flerpharos · 0 comments
Flerpharos commented 2023-12-05 16:51:47 +08:00 (Migrated from github.com)

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

  • I use the latest stable version
### 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](https://github.com/Pyroxenium/Basalt/assets/43678988/2b02cd99-77bd-47b1-8715-130ae0442f04) 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 - [X] I use the latest stable version
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GitHub/Basalt#100
No description provided.