Releases: RedstoneParadox/OakTree
0.5.1 Beta
Hello, despite this being a minor release, there are breaking changes. This is due to a combination of breaking changes in Minecraft's code that affect my mod and not having enough motivation to make a fully-fledged release.
- Update to Minecraft 1.20.2
- Updated javadocs/added javadocs to things that didn't have javadocs before
- Removed
NinePatchPainterand tiling mode forTexturePainter; vanilla now provides a way to define these properties in your texture's meta files.TexturePainternow only drawsGuiSprites, not textures directly; your textures now need to be under thetextures/gui/spritesdirectory in your resource pack. Again, this is a vanilla change.
Controlids are now referred to as names to avoid confusion with vanilla's id system.- Tooltips no longer can be made using
Controls; Oak Tree now uses vanilla's tooltip system to ensure mod compatibility. ButtonControlnow has a click sound.- Fixed bugs with
SlotControl - Internal cleanup and probably some other things I forgot since this was supposed to release last September but then 1.20.2 happened
0.5.0 Beta
While I would love to say that I was able to add many new features since the last release in 2020, this update mostly focuses on some long-awaited internal rewrites and code organization that I developed on and off while dealing with IRL stuff. Fortunately, this means that I can focus more on new features and polish in future updates.
For those of you who are still using Oak Tree, thank you for your patience.
- Now requires Quilt modloader.
Controlmethods with a generic return type have been removed; I originally wanted GUIs to be constructed in a tree-like-DSL-like fashion, but this proved to be too messy to maintain. Consequentially,Controland its subclasses no longer have a generic argument.- The overall package structure has been changed and is now a lot flatter.
- Render call changes
- The positions and sizes of
Controls in a tree are now only updated when necessary instead of every frame. Note that this is still every frame when a tooltip is visible; this will be addressed in a future update. Controls are now z-indexed whenever the tree is updated; this is used to call theinteract,prepare, anddrawmethods non-recursively.
- The positions and sizes of
ControlGUIis replaced byRootPanelControl; this has a much cleaner interface and also inheritsPanelControl.InteractiveControlhas been removed and interaction has been rolled intoControl; anything that inherited it previously now directly inheritsControl- This fixes a bug where an interactive control could capture the mouse despite being covered up.
Controls can also have capture behavior disabled.
- Lambda functions passed to
Controls have had parameters removed that were no longer necessary. - Theming updates
ControlStylehas been renamed toPainter- Setting a
Painterfor different node states in aThemenow requires aPainterKeyinstead of a string. - You can no longer set override
Paintersindividually onControls.
SlotControlnow uses Minecraft's slot system; you will need aBackingSlotto use it now.- Some functionality is still missing and will be added in a future update
ButtonControlandSliderControlcan now have text.- Added
EntityPreviewControlfor displaying entities (Courtesy of halotroop2288) - Removed test code from distribution
- A few Javadoc updates.
- Anything previously marked as deprecated has been removed
- Deprecations all around
- Probably some things I missed.
0.4.2 Beta
- Changed the
filterhelper methods inSlotControlto work properly and allow for toggling between allowing or denying the passed items. - Added some
@ApiStatus.Internalannotations to internal methods inControl.
Oak Tree 0.4.1 Beta
- Update to 1.16.3
- That's it, really.
0.4.0 Beta
Changelog
General:
- Direct access to fields in
Controlclasses have been removed; you must now use the setters and getters. - JetBrains
@NotNulland@Nullableannotations have been used to clarify nullity in many places. ScreenVecis nowVector2,ControlDirectionis nowDirection2D,ScreenRectis nowRectangle, and all three now reside under theclient.mathpackage- The
Keyenum is scheduled for removal because it was never used (in production) in the first place. GuiFunctionhas been deprecated in favor ofBiFunction.ControlAnchoris nowAnchorand resides in theclient.gui.controlpackage.- Parent controls such as
PanelControlare now responsible for checking the visibility of their children before drawing. SplitPanelControlwas not up to standards and has been deprecated in favor ofSplitControl.- Anything previously deprecated has been removed.
- Some javadoc updates.
- Lots of cleanup.
- Other changes that I probably have forgotten since there were so many of them.
RGBAColor:
- Renamed to
Colorand moved to theclient.guipackage. - Is now immutable.
- Has static methods to create it using RGB(A) or HSV(A), though it is still RGBA internally.
- Presets for all 16 of Minecraft's font colors are now provided.
Theme and StyleBox:
StyleBoxis nowControlStyle- Default values for both have been provided and should be used instead of
null. - Had all of the rendering logic moved to
RenderHelperin the client package.
Text-based controls:
- No longer rely on
TextControl; all logic from that interface has been moved toTextHelperandRenderHelper. LabelControlnow supports minecraft'sTextso you can apply formatting, though it's a bit buggy at the moment.TextEditControlnow uses aoaktree.util.TriFunctioninstead of aTypingListener.
Tooltips:
- Can be added to any
InteractiveControland will display when hovering the mouse over them. SlotControlwill automatically set its own tooltips atm; this will likely be changed in the following update.
SlotControl:
- No longer has wonky rendering issues.
SlotControl#canTake()andSlotControl#canInsert()methods takingTriFunctions have been deprecated in favor of ones that takeoaktree.util.TriPredicates- Now uses a
Colorfor highlighting instead of aControlStyle
Roadmap notes:
This release marks the end of the alpha phase and the beginning of the beta phase for Oak Tree, which will mostly consist of major polishing and renovations in order to get it ready of 1.0.0. Originally, this was supposed to be the only beta version but I had underestimated the amount of technical debt accumulated and the size of the cleanup needed to be done and it's likely that there will be another beta version after the next one. That being said, I still have new features planned such as TabControl and direct support for darkmode, though it's likely that either of those won't come until version 1.0.0.
Oak Tree 0.3.0 Alpha
- All logic that was previously handled by
OakTreeGUIimplementations has been moved toControlGui, which is
now used to manage aControltree.- Additionally,
ScreenBuilder,OakTreeScreen, andOakTreeHandledScreenhave all been deprecated.
- Additionally,
- Anything variables and fields that stored a value in pixels is now an
intas opposed to afloatsince you can't have a fraction of a pixel. - The size and position of a
Controlis now stored in aScreenRect. Controls are now properly z-indexed.- Added
DropdownControlwhich functions like a dropdown menu button, though you can add any control as a child. - Added
SliderControl, which can be used for making sliders and scroll bars. - Added
SlotControl, which is intended to replaceItemSlotControlas a custom item slot implementation. - General cleanup.
Oak Tree 0.2.0 Alpha
- Added
PanelControl, which can have multiple children Controls; has multiple subclasses:GridPanelControlcan be split into a grid; replaces GridControl.PagedPanelControltreats each child as an individual "page" and only displays one at a time.SplitPanelControlcan be split into two different-sized sections and will display children on one side or the other; ReplacesSplitBoxControl.ListPanelControlarranges children in a list and can be scrolled and display only some of its children at once.
- Added Themes; A collection of styleboxes that can be applied to an
OakTreeGUIdirectly or through theScreenBuilder.Theme#vanilla()is a static method that generates a vanilla-styled theme. - Added
NinePatchStyleBoxwhich allows for textures to be drawn in a nine-patch rectangle fashion. TextEditControlhas had some changes in functionality bringing it much closer to the vanilla book editing screen such as being able to move the cursor around.- As its logic had to be rewritten from scratch, there are few things to iron out that will come in 0.2.1-alpha (or possibly 0.2.2-alpha).
- Changed the way that
TextEditControlreads key press values from theOakTreeGUI; if you implementedOakTreeGUI, you will need to update to the new system. - Removed the screen-creation methods from
Controlas they have been deprecated for a while now. Please switch to usingScreenBuilderif you haven't already. TextureStyleBoxnow has a tiling mode for tiling textures.TextureStyleBox(andNinePatchStyleBoxby extension) now requires the file dimension for proper scaling as well as the scale property if you need to tweak things further.- Probably some other stuff I've forgotten.
Oak Tree 0.1.4 Alpha
- Pressing the "open/close inventory" key while a TextEditControl is focused no longer closes the screen.
- Fixed issue with cursor rendering on TextEditControl.
Oak Tree 0.1.3 Alpha
- Made a lot of formerly private fields public
Oak Tree 0.1.2 Alpha
Fixed an issue where you couldn't press enter in a TextEditControl.