File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
5454## How To use XML
5555Here 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
8080basalt .createFrame ():addLayout (" example.xml" )
8181basalt .autoUpdate ()
82- ```
82+ ```
You can’t perform that action at this time.
0 commit comments