Releases: CottonMC/LibGui
Releases · CottonMC/LibGui
12.0.0 for Minecraft 1.21.2/3
Repository version: 12.0.0+1.21.2
Added
GuiDescription.get/setUseDefaultRootBackground
: can be used to disable the default background painter if your root panel doesn't need it (useful for tab panels)Scissors.push
overload taking a nullableDrawContext
. It's highly recommended that you move existing code to use this overload since it flushes buffered draw calls automatically. Otherwise, parts of widgets etc. can just disappear in GUIs using scissors.
Changed
- Updated to 1.21.2/3
WDynamicLabel.alignment
renamed tohorizontalAlignment
(along with getters and setters)
11.1.0 for Minecraft 1.21(.1)
Repository version: 11.1.0+1.21
Added
- Option for
WLabel
,WText
andWDynamicLabel
to draw shadows (#248 by @MarcusElg, #233, #245) - Vertical alignment in
WDynamicLabel
and a getter for the horizontal alignment (#249 by @MarcusElg, #202) - Many new public properties in
WItemSlot
:- Getters for the backing inventory details:
getInventory
,getStartIndex
,getSlotsWide
,getSlotsHigh
- Getters for the slot peer details:
getPeers
,getPeerStartId
(#247)
- Getters for the backing inventory details:
- Missing javadoc for some methods in the widgets mentioned before
Fixed
- Incorrect links and whitespace characters in javadoc
11.0.0 for Minecraft 1.21
Repository version: 11.0.0+1.21
Changed
- Updated to Minecraft 1.21
Removed
- Previously deprecated APIs:
ValidatedSlot.getFilter
ValidatedSlot.setFilter
WItemSlot.getFilter
WItemSlot.setFilter
WListPanel.margin
10.0.0 for Minecraft 1.20.6
Repository version: 10.0.0+1.20.6
Added
SyncedGuiDescription.getWorld
Changed
- Updated to Minecraft 1.20.6 (#242 by @acikek)
ScreenNetworking
now uses codecs instead of raw buffer access to better work with the game's networking updates
Fixed
- Multiframe sprites skipping the last frame (#236 by @falseresync)
9.2.2 for Minecraft 1.20.2-1.20.4
Repository version: 9.2.2+1.20.2
Fixed
WSlider
having a client-sided field initialisers leading to a crash with Fabric Loader 0.15 (related to #231)
8.1.1 for Minecraft 1.20.1
Repository version: 8.1.1+1.20.1
Fixed
- Client-sided field initialisers being used in common classes, leading to a crash with Fabric Loader 0.15 (#231)
9.2.1 for Minecraft 1.20.2-1.20.4
Repository version: 9.2.1+1.20.2
Fixed
- Client-sided field initialisers being used in common classes, leading to a crash with Fabric Loader 0.15 (#231)
9.2.0 for Minecraft 1.20.2
Repository version: 9.2.0+1.20.2
Added
- Ghost item icons (#228). You can make item icons have a "ghost" look like in the recipe book by calling
ItemIcon.setGhost(true)
. CottonInventoryScreen.paintDescription
for painting the GUI description of the screen
Fixed
9.1.0 for Minecraft 1.20.2
Repository version: 9.1.0+1.20.2
Added
WScrollPanel
scroll bar getters and setters (#225 by @tal5)WListPanel.insets
andWListPanel.gaps
properties for controlling the list item positioning (#221)WScrollPanel.insets
: for applying insets to the viewed widgetInsets.width()
andInsets.height()
: methods that compute the total width/height from insetsWItemSlot.iconOnlyPaintedForEmptySlots
(#203): can be set totrue
to hide icons when a slot has items
Fixed
Screen.renderBackground
being called twice (#226)WWidget.addPainters
not being called for allWListPanel
children
Deprecated
WListPanel.margin
field: replaced withinsets
andgaps
9.0.0 for Minecraft 1.20.2
Repository version: 9.0.0+1.20.2
Added
BackgroundPainter.createGuiSprite
: creates a background painter from a sprite on the GUI atlasTexture
now supports both standalone texture files and sprites on the GUI atlas- The
Texture.Type
enum has two values:STANDALONE
andGUI_SPRITE
- Each sprite has an associated
Type
value. The pre-existing constructors still create standalone textures, but you can also passType.GUI_SPRITE
to wrap GUI sprites
- The
WScrollBar.get/setScrollingSpeed
to control the mouse scroll speed of scroll bars (#218 by @LopyMine)
Changed
- Updated to Minecraft 1.20.2
WButton
andWLabeledSlider
can now have any height- Note: this can lead to existing screens rendering slightly differently. If you want the old behaviour, you can set the height to 20 manually.
WWidget.onMouseScroll
now has support for both horizontal and vertical scrolling- Many texture files were moved to the GUI sprite atlas to support vanilla's data-driven nine-slice textures.
libgui:textures/widget/dark_widgets.png
was moved and split up:- Note: these names match the corresponding light mode vanilla textures.
libgui:textures/gui/sprites/widget/button_dark.png
libgui:textures/gui/sprites/widget/button_disabled_dark.png
libgui:textures/gui/sprites/widget/button_highlighted_dark.png
libgui:textures/gui/sprites/widget/slider_handle_dark.png
libgui:textures/gui/sprites/widget/slider_handle_highlighted_dark.png
- Panel textures were moved:
libgui:textures/widget/panel_dark.png
->libgui:textures/gui/sprites/widget/panel_dark.png
libgui:textures/widget/panel_light.png
->libgui:textures/gui/sprites/widget/panel_light.png
- Scroll bar textures were moved:
libgui:textures/widget/scroll_bar/background_dark.png
→libgui:textures/gui/sprites/widget/scroll_bar/background_dark.png
libgui:textures/widget/scroll_bar/background_light.png
→libgui:textures/gui/sprites/widget/scroll_bar/background_light.png
libgui:textures/widget/scroll_bar/focus.png
→libgui:textures/gui/sprites/widget/scroll_bar/focus.png
libgui:textures/widget/scroll_bar/thumb_dark.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_dark.png
libgui:textures/widget/scroll_bar/thumb_hovered_dark.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_hovered_dark.png
libgui:textures/widget/scroll_bar/thumb_hovered_light.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_hovered_light.png
libgui:textures/widget/scroll_bar/thumb_light.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_light.png
libgui:textures/widget/scroll_bar/thumb_pressed_dark.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_pressed_dark.png
libgui:textures/widget/scroll_bar/thumb_pressed_light.png
→libgui:textures/gui/sprites/widget/scroll_bar/thumb_pressed_light.png
Removed
- Unused field:
WButton.darkmodeColor
Fixed
ScreenDrawing.texturedRect
not respecting the provided ARGB colour's alpha valuesScreenDrawing.texturedRect
"leaking" shader colours