Skip to content

Releases: RedstoneParadox/OakTree

0.5.1 Beta

02 Feb 19:45
f1c30ff
Compare
Choose a tag to compare

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 for TexturePainter; vanilla now provides a way to define these properties in your texture's meta files.
    • TexturePainter now only draws GuiSprites, not textures directly; your textures now need to be under the textures/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 Controls; 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

13 Jun 04:48
64f4cf7
Compare
Choose a tag to compare
0.5.0 Beta Pre-release
Pre-release

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 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 the interact, prepare, and draw methods non-recursively.
  • ControlGUI is replaced by RootPanelControl; this has a much cleaner interface and also inherits PanelControl.
  • InteractiveControl has been removed and interaction has been rolled into Control; anything that inherited it previously now directly inherits Control
    • 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
    • ControlStyle has been renamed to Painter
    • Setting a Painter for different node states in a Theme now requires a PainterKey instead of a string.
    • You can no longer set override Painters individually on Controls.
  • SlotControl now uses Minecraft's slot system; you will need a BackingSlot to use it now.
    • Some functionality is still missing and will be added in a future update
  • ButtonControl and SliderControl 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

11 Oct 16:28
Compare
Choose a tag to compare
0.4.2 Beta Pre-release
Pre-release
  • Changed the filter helper methods in SlotControl to work properly and allow for toggling between allowing or denying the passed items.
  • Added some @ApiStatus.Internal annotations to internal methods in Control.

Oak Tree 0.4.1 Beta

19 Sep 18:38
Compare
Choose a tag to compare
Oak Tree 0.4.1 Beta Pre-release
Pre-release
  • Update to 1.16.3
  • That's it, really.

0.4.0 Beta

07 Jun 18:18
Compare
Choose a tag to compare
0.4.0 Beta Pre-release
Pre-release

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 now Vector2, ControlDirection is now Direction2D, ScreenRect is now Rectangle, and all three now reside under the client.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 of BiFunction.
  • ControlAnchor is now Anchor and resides in the client.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 of SplitControl.
  • 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 the client.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 now ControlStyle
  • 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 to TextHelper and RenderHelper.
  • LabelControl now supports minecraft's Text so you can apply formatting, though it's a bit buggy at the moment.
  • TextEditControl now uses a oaktree.util.TriFunction instead of a TypingListener.

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() and SlotControl#canInsert() methods taking TriFunctions have been deprecated in favor of ones that take oaktree.util.TriPredicates
  • Now uses a Color for highlighting instead of a ControlStyle

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

30 May 04:31
Compare
Choose a tag to compare
Oak Tree 0.3.0 Alpha Pre-release
Pre-release
  • All logic that was previously handled by OakTreeGUI implementations has been moved to ControlGui, which is
    now used to manage a Control tree.
    • Additionally, ScreenBuilder, OakTreeScreen, and OakTreeHandledScreen have all been deprecated.
  • Anything variables and fields that stored a value in pixels is now an int as opposed to a float since you can't have a fraction of a pixel.
  • The size and position of a Control is now stored in a ScreenRect.
  • Controls 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 replace ItemSlotControl as a custom item slot implementation.
  • General cleanup.

Oak Tree 0.2.0 Alpha

14 Feb 23:03
Compare
Choose a tag to compare
Oak Tree 0.2.0 Alpha Pre-release
Pre-release
  • 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; Replaces SplitBoxControl.
    • 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 the ScreenBuilder. 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 the OakTreeGUI; if you implemented OakTreeGUI, 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 using ScreenBuilder if you haven't already.
  • TextureStyleBox now has a tiling mode for tiling textures.
  • TextureStyleBox (and NinePatchStyleBox 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

21 Dec 04:27
Compare
Choose a tag to compare
Oak Tree 0.1.4 Alpha Pre-release
Pre-release
  • 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

18 Dec 05:03
Compare
Choose a tag to compare
Oak Tree 0.1.3 Alpha Pre-release
Pre-release
  • Made a lot of formerly private fields public

Oak Tree 0.1.2 Alpha

17 Dec 04:17
Compare
Choose a tag to compare
Oak Tree 0.1.2 Alpha Pre-release
Pre-release

Fixed an issue where you couldn't press enter in a TextEditControl.