Basalt 1.7 Update

- New Objects (Flexbox, Graph, Treeview)
- Pluginsystem to add/remove functionality
- Reworked the entire Object system, instead of one big Object Class we have multiple classes: Object, VisualObject, ChangeableObject
- Instead of one big Frame Class we have multiple Frame Classes: BaseFrame, Frame, MovableFrame, ScrollableFrame, MonitorFrame, Flexbox
- Removed the Animation Object, and added a animation plugin instead
- Removed the Graphic Object and merged it's functionality with the image object
- Updated currently existing objects
This commit is contained in:
Robert Jelic
2023-04-30 17:05:34 +02:00
parent e086c1abb2
commit bb1b1beb79
341 changed files with 15541 additions and 3862 deletions

View File

@@ -1,8 +1,6 @@
A label is for adding simple text.
A Label object is used to display simple text on the interface.
By default label's width is auto sizing based on the length of the text. If you change the size with setSize it will automatically stop autosizing the width.
The fontsize feature is calculated by bigfonts, a library made by Wojbie (http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/)
In addition to the Object and VisualObject methods, Label objects have the following methods:
[Object](objects/Object.md) methods also apply for labels.
@@ -11,3 +9,25 @@ The fontsize feature is calculated by bigfonts, a library made by Wojbie (http:/
|[setText](objects/Label/setText.md)|Sets the input type
|[setFontSize](objects/Label/setFontSize.md)|Returns the input type
|[getFontSize](objects/Label/getFontSize.md)|Sets the default text
|[setTextAlign](objects/Label/setTextAlign.md)|Changes the horizontal text align
By default, a label's width is auto-sized based on the length of the text. If you change the size with setSize, it will automatically stop auto-sizing the width.
The fontsize feature is calculated by bigfonts, a library made by Wojbie (http://www.computercraft.info/forums2/index.php?/topic/25367-bigfont-api-write-bigger-letters-v10/)
Here's an example of how to create a Label object and set its properties:
Lua:
```lua
local main = basalt.createFrame()
local aLabel = main:addLabel()
aLabel:setText("Hello, World!")
aLabel:setFontSize(2)
```
XML:
```xml
<label text="Hello World!" fontSize="2" />
```