Skip to content

Commit 90b4503

Browse files
authored
Update design.md
1 parent 3e6fae3 commit 90b4503

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/tips/design.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ This is also possible with entire frames and its children objects. So keep that
5454
## How To use XML
5555
Here is a example on how to create a cool looking frame by using xml:
5656
```xml
57-
<frame width="50%" bg="gray" scrollable="true" importantScroll="true">
57+
<frame width="parent.w/2" bg="gray" scrollable="true" importantScroll="true">
5858
<button x="2" y="2" width="100%-2" bg="black" fg="lightGray" text="Example Button 1!"/>
5959
<button x="2" y="6" width="100%-2" bg="black" fg="lightGray" text="Example Button 2!"/>
6060
<button x="2" y="10" width="100%-2" bg="black" fg="lightGray" text="Example Button 3!"/>
@@ -63,8 +63,8 @@ Here is a example on how to create a cool looking frame by using xml:
6363
<button x="2" y="22" width="100%-2" bg="black" fg="lightGray" text="Example Button 6!"/>
6464
<button x="2" y="26" width="100%-2" bg="black" fg="lightGray" text="Example Button 7!"/>
6565
</frame>
66-
<frame x="50%+1" width="50%+1" bg="black">
67-
<textfield bg="gray" x="2" y="2" width="100%-2">
66+
<frame x="parent.w/2+1" width="parent.w/2+1" bg="black">
67+
<textfield bg="gray" x="2" y="2" width="parent.w-2">
6868
<lines>
6969
<line>This is line 1.</line>
7070
<line>And this is line 2.</line>
@@ -79,4 +79,4 @@ local basalt = require("Basalt")
7979

8080
basalt.createFrame():addLayout("example.xml")
8181
basalt.autoUpdate()
82-
```
82+
```

0 commit comments

Comments
 (0)