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,6 +1,5 @@
# Basalt
This is the UI Manager and the starting point for your project. The following functions allow you to influence the default behavior of Basalt.
This is the UI Manager and the first thing you want to access.
Before you can access Basalt, you need to add the following code on top of your file:
```lua
@@ -22,6 +21,7 @@ You are now able to access the following list of methods:
|[getVersion](objects/Basalt/getVersion.md)|Returns the Basalt version
|[isKeyDown](objects/Basalt/isKeyDown.md)|Returns if the key is held down
|[log](objects/Basalt/log.md)|Writes something into the log file
|[memory](objects/Basalt/log.md)|Returns the current memory usage of Basalt
|[onEvent](objects/Basalt/onEvent.md)|Event listener
|[removeFrame](objects/Basalt/removeFrame.md)|Removes a previously created base frame
|[schedule](objects/Basalt/schedule.md)|Schedules a new task
@@ -29,20 +29,21 @@ You are now able to access the following list of methods:
|[setTheme](objects/Basalt/setTheme.md)|Changes the base theme of basalt
|[setMouseDragThrottle](objects/Basalt/setMouseDragThrottle.md)|Changes the mouse drag throttle amount
|[setMouseMoveThrottle](objects/Basalt/setMouseMoveThrottle.md)|CraftOS-PC: Changes the mouse move throttle amount
|[setRenderingThrottle](objects/Basalt/setMouseMoveThrottle.md)|Sets the rendering throttle amount
|[setVariable](objects/Basalt/setVariable.md)|Sets a variable which you can access via XML
|[stopUpdate / stop](objects/Basalt/stopUpdate.md)|Stops the currently active event and draw listener
|[update](objects/Basalt/update.md)|Starts the event and draw listener once
## Examples
Here is a lua example on how to create a empty base frame and start basalt's listener.
Here is a Lua example on how to create an empty base frame and start Basalt's listener.
```lua
local basalt = require("basalt") -- Loads Basalt into our project
local main = basalt.createFrame() -- Creates a base frame. On that frame we are able to add object's
local main = basalt.createFrame() -- Creates a base frame. On that frame, we are able to add objects
-- Here we would add additional object's
-- Here we would add additional objects
basalt.autoUpdate() -- Starts listening to incoming events and draw stuff on the screen. This should nearly always be the last line.
```