README WIP SOME THINGS MIGHT BE INACCURATE
Aether UI
Aether is anti-aliased UI engine designed for Minecraft, and general LWJGL. It is compatible with LWJGL 3, and legacy. The engine follows an HTML/CSS declarative style where properties are defined within a css style file, and are constructed with a build file. This allows extreme customization on the client side, although, if you have no interest in allowing customization, the styles, and build data can be created within the code. Backend, calls are made to NanoVG which then renders the UI onto the screen. However, LWJGL 2, unlike LWJGL 3, does not package NanoVG by default, and instead requires a bit of trickery to load.
Getting started:
Basics:
Components all have their own styles. n nnnnnnnnnnn
Styles
Styles act similar to css. They allow you to assign properties to component's via a file, or directly in a class. They control properties such as the component's background color, or text size.
Take this example,
h1 {
text-font-face: Bold;
text-size: 48;
text-color: rgb(255, 255, 255, 1.0);
}
A style is defined by its name followed by a block which contain the properties of the sheet by using curly brackets {
and }
. Inside that block, a property is defined by its name, followed by a colon :
and the property intended on being set to. There are a few different units at your disposal, see them here. Finally, add a semicolon ;
to show that you are done writing the property.
Sometimes, you might use a function to set a property as it can make it easier to read, and write. An example is the rgb
function shown above. Functions can be declared by specifying the name, and then adding parentheses (
)
. Inside those parentheses, parameters can be specified. To add multiple parameters, use a comma ,
to add a new parameter.
Parenting
Components can be nested within other components, however the only change if the offset of the nested component's position. (Which is offset to it's parent's position). However, if the component is an instance of a
UICotainer
the child should be placed inside the UIContainer's component list, instead of the main component's list.
This project is All Rights Reserved. (We may change the licensing terms in the future.)