- Fixed halplibe dependency
Major Update: Version 2.0.0p3
BUI Enhancements
- New Features:
- Added a main menu button to open the BUI menu.
- Introduced the "Detected Projects" menu inside the new BUI menu.
- XML files from
GuiLib/TestFolder/
within the main BTA run folder can now be opened. - Added
AdvancedGuiScreen
for GUIs unrelated to blocks. - Enhanced the Refresh (F12) function.
- Added a new
setup()
function inPage.java
:- Accepts a lambda containing the page logic.
- Introduced
textureManager
:- Manages texture properties loaded from YAML files.
- Added
GuiHelper
with:- Public static variables for
mouseX
andmouseY
. - Other useful functions.
- Public static variables for
- Updated the logo and added new textures.
- Removed hardcoded routes.
Nodes System Updates
- Replacements & Additions:
- Replaced
Bar.java
withLayout
. - Added Scrollable Layout.
- Layout direction is now declared as an attribute of
Layout
andScrollableLayout
.
- Replaced
- Fixes & Improvements:
- Fixed local and global positioning.
- Added
selfPlacement
capacity. - Simplified the
INode
interface. - Improved
ClickableElement
logic. - Nodes can now be retrieved by ID, group, or tag from
INode
instances.
- Removals & Deprecations:
- Removed
Panel
node. - Deprecated
Slider
node (pending fixes). - Removed the
Graph
node.
- Removed
XML Overhaul
- Additions:
- Added tags:
layout
andscrollableLayout
.easterEgg
.
- Added a version field.
- Introduced a new template/component system:
- Organize components into modules within the
template
tag using names. - Call components using the
call
tag with thecomponent
attribute. - Access components programmatically via
GuiHelper.getComponent
.
- Organize components into modules within the
- Introduced linking styles:
- Use the
link
tag with thesrc
attribute to load styles from/assets
or absolute paths. - Combine multiple styles effortlessly.
- Use the
- Added tags:
- Fixes:
- Resolved schema tag order issues in the root (tag order no longer matters).
- Added new error/warning messages.
- Removals:
- Removed
bar
andpanel
tags.
- Removed
YAML Improvements
- New Features:
- Introduced a Textures system:
- Declare textures and reuse them by ID.
- Added new background display methods:
NINE_SLICE
,STRETCH
,TILE
(credit: @Useless).
- Enhanced selectors system:
- Added direct parent [
tag > tag
] and common ancestor [tag ( tag
]. - Supported by
.group
,$id
, and tag name selectors. - Selectors can now be combined.
- Added direct parent [
- Introduced specificity system for selectors.
- Introduced a Textures system:
- Enhancements:
- Improved
sharedProperties
field. - Enhanced hex color format support:
- Formats:
"#RRGGBB"
,"0xRRGGBB"
, or"RRGGBB"
.
- Formats:
- Added
selfPlacement
for nodes to define their placement.
- Improved
- Removals:
- Removed
panelLengthX
andpanelLengthY
. - Removed
tileSize
.
- Removed
- Additional Updates:
- Added a version field.
- Introduced new error/warning messages.
And many more changes I can’t remember, yay!
Acknowledgements
- @UselessBullets:
- Contributed the
drawGuiTexture()
function.
- Contributed the
- @Olypolyu:
- Fixed issues, provided ideas, and contributed directly.
📜 Bug Fixes and Improvements
Bug Fixes
- Permanent Rune Player file removed
- Removed a remnant from another mod.
- Default styles not applying in
/assets
loaded files- Fixed to ensure default styles are applied as expected.
Improvements
- Enhanced XML and YAML examples
- Optimized examples for better clarity and usefulness.
🚀 Pre-Release Notes
🆕 New Features
- Custom XML with schemas: Improved XML support with schema validation.
- YAML with schemas: Added robust YAML support with schema validation.
- F12 Shortcut: Quickly refresh XML and YAML files with a single key press.
- Utilities for modders: New tools to simplify mod development.
- Autogenerated testing folders for modders: Streamlined testing setup.
🛠️ Improvements
- Slot and player inventory support: Fixed and enhanced functionality.
- Code examples: Enhanced examples and added new XML and YAML usage examples.
- Resize signals: Optimized for better performance and reliability.
🔄 Refactor and Optimization
- Reorganized code: Cleaned up code, folders, and class structure for easier navigation.
- Renamed class names, textures, and functions: Improved naming conventions for clarity.
- Refactored all Nodes: Comprehensive node refactoring for improved maintainability.
🗂️ Other Enhancements
- Improved project structure and organization.
- Tons of additional updates and fixes—check out the commit log for full details!
New Elements
- ProgressBar
- Text
- TextField
- TextArea
- ScrollBar
- Crafting Table
Fixes
- Resolved dark textures appearing after using fake slots.
- Corrected positioning of parent-child elements.
- Fixed positioning issues between pages and elements.
- Adjusted positioning when resizing the Minecraft window.
Changes and New Content
-
Standardization: Streamlined how positioning is handled for elements across both pages and parent-child nodes.
-
Texture Improvements: Enhanced the
Texture
class and introducedAnimatedTexture
. -
Renamed Key Functions: Updated function names across multiple classes, including
IElement
,Element
,Texture
, etc. -
Lambda Configuration: The
config()
function forIElement
now utilizes a lambda (more information available in the wiki). -
Theme-Based Textures: Textures are now sourced from the theme system using the
Texture
class with its specific secondary constructor for themes. -
Removed Dark Theme: The dark theme has been removed until further updates.
-
PageGui Configuration:
PageGui
now receives its configuration through a lambda, similar toIElement
. -
TextField and TextArea Styles:
TextField
andTextArea
now includetextFieldStyle
along with aconfig()
method that accepts an instance ofTextFieldStyle
to customize their styles. -
Resize Signals: Added signals to detect when the Minecraft window size changes.
-
Text Change Signals: Introduced signals to track changes in text for
TextField
andTextArea
. Added lambdas that will execute on specific events related to these fields. -
Mod Logo Update: The mod logo has been changed.
-
Texture Support Enhancements: Now supports textures larger than 256 pixels, along with zoom capabilities. More details can be found in the wiki page regarding the
Texture
class. -
And Many More Features: A variety of additional changes and improvements have been made that may not be listed here.
Full Changelog: https://github.com/Garkatron/BTA-GuiLibrary/compare/0.1.9...1.1.0
Current Elements
- Slot: Grid cell for inventories and grid-based applications.
- Panel: Container for grouping elements.
- Row:
- Column:
- PlayerInventory: Configurable player inventory representation.
- FreeElement: Flexible element for custom needs.
- DraggableElement
- ClickableElement
- Button
- ProgressBar
- Text
- TextField
- TextArea