File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ This is also possible with entire frames and its children objects. So keep that
54
54
## How To use XML
55
55
Here is a example on how to create a cool looking frame by using xml:
56
56
``` xml
57
- <frame width =" 50% " bg =" gray" scrollable =" true" importantScroll =" true" >
57
+ <frame width =" parent.w/2 " bg =" gray" scrollable =" true" importantScroll =" true" >
58
58
<button x =" 2" y =" 2" width =" 100%-2" bg =" black" fg =" lightGray" text =" Example Button 1!" />
59
59
<button x =" 2" y =" 6" width =" 100%-2" bg =" black" fg =" lightGray" text =" Example Button 2!" />
60
60
<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:
63
63
<button x =" 2" y =" 22" width =" 100%-2" bg =" black" fg =" lightGray" text =" Example Button 6!" />
64
64
<button x =" 2" y =" 26" width =" 100%-2" bg =" black" fg =" lightGray" text =" Example Button 7!" />
65
65
</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" >
68
68
<lines >
69
69
<line >This is line 1.</line >
70
70
<line >And this is line 2.</line >
@@ -79,4 +79,4 @@ local basalt = require("Basalt")
79
79
80
80
basalt .createFrame ():addLayout (" example.xml" )
81
81
basalt .autoUpdate ()
82
- ```
82
+ ```
You can’t perform that action at this time.
0 commit comments