Releases: CottonMC/LibGui
Releases · CottonMC/LibGui
4.1.1 for 1.17.1 RC 1
Repository version: 4.1.1+1.17.1-rc1
- Updated to 1.17.1 RC 1
4.1.0 for 1.17
4.0.0 for 1.17
Repository version: 4.0.0+1.17
>> Migration guide <<
Added
API
InputResult
: an enum describing whether mouse events are processed or ignored- This allows mouse clicks, scrolling etc. to "pass through" to the parent panel, for example.
Insets
: a data class describing how far the children of a panel are from each sideWPanelWithInsets
: a panel that has insets applied and can automatically reposition children when they are changedWPlainPanel
,WGridPanel
andWBox
support insets out of the box
- Exposed
WAbstractSlider.dragging
withisDragging
(#100) Vec2i
: a generic 2D integer vector used for screen positionsGuiDescription.get/setTitlePos
: used to adjust the title position
Non-API features
WScrollBar
: scrolling is 4 times fasterWListPanel
: added scrolling supportWScrollPanel
: added scrolling supportWButton
: dark mode textures- Widgets cannot be added recursively to themselves or their children
Changed
API changes
- All rendering methods now take a
MatrixStack
- 9patch background painters are now implemented using LibNinePatch.
BackgroundPainters.createNinePatch
was reworked- The
NinePatch
background painter class was replaced withNinePatchBackgroundPainter
Texture
is now a recordCottonHud
methods are now static;CottonHud.INSTANCE
was removedWTextField
fields are now private
Non-API changes
- Updated to Java 16 and Minecraft 1.17
- Updated Mod Menu support for the 2.0 API
BackgroundPainter.VANILLA
no longer has any padding- The default title position is now (8, 6) like in vanilla (from (10, 10) before)
- Root panels are validated automatically, and it is safe to validate them multiple times
Removed
io.github.cottonmc.libgui.client.LibGuiClient
WTextField.insertText
(was unimplemented)WWidget.createPeers
(replaced withvalidate
)
Fixed
4.0.0 Beta 4 for 1.17-rc1
Repository version: 4.0.0-beta.4+1.17-rc1
Added
WPanelWithInsets
as a common superclass forWBox
,WGridPanel
andWPlainPanel
handling the insets logic- Automatically resizing the children of a panel when its insets are modified
- Automatically validating root panels
Changed
- Updated Mod Menu support to 2.0
Fixed
- ValidatedSlot#setVisible crashes on 1.17 (#113)
4.0.0 Beta 3 for 1.17-pre1
Repository version: 4.0.0-beta.3+1.17-pre1
- Forward-ported dupe bug fix (#104 by @GabrielOlvH)
4.0.0 Beta 2 for 1.17-pre1
- The old
NinePatch
background painter class was partially recreated asNinePatchBackgroundPainter
, which has the same padding methods.
4.0.0 Beta 1 for 1.17-pre1
Repository version: 4.0.0-beta.1+1.17-pre1
Changed
- Improved background painter javadoc
- Updated LibNinePatch to 1.1.0 with a more efficient implementation
WTextField
changes- All instance fields are private; use the getters
- Removed unimplemented
WTextField.insertText
- Converted
CottonHud
from singleton enum to a bunch of static methods - Converted
Texture
into a record - Moved
Vec2i
intowidget.data
Fixed
- #111 (partially, a proper fix requires larger rewriting of
WTextField
internals)
4.0.0 Alpha 3 for 21w20a
Repository version: 4.0.0-alpha.3+21w20a
Added
math.Vec2i
: a simple two-dimensional int vectorGuiDescription.get/setTitlePosition
for adjusting the screen's title position
Changed
- The default title position is now (8, 6) like in vanilla (was (8, 8) in 3.4 for normal screens and (10, 10) for normal screens)
Insets
is now a record- 9patch background painters are now implemented with LibNinePatch
Removed
- The
NinePatch
class, 9patch background painters are now created usingBackgroundPainter.createNinePatch
Fixed
- Titles being positioned incorrectly
- Item icons making everything fly away (#108)
4.0.0 Alpha 2 for 21w20a
Repository version: 4.0.0-alpha.2+21w20a
- Port to 21w20a. Fixes #109 (#110) by @Rover656
- support new modmenu api (#103) by @DragonEggBedrockBreaking
3.4.0
Repository version: 3.4.0+1.16.5
- Added
MatrixStack
overloads forScreenDrawing
methods. The other ones are now deprecated, to be removed in 4.0.0. - Added
LibGui.isDarkMode()
as a replacement for directly accessingLibGuiClient.config.darkMode
, which will be removed in 4.0.0. - Fixed dupe bug (#104 by @GabrielOlvH)