A powerful generalist UI framework.
BrokkGUI is a complete framework for making GUIs in Minecraft mods. It features a CSS parser/engine, clear data bindings and an extensive collection of base components.
🚧 The framework is currently in beta and will soon release in 1.0.0
The framework is composed of several projects. You should use one of the available bindings since the core project is not usable alone. BrokkGUI depends on two additional libraries not present in Minecraft :
To depend on a binding add the following to your gradle build file :
repositories {
maven {
url 'https://maven.ferenyr.info/artifactory/libs-release'
}
}
dependencies {
compile 'net.voxelindustry:brokkgui-binding-mc<minecraft version>:<version number>'
}
Since BrokkGUI is not currently released it is advised to shade it in your jar with the gradle shadow plugin.
The core project is platform agnostic and a binding must be created to control the rendering.
This allow the framework to work seamlessly between multiple minecraft versions and could work on other games or platforms.
There are several officials bindings bundled in this repository but the creation of third-party bindings is encouraged if you target a specific platform.
Platform | Status | Future |
---|---|---|
Minecraft 1.12 | Obsolete | |
Minecraft 1.14 | Full support | ✅Latest |
Minecraft 1.15 | Obsolete | |
Minecraft 1.16 (Fabric) | In progress |
The framework support styling of GUIs and components with CSS code.
CSS styling make your UIs easily modifiable and more consistent with the use of global themes.
For example this code added to a global theme in your project will remove the default shadow of all text labels and color them like the Minecraft ones:
label > text {
shadow: false;
color: #404040;
}
A GUI made with one binding will be seamlessly compatible with another if no specific features were used. It allow a GUI to work on multiple Minecraft versions without hassle.
The components of the framework combined with the CSS styling let you reuse the base components or your custom ones everywhere in a project.
The use of TeaBeans enable a clear separation of the UI skin and style from the data and controls.
Multiple events have been added on the base components allowing you to react on hover, disable, click, text type, scroll and so on...
The framework contains the following base components:
- Buttons
- GuiButton
- GuiToggleButton
- GuiCheckbox
- GuiRadioButton
- Labels
- GuiLabel
- GuiLink
- Inputs
- GuiTextfield
- GuiTextfieldComplete (Auto completed textfield)
- Panels and containers
- GuiListView
- ScrollPane
- GuiAbsolutePane
- GuiRelativePane
- GuiTabPane
- Windows
- GuiToast
- GuiTooltip
- SubGuiScreen
Components available only in Minecraft bindings:
- FluidStackView
- ItemStackView
- MCTooltip
Theses examples are GUIs made with the framework and showcase some features combination.
- Ourten - Initial work
See also the list of contributors who participated in this project.
This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details