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
NinePatchPainter
and tiling mode forTexturePainter
; vanilla now provides a way to define these properties in your texture's meta files.TexturePainter
now only drawsGuiSprite
s, not textures directly; your textures now need to be under thetextures/gui/sprites
directory in your resource pack. Again, this is a vanilla change.
Control
ids are now referred to as names to avoid confusion with vanilla's id system.- Tooltips no longer can be made using
Control
s; Oak Tree now uses vanilla's tooltip system to ensure mod compatibility. ButtonControl
now 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.
Control
methods 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,Control
and 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
Control
s 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. Control
s are now z-indexed whenever the tree is updated; this is used to call theinteract
,prepare
, anddraw
methods non-recursively.
- The positions and sizes of
ControlGUI
is replaced byRootPanelControl
; this has a much cleaner interface and also inheritsPanelControl
.InteractiveControl
has 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.
Control
s can also have capture behavior disabled.
- Lambda functions passed to
Control
s have had parameters removed that were no longer necessary. - Theming updates
ControlStyle
has been renamed toPainter
- Setting a
Painter
for different node states in aTheme
now requires aPainterKey
instead of a string. - You can no longer set override
Painters
individually onControl
s.
SlotControl
now uses Minecraft's slot system; you will need aBackingSlot
to use it now.- Some functionality is still missing and will be added in a future update
ButtonControl
andSliderControl
can now have text.- Added
EntityPreviewControl
for 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
filter
helper methods inSlotControl
to work properly and allow for toggling between allowing or denying the passed items. - Added some
@ApiStatus.Internal
annotations 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
Control
classes have been removed; you must now use the setters and getters. - JetBrains
@NotNull
and@Nullable
annotations have been used to clarify nullity in many places. ScreenVec
is nowVector2
,ControlDirection
is nowDirection2D
,ScreenRect
is nowRectangle
, and all three now reside under theclient.math
package- The
Key
enum is scheduled for removal because it was never used (in production) in the first place. GuiFunction
has been deprecated in favor ofBiFunction
.ControlAnchor
is nowAnchor
and resides in theclient.gui.control
package.- Parent controls such as
PanelControl
are now responsible for checking the visibility of their children before drawing. SplitPanelControl
was 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
Color
and moved to theclient.gui
package. - 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
:
StyleBox
is nowControlStyle
- Default values for both have been provided and should be used instead of
null
. - Had all of the rendering logic moved to
RenderHelper
in the client package.
Text-based controls:
- No longer rely on
TextControl
; all logic from that interface has been moved toTextHelper
andRenderHelper
. LabelControl
now supports minecraft'sText
so you can apply formatting, though it's a bit buggy at the moment.TextEditControl
now uses aoaktree.util.TriFunction
instead of aTypingListener
.
Tooltips:
- Can be added to any
InteractiveControl
and will display when hovering the mouse over them. SlotControl
will 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 takingTriFunction
s have been deprecated in favor of ones that takeoaktree.util.TriPredicate
s- Now uses a
Color
for 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
OakTreeGUI
implementations has been moved toControlGui
, which is
now used to manage aControl
tree.- Additionally,
ScreenBuilder
,OakTreeScreen
, andOakTreeHandledScreen
have all been deprecated.
- Additionally,
- Anything variables and fields that stored a value in pixels is now an
int
as opposed to afloat
since you can't have a fraction of a pixel. - The size and position of a
Control
is now stored in aScreenRect
. Control
s are now properly z-indexed.- Added
DropdownControl
which 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 replaceItemSlotControl
as a custom item slot implementation. - General cleanup.
Oak Tree 0.2.0 Alpha
- Added
PanelControl
, which can have multiple children Controls; has multiple subclasses:GridPanelControl
can be split into a grid; replaces GridControl.PagedPanelControl
treats each child as an individual "page" and only displays one at a time.SplitPanelControl
can be split into two different-sized sections and will display children on one side or the other; ReplacesSplitBoxControl
.ListPanelControl
arranges 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
OakTreeGUI
directly or through theScreenBuilder
.Theme#vanilla()
is a static method that generates a vanilla-styled theme. - Added
NinePatchStyleBox
which allows for textures to be drawn in a nine-patch rectangle fashion. TextEditControl
has 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
TextEditControl
reads key press values from theOakTreeGUI
; if you implementedOakTreeGUI
, you will need to update to the new system. - Removed the screen-creation methods from
Control
as they have been deprecated for a while now. Please switch to usingScreenBuilder
if you haven't already. TextureStyleBox
now has a tiling mode for tiling textures.TextureStyleBox
(andNinePatchStyleBox
by 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.