Basalt - a new UI Framework

Started by NyoriE, May 04, 2022, 07:05 PM

Previous topic - Next topic

NyoriE

Basalt - UI Framework


Basalt is very advanced UI Framework. You can create windows, create programs (a window which executes any program you'd like), add buttons/labels or even textfields.
Basalt aims to be very easy to use but can also be very advanced if you'd like to. You can create simple programs where the user just needs to give you a simple information but also create a very advanced operating system.

Here is a list of all available objects:

  • Frame (like a window)
  • Button
  • Label
  • Input
  • Checkbox
  • List
  • Dropdown
  • Menubar
  • Slider
  • Scrollbar
  • Textfield
  • Program
  • Timer
  • Animation
  • Thread


There are some objects i still want to add, if you have a nice idea, just tell me
Basalt also aims to only support CC:Tweaked versions. Which means 1.7.10 is not supported. Better don't use it.
My wiki page is still not done, there are some missing information.

As i said, basalt is easy to use, if you don't think so, feel free to tell me. Either here or on github.
You got some questions about basalt? Also feel free to ask!
If you find a bug please report it on github.



Here is how you would use basalt:
First you have to open your computer and type the following line into your shell:
wget run https://basalt.madefor.cc/install.lua packedThis command provides you always the most recent version of basalt.

After downloading basalt to your coumputer, you are already ready to use it in your program:
local basalt = require("basalt")
local main = basalt.createFrame()
local aButton = main:addButton():setText("Click me"):setPosition(3,3):onClick(function() basalt.debug("Click me baby one more time!") end)

basalt.autoUpdate() -- this starts the event listener

Github: https://github.com/Pyroxenium/Basalt
Wiki: https://basalt.madefor.cc/#/
Issues: https://github.com/Pyroxenium/Basalt/issues
Discussions: https://github.com/Pyroxenium/Basalt/discussions
Discord Server: https://discord.gg/yM7kndJdJJ

SwatDoge

This is incredible!

NyoriE

#2
Hello,

thank you very much SwatDoge!

Basalt got tons of new updates/fixes and features.
Here is a list on what's changed since the last time i posted here:

- Animations improvements, you are now able to reposition or resize your objects very easily.
- XML got added, means the design part of your UI can be fully done via XML.
- Dynamic Values got added, you are now able to set the size based on another objects size/position, also you are able to set the position dynamically (based on other objects).
- Textfield does now have keywords/pattern support (for creating more advanced editors).
- New Objects: Menubars, Progressbar, Switch, Pane, Image and Graphic.
- You are now able to use the Basalt Package Manager to decide which objects should be downloaded into your local basalt project (means you decide how big basalt is going to be).

There are much more improvements!
Here is a new preview GIF:


Here is the new example's code:
Lua part: basaltPreview2.lua
XML part: basaltPreview2.xml

sigma-octantis

I'll give it a try this afternoon!! I was also writing an UI framework from scratch... but seeing this, developing yet-another-ui-framework feels like a waste of time.

Looks awesome!! Good work!
Check out Saturnus - a language that compiles to lua
You'll be surprised how modern languages can simplify development!

Also check out my ComputerCraft scripts repository!