This commit is contained in:
Robert Jelic
2022-07-17 23:17:28 +02:00
parent dfc53658f1
commit af34fa1a18
14 changed files with 67 additions and 134 deletions

View File

@@ -33,7 +33,7 @@ Sets the horizontal align of the button text
#### Usage:
* Sets the button's horizontal text align to right.
```lua
local mainFrame = basalt.createFrame():show()
local mainFrame = basalt.createFrame()
local button = mainFrame:addButton()
:setText("Click me!")
:setHorizontalAlign("right")
@@ -55,13 +55,12 @@ Sets the vertical align of the button text
#### Usage:
* Sets the button's horizontal text align to right and the vertical text align to bottom.
```lua
local mainFrame = basalt.createFrame():show()
local mainFrame = basalt.createFrame()
local button = mainFrame:addButton()
:setText("Click me!")
:setHorizontalAlign("right")
:setVerticalAlign("bottom")
```
```xml
<button text="Click me!" horizontalAlign="right" verticalAlign="bottom" />
```
@@ -69,8 +68,8 @@ local button = mainFrame:addButton()
# Example
This is a example on how you would create a fully working button:
```lua
local mainFrame = basalt.createFrame():show()
local aButton = mainFrame:addButton():setText("Click"):show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setText("Click")
aButton:onClick(function(self,event,button,x,y)
if(event=="mouse_click")and(button==1)then
@@ -79,7 +78,7 @@ aButton:onClick(function(self,event,button,x,y)
end)
```
## Lua and XML:
and this would be the xml way to do it:
```lua
local mainFrame = basalt.createFrame():addLayout("example.xml")
@@ -91,5 +90,5 @@ end)
```
```xml
<button onClick="buttonClick" text="Click me!" horizontalAlign="right" verticalAlign="bottom" />
<button onClick="buttonClick" text="Click" />
```

View File

@@ -5,7 +5,7 @@ Remember checkbox also inherits from [Object](objects/Object.md)
A checkbox does not have any custom methods. All required methods are provided by the base [object](objects/Object.md) class.
# Example
This is how you would create a event which gets fired as soon as the value gets changed.
This is how you would create a event which gets fired as soon as the value gets changed:
```lua
local mainFrame = basalt.createFrame()
local aCheckbox = mainFrame:addCheckbox()
@@ -17,7 +17,7 @@ end
aCheckbox:onChange(checkboxChange)
```
## Lua and XML:
also possible via xml:
```lua
local mainFrame = basalt.createFrame():addLayout("example.xml")
@@ -28,6 +28,6 @@ end)
```
```xml
<button onChange="checkboxChange" />
<checkbox onChange="checkboxChange" />
```

View File

@@ -34,11 +34,13 @@ aDropdown:addItem("1. Entry")
aDropdown:addItem("2. Entry",colors.yellow)
aDropdown:addItem("3. Entry",colors.yellow,colors.green)
```
```xml
<dropdown>
<item><text>1. Entry</text></item>
<item><text>2. Entry</text><bg>yellow</bg></item>
<item><text>3. Entry</text><bg>yellow</bg><fg>green</fg></item>
</dropdown>
```
## removeItem
Removes a item from the dropdown
@@ -214,7 +216,6 @@ aDropdown:addItem("3. Entry",colors.yellow,colors.green)
aDropdown:addItem("4. Entry")
aDropdown:setSelectedItem(colors.green, colors.red)
```
```xml
<dropdown selectionBG="green" selectionFG="red">
<item><text>1. Entry</text></item>
@@ -245,7 +246,6 @@ local aDropdown = mainFrame:addDropdown()
:addItem("6. Entry")
:setOffset(3)
```
```xml
<dropdown offset="3">
<item><text>1. Entry</text></item>
@@ -297,7 +297,6 @@ aDropdown:addItem("1. Entry")
aDropdown:addItem("2. Entry")
aDropdown:addItem("3. Entry")
```
```xml
<dropdown dropdownWidth="15" dropdownHeight="8">
<item><text>1. Entry</text></item>

View File

@@ -34,7 +34,6 @@ Creates a child frame on the frame, the same as [basalt.createFrame](https://git
local mainFrame = basalt.createFrame()
local myFrame = mainFrame:addFrame()
```
```xml
<frame></frame>
```
@@ -66,7 +65,6 @@ myFrame:setBar("My first Frame!")
local mainFrame = basalt.createFrame()
local myFrame = mainFrame:addFrame():setBar("My first Frame!")
```
```xml
<frame barText="My first Frame!" barBG="black" barFG="lightGray"></frame>
```
@@ -85,7 +83,6 @@ Sets the frame's bar-text alignment
```lua
myFrame:setBar("My first Frame!"):setBarTextAlign("right")
```
```xml
<frame barAlign="right"></frame>
```
@@ -104,7 +101,6 @@ Toggles the frame's upper bar
```lua
myFrame:setBar("Hello World!"):showBar()
```
```xml
<frame bar="true"></frame>
```
@@ -126,7 +122,6 @@ local mainFrame = basalt.createFrame()
local monitorFrame = basalt.createFrame():setMonitor("right")
monitorFrame:setBar("Monitor 1"):showBar()
```
```xml
<frame monitor="right"></frame>
```
@@ -145,7 +140,6 @@ mirrors this frame to another peripheral monitor object.
```lua
local mainFrame = basalt.createFrame():setMirror("left")
```
```xml
<frame mirror="left"></frame>
```
@@ -241,7 +235,6 @@ Sets whether the frame can be moved. _In order to move the frame click and drag
```lua
local myFrame = basalt.createFrame():setMovable(true)
```
```xml
<frame moveable="true"></frame>
```
@@ -268,7 +261,6 @@ local myFrame = basalt.createFrame():setOffset(5, 3)
```lua
local myFrame = basalt.createFrame():setOffset(5, -5)
```
```xml
<frame xOffset="5" yOffset="-5"></frame>
```
@@ -287,7 +279,6 @@ Adds a new XML Layout into your frame.
```lua
local myFrame = basalt.createFrame():addLayout("mainframe.xml")
```
```xml
<frame layout="mainframe.xml"></frame>
```
@@ -345,7 +336,6 @@ Makes the frame scrollable with mousewheel.
```lua
local myFrame = basalt.createFrame():setScrollable()
```
```xml
<frame scrollable="true"></frame>
```
@@ -364,7 +354,6 @@ Sets the minimum offset it is allowed to scroll (default 0)
```lua
local myFrame = basalt.createFrame():setScrollable():setMinScroll(-5)
```
```xml
<frame minScroll="-5"></frame>
```
@@ -383,7 +372,6 @@ Sets the maximum offset it is allowed to scroll (default 10)
```lua
local myFrame = basalt.createFrame():setScrollable():setMaxScroll(25)
```
```xml
<frame maxScroll="25"></frame>
```
@@ -402,14 +390,13 @@ By default if you hovering your mouse over children objects, you wont scroll the
```lua
local myFrame = basalt.createFrame():setScrollable():setImportantScroll(true)
```
```xml
<frame importantScroll="true"></frame>
```
# XML
# XML Example
* A fully working example:
*This is how you would implement frames via xml:
```xml
<frame>
<frame width="50%" bg="red">

View File

@@ -20,7 +20,6 @@ loads a default .nfp file into the object.
local mainFrame = basalt.createFrame():show()
local aImage = mainFrame:addImage():loadImage("test.nfp")
```
```xml
<image path="test.nfp" />
```
@@ -37,7 +36,6 @@ Shrinks the current image into a blittle image.
local mainFrame = basalt.createFrame()
local aImage = mainFrame:addImage():loadImage("test.nfp"):shrink()
```
```xml
<image path="test.nfp" shrink="true" />
```

View File

@@ -54,7 +54,6 @@ Sets the default text. This will only be displayed if there is no input set by t
local mainFrame = basalt.createFrame()
local aInput = mainFrame:addInput():setDefaultText("...")
```
```xml
<input default="..." />
```
@@ -74,7 +73,6 @@ Sets a character limit to the input.
local mainFrame = basalt.createFrame()
local aInput = mainFrame:addInput():setInputLimit(8)
```
```xml
<input limit="8" />
```

View File

@@ -19,10 +19,9 @@ Sets the text which gets displayed.
#### Usage:
* Creates a default label with text "Some random text".
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("Some random text"):show()
local mainFrame = basalt.createFrame()
local aLabel = mainFrame:addLabel():setText("Some random text")
```
```xml
<label text="Some random text" />
```
@@ -39,10 +38,9 @@ Sets the font size, calculated by bigfonts. Default size is 1.
#### Usage:
* Creates a default label, sets the text to "Basalt!" and its font size to 2.
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("Basalt!"):setFontSize(2):show()
local mainFrame = basalt.createFrame()
local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
```
```xml
<label font="2" />
```
@@ -56,8 +54,8 @@ Returns the current font size
#### Usage:
* Creates a default label, sets the text to "Basalt!" and its font size to 2. Also prints the current fontsize.
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("Basalt!"):setFontSize(2):show()
local mainFrame = basalt.createFrame()
local aLabel = mainFrame:addLabel():setText("Basalt!"):setFontSize(2)
basalt.debug(aLabel:getFontSize())
```
@@ -74,7 +72,6 @@ Changes the text align
local mainFrame = basalt.createFrame()
local aLabel = mainFrame:addLabel():setText("Basalt!"):setTextAlign("right")
```
```xml
<label horizontalAlign="right" verticalAlign="center" />
```

View File

@@ -34,7 +34,6 @@ aMenubar:addItem("1. Entry")
aMenubar:addItem("2. Entry",colors.yellow)
aMenubar:addItem("3. Entry",colors.yellow,colors.green)
```
```xml
<menubar>
<item><text>1. Entry</text></item>
@@ -160,7 +159,6 @@ aMenubar:addItem("2. Entry",colors.yellow)
aMenubar:addItem("3. Entry",colors.yellow,colors.green)
aMenubar:setSpace(3)
```
```xml
<menubar space="3">
<item><text>1. Entry</text></item>
@@ -190,7 +188,6 @@ aMenubar:addItem("2. Entry",colors.yellow)
aMenubar:addItem("3. Entry",colors.yellow,colors.green)
aMenubar:setScrollable(true)
```
```xml
<menubar scrollable="true">
<item><text>1. Entry</text></item>
@@ -276,7 +273,6 @@ aMenubar:addItem("3. Entry")
aMenubar:addItem("4. Entry")
aMenubar:setSelectedItem(colors.green, colors.yellow)
```
```xml
<menubar selectionBG="green" selectionFG="yellow">
<item><text>1. Entry</text></item>
@@ -308,7 +304,6 @@ aMenubar:addItem("5. Entry")
aMenubar:addItem("6. Entry")
aMenubar:setOffset(3)
```
```xml
<menubar offset="3">
<item><text>1. Entry</text></item>

View File

@@ -6,14 +6,12 @@ Shows the object (only if the parent frame is already visible)
1. `object` The object in use
#### Usage:
* Shows a frame named "myFirstFrame"
* Shows a frame
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local button = mainFrame:addButton("myFirstButton")
local mainFrame = basalt.createFrame():show()
local button = mainFrame:addButton()
button:show()
```
#### XML:
```xml
<button visible="true"></button>
```
@@ -25,14 +23,12 @@ Hides the object
1. `object` The object in use
#### Usage:
* Hides a frame named "myFirstFrame"
* Hides a frame
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local button = mainFrame:addButton("myFirstButton"):setText("Close"):onClick(function() mainFrame:hide() end)
button:show()
local mainFrame = basalt.createFrame()
local button = mainFrame:addButton():setText("Close"):onClick(function() mainFrame:hide() end)
button
```
#### XML:
```xml
<button visible="false"></button>
```
@@ -50,11 +46,9 @@ Changes the position relative to its parent frame
#### Usage:
* Sets the Buttons position to an x coordinate of 2 with a y coordinate of 3
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
mainFrame:addButton("myFirstButton"):setPosition(2,3)
local mainFrame = basalt.createFrame()
mainFrame:addButton():setPosition(2,3)
```
#### XML:
```xml
<button x="2" y="3"></button>
```
@@ -70,10 +64,8 @@ Changes the object background color, if you set the value to false the backgroun
#### Usage:
* Creates a frame, and sets its background color to `colors.gray`
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setBackground(colors.gray)
local mainFrame = basalt.createFrame():setBackground(colors.gray)
```
#### XML:
```xml
<button bg="gray"></button>
```
@@ -89,10 +81,8 @@ Changes the object text color
#### Usage:
* Creates a frame, and sets its foreground color to `colors.green`
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setForeground(colors.green)
local mainFrame = basalt.createFrame():setForeground(colors.green)
```
#### XML:
```xml
<button fg="green"></button>
```
@@ -109,11 +99,9 @@ Changes the object size
#### Usage:
* Sets the frame to have a width of 15 and a height of 12
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local subFrame = mainFrame:addFrame("myFirstSubFrame"):setSize(15,12):show()
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame():setSize(15,12)
```
#### XML:
```xml
<frame width="15" height="12"></frame>
```
@@ -128,8 +116,8 @@ the foreground, you should also use :setFocus()
#### Usage:
* Sets the button to the focused object
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setFocus():show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setFocus()
```
## setZIndex
@@ -141,14 +129,12 @@ Sets the z-index. Higher value means higher draw/event priority. You can also ad
1. `object` The object in use
#### Usage:
* Sets the z-index of "myFirstButton" to `1` and the z-index of "myFirstLabel" to `1`
* Sets the buttons z-index to `1` and the labels z-index to `2`
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setZIndex(1):setPosition(2,2):show()
local aLabel = mainFrame:addButton("myFirstLabel"):setZIndex(2):setPosition(2,2):setText("I am a label!"):show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setZIndex(1):setPosition(2,2)
local aLabel = mainFrame:addButton():setZIndex(2):setPosition(2,2):setText("I am a label!")
```
#### XML:
```xml
<button x="2" y="2" zIndex="1"></button>
<label x="2" y="2" text="I am a label!" zIndex="2"></label>
@@ -165,13 +151,13 @@ Sets the parent frame of the object
#### Usage:
* Sets the parent frame of the random frame, adding it to the main frame when the button is clicked"
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aRandomFrame = basalt.createFrame("aRandomFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):onClick(
local mainFrame = basalt.createFrame()
local aRandomFrame = basalt.createFrame()
local aButton = mainFrame:addButton():onClick(
function()
aRandomFrame:setParent(mainFrame)
end
):show()
)
```
## isFocused
@@ -183,8 +169,8 @@ Returns if the object is currently the focused object of the parent frame
#### Usage:
* Prints whether the button is focused to the debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton()
basalt.debug(aButton:isFocused()) -- shows true or false as a debug message
```
@@ -202,12 +188,11 @@ Converts the x and y coordinates into the anchor coordinates of the object
#### Usage:
* Prints the anchor position to the debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setSize(15,15):show()
local aButton = mainFrame:addButton("myFirstButton")
local mainFrame = basalt.createFrame():setSize(15,15)
local aButton = mainFrame:addButton()
:setAnchor("bottomRight")
:setSize(8,1)
:setPosition(1,1)
:show()
basalt.debug(aButton:getAnchorPosition()) -- returns 7,14 (framesize - own size) instead of 1,1
```
@@ -223,12 +208,11 @@ Sets the anchor of the object
#### Usage:
* Sets the button to have an anchor of `bottomRight`
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton")
local mainFrame = basalt.createFrame():show()
local aButton = mainFrame:addButton()
:setAnchor("bottomRight")
:setSize(8,1)
:setPosition(-8,1)
:show()
```
#### XML:
@@ -248,8 +232,8 @@ Converts the relative coordinates into absolute coordinates
#### Usage:
* Creates a frame and a button and prints the button's absolute position to the debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):setPosition(3,3):show()
local aButton = mainFrame:addButton("myFirstButton"):setSize(8,1):setPosition(4,2):show()
local mainFrame = basalt.createFrame():setPosition(3,3)
local aButton = mainFrame:addButton():setSize(8,1):setPosition(4,2)
basalt.debug(aButton:getAbsolutePosition()) -- returns 7,5 (frame coords + own coords) instead of 4,2
```
@@ -264,11 +248,9 @@ Sets the value of that object (input, label, checkbox, textfield, scrollbar,...)
#### Usage:
* Creates a checkbox and ticks it
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
local mainFrame = basalt.createFrame()
local aCheckbox = mainFrame:addCheckbox():setValue(true)
```
#### XML:
```xml
<checkbox value="true"></checkbox>
```
@@ -281,8 +263,8 @@ Returns the currently saved value
#### Usage:
* Prints the value of the checkbox to the debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aCheckbox = mainFrame:addCheckbox("myFirstCheckbox"):setValue(true):show()
local mainFrame = basalt.createFrame()
local aCheckbox = mainFrame:addCheckbox():setValue(true)
basalt.debug(aCheckbox:getValue()) -- returns true
```
@@ -294,8 +276,8 @@ Returns the respective height/width of the object
#### Usage:
* Prints the height of the object to the debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setSize(5,8)
basalt.debug(aButton:getHeight()) -- returns 8
```
@@ -307,8 +289,8 @@ Returns if the object is currently visible
#### Usage:
* Prints boolean visibility of object to debug console
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aButton = mainFrame:addButton("myFirstButton"):setSize(5,8):show()
local mainFrame = basalt.createFrame()
local aButton = mainFrame:addButton():setSize(5,8)
basalt.debug(aButton:isVisible()) -- returns true
```
@@ -321,7 +303,7 @@ Returns the given name of the object
#### Usage:
* Prints name of object to debug window
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local mainFrame = basalt.createFrame()
basalt.debug(mainFrame:getName()) -- returns myFirstFrame
```
@@ -337,15 +319,13 @@ Sets the shadow color - default: colors.black
#### Usage:
* Sets the shadow to green and shows it:
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local subFrame = mainFrame:addFrame("mySubFrame")
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
:setMoveable()
:setSize(18,6)
:setShadow(colors.green)
:showShadow(true)
```
#### XML:
```xml
<frame width="18" height="6" shadow="true" shadowColor="green" moveable="true"></frame>
```
@@ -362,15 +342,12 @@ Shows or hides the shadow
#### Usage:
* Shows the shadow:
```lua
local mainFrame = basalt.createFrame():show()
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
:setMoveable()
:setSize(18,6)
:showShadow(true)
:show()
```
#### XML:
```xml
<frame width="18" height="6" shadow="true" moveable="true"></frame>
```
@@ -387,16 +364,13 @@ Sets the border color - default: colors.black
#### Usage:
* Sets the border to green and shows it:
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local subFrame = mainFrame:addFrame("mySubFrame")
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
:setMoveable()
:setSize(18,6)
:setBorder(colors.green)
:showBorder("left", "top", "right", "bottom")
:show()
```
#### XML:
```xml
<frame width="18" height="6" border="true" borderColor="green" moveable="true"></frame>
```
@@ -413,15 +387,12 @@ Shows or hides the border
#### Usage:
* Shows the border:
```lua
local mainFrame = basalt.createFrame("myFirstFrame"):show()
local subFrame = mainFrame:addFrame("mySubFrame")
local mainFrame = basalt.createFrame()
local subFrame = mainFrame:addFrame()
:setMoveable()
:setSize(18,6)
:showBorder("left", "top", "bottom")
:show()
```
#### XML:
```xml
<frame width="18" height="6" border="true" borderColor="green" borderRight="false" moveable="true"></frame>
```

View File

@@ -14,7 +14,6 @@ aPane:setSize(30, 10)
aPane:setBackground(colors.yellow)
aPane:show()
```
```xml
<pane width="30" height="10" bg="yellow" />
```

View File

@@ -34,8 +34,6 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aProgram = mainFrame:addProgram("myFirstProgram"):show()
aProgram:execute("rom/programs/fun/worm.lua") -- executes worm
```
#### XML:
```xml
<program path="rom/programs/fun/worm.lua" execute="true" />
```

View File

@@ -19,7 +19,6 @@ local mainFrame = basalt.createFrame():show()
local aProgressbar = mainFrame:addProgressbar():show()
aProgressbar:setDirection(3)
```
```xml
<frame direction="3"></frame>
```
@@ -74,7 +73,6 @@ local mainFrame = basalt.createFrame():show()
local aProgressbar = mainFrame:addProgressbar():show()
aProgressbar:setProgressBar(colors.green, colors.yellow, colors.red)
```
```xml
<progressbar progressColor="green" progressSymbol="yellow" progressSymbolColor="red" />
```
@@ -95,7 +93,6 @@ local mainFrame = basalt.createFrame():show()
local aProgressbar = mainFrame:addProgressbar():show()
aProgressbar:setBackgroundSymbol("X")
```
```xml
<progressbar backgroundSymbol="X" />
```
@@ -120,7 +117,7 @@ end
aProgressbar:onProgressDone(progressDone)
```
## XML Example
Here is also a example how this is done with xml:
```lua
local basalt = require("Basalt")
@@ -131,7 +128,6 @@ basalt.setVariable("progressDone", function()
basalt.debug("The Progressbar reached 100%!")
end)
```
```xml
<progressbar onDone="progressDone" />
```

View File

@@ -68,7 +68,6 @@ local mainFrame = basalt.createFrame("myFirstFrame"):show()
local aTextfield = mainFrame:addTextfield("myFirstTextfield"):show()
basalt.debug(aTextfield:addLine("Hello!", 1))
```
```xml
<textfield>
<lines>
@@ -118,7 +117,6 @@ Adds keywords for special coloring
local mainFrame = basalt.createFrame()
local aTextfield = mainFrame:addTextfield():addKeywords(colors.purple, {"if", "else", "then", "while", "do", "hello"})
```
```xml
<textfield>
<keywords>
@@ -151,7 +149,6 @@ Adds a new rule for special coloring
local mainFrame = basalt.createFrame()
local aTextfield = mainFrame:addTextfield():addRule("%d", colors.lightBlue)
```
```xml
<textfield>
<rules>

View File

@@ -28,7 +28,6 @@ aThread:start(randomThreadfunction)
```
```xml
<thread thread="myThread" start="true"/>
```
## stop