Releases: CottonMC/LibGui
Releases · CottonMC/LibGui
3.0.0
Repository version: 3.0.0+1.16.3
Added
TooltipBuilder
for creating widget tooltips. It replaces the oldList<Text>
with a nicer API that can take bothText
s andOrderedText
s.Texture
for specifying UV values for any textures- Texture objects can be used with these widgets and icons:
TextureIcon
WBar
WSprite
WTiledSprite
WToggleButton
ScreenDrawing
has new methods for drawingTexture
s
- Texture objects can be used with these widgets and icons:
- Change listeners for
WItemSlot
andValidatedSlot
- Instances of
WItemSlot.ChangeListener
can be added toWItemSlot
s usingWItemSlot.addChangeListener
- Slot change listeners are fired when a slot is modified or otherwise marked dirty
- Instances of
- Tab panels that have a list of tabs at the top
- Card panels that show one widget ("card") at a time
WWidget
now has two methods,onShown
andonHidden
, that can be called when a widget is shown or hidden by its parent panel- This is used in card panels and tab panels for hiding slots properly
Changed
- Updated to Minecraft 1.16.2 RC2 and latest versions of dependencies
- Widgets now take a
Text
again instead ofStringVisitable
ScreenDrawing
takesOrderedText
s instead ofStringVisitable
sWWidget.addTooltip
takes aTooltipBuilder
instead of aList<Text>
- The texture fields in
WBar
,WSprite
andWToggleButton
useTexture
s instead ofIdentifier
s
Fixed
3.0.0 Beta 1
Repository version: 3.0.0-beta.1+1.16.2-rc2
Added
TooltipBuilder
for creating widget tooltips. It replaces the oldList<Text>
with a nicer API that can take bothText
s andOrderedText
s.Texture
for specifying UV values for any textures- Texture objects can be used with these widgets and icons:
TextureIcon
WBar
WSprite
WTiledSprite
WToggleButton
ScreenDrawing
has new methods for drawingTexture
s
- Texture objects can be used with these widgets and icons:
- Change listeners for
WItemSlot
andValidatedSlot
- Instances of
WItemSlot.ChangeListener
can be added toWItemSlot
s usingWItemSlot.addChangeListener
- Slot change listeners are fired when a slot is modified or otherwise marked dirty
- Instances of
Changed
- Updated to Minecraft 1.16.2 RC2 and latest versions of dependencies
- Widgets now take a
Text
again instead ofStringVisitable
ScreenDrawing
takesOrderedText
s instead ofStringVisitable
sWWidget.addTooltip
takes aTooltipBuilder
instead of aList<Text>
- The texture fields in
WBar
,WSprite
andWToggleButton
useTexture
s instead ofIdentifier
s
Fixed
2.3.0
2.2.0
Repository version: 2.2.0+1.16.1
Added
WTiledSprite
: getters (#72 by @fiws) and setters fortileWidth
andtileHeight
- Icon API:
- Icons are drawable square objects that can be attached to some widgets; currently only to buttons.
- Two default types of icons:
ItemIcon
which draws an item stack, andTextureIcon
which draws a texture
- Added a getter for
WButton.onClick
Fixed
2.1.1
2.1.0
Repository version: 2.1.0+1.16.1
Added
GuiDescription.get/setTitleAlignment
: for modifying the horizontal alignment of titlesGuiDescription.setTitleColor(int, int)
: for setting the light and dark title colors separatelyWWidget.get/setHost
: for modifying the widget host directly in cases wherevalidate
cannot be used, such as lists- Alignment support for
WBox
Changed
- Deprecated
WWidget.createPeers
in favour ofWWidget.validate
Fixed
- Slot peers having incorrect IDs (#68)
GuiDescription.setTitleColor(int)
not setting the dark title color
2.0.1
2.0.0
Repository version: 2.0.0+1.16
Changes from beta 5
- Added vertical alignment support for `WText`
- Updated to 1.16 stable
See the migration guide.
Added
- Keyboard navigation
WBox
: a BoxLayout-like panel that lays widgets on an axisWScrollPanel
: a scrollable widget wrapper- A lot of new getters, setters and text rendering methods were added
- Player inventory widgets now have an
Inventory
label by default - Global GL scissor stack (#59)
WTiledSprite
(#62 by @fiws)- Texture rendering methods with opacity (#63 by @fiws)
- Fullscreen mode for screens (#66)
- Item slot filters
- The screen title can now be hidden through methods in
GuiDescription
- New methods in
SyncedGuiDescription
to get meaningful fallback values for missing property delegates and inventories (useful with simple screen handlers)
Changed
CottonCraftingController
was renamed toSyncedGuiDescription
- Instead of a
RecipeType
, theSyncedGuiDescription
constructor now takes aScreenHandlerType
that can be registered with Fabric API'sScreenHandlerRegistry
.
- Instead of a
- Text alignment changes
Alignment
was renamed toHorizontalAlignment
- Added
VerticalAlignment
WLabel/WText.alignment
->horizontalAlignment
, added vertical alignment support for text widgets
- Widget labels and tooltips now use
StringRenderable
s instead ofText
s - The default background painter is now the 9patch background painter for resource pack support
WItemSlot
's unusedltr
constructor parameter was removed- Custom widgets
WWidget.paintBackground
has been renamed topaint
. It now also takes theMatrixStack
used for screen rendering.- All text rendering methods in
ScreenDrawing
also take a matrix stack now.
Removed
- All deprecated content
- Unused style class
BackgroundPainter.VANILLA_9PATCH
2.0.0 Beta 5
Repository version: 2.0.0-beta.5+1.16-rc1
Added
- Item slot filters
- New methods to get meaningful fallback values for missing property delegates and inventories (useful with simple screen handlers)
2.0.0 Beta 4
Repository version: 2.0.0-beta.4+1.16-pre8
Added
GuiDescription.isTitleVisible
/setTitleVisible
Fixed
- Player inventory labels not matching the title color of the GUI
- GUI titles being at wrong places