Skip to content

Releases: CottonMC/LibGui

9.0.0 for Minecraft 1.20.2

15 Oct 11:45
286f0d0
Compare
Choose a tag to compare

Repository version: 9.0.0+1.20.2

Added

  • BackgroundPainter.createGuiSprite: creates a background painter from a sprite on the GUI atlas
  • Texture now supports both standalone texture files and sprites on the GUI atlas
    • The Texture.Type enum has two values: STANDALONE and GUI_SPRITE
    • Each sprite has an associated Type value. The pre-existing constructors still create standalone textures, but you can also pass Type.GUI_SPRITE to wrap GUI sprites
  • WScrollBar.get/setScrollingSpeed to control the mouse scroll speed of scroll bars (#218 by @LopyMine)

Changed

  • Updated to Minecraft 1.20.2
  • WButton and WLabeledSlider 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.pnglibgui:textures/gui/sprites/widget/scroll_bar/background_dark.png
      • libgui:textures/widget/scroll_bar/background_light.pnglibgui:textures/gui/sprites/widget/scroll_bar/background_light.png
      • libgui:textures/widget/scroll_bar/focus.pnglibgui:textures/gui/sprites/widget/scroll_bar/focus.png
      • libgui:textures/widget/scroll_bar/thumb_dark.pnglibgui:textures/gui/sprites/widget/scroll_bar/thumb_dark.png
      • libgui:textures/widget/scroll_bar/thumb_hovered_dark.pnglibgui:textures/gui/sprites/widget/scroll_bar/thumb_hovered_dark.png
      • libgui:textures/widget/scroll_bar/thumb_hovered_light.pnglibgui:textures/gui/sprites/widget/scroll_bar/thumb_hovered_light.png
      • libgui:textures/widget/scroll_bar/thumb_light.pnglibgui:textures/gui/sprites/widget/scroll_bar/thumb_light.png
      • libgui:textures/widget/scroll_bar/thumb_pressed_dark.pnglibgui:textures/gui/sprites/widget/scroll_bar/thumb_pressed_dark.png
      • libgui:textures/widget/scroll_bar/thumb_pressed_light.pnglibgui: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 values
  • ScreenDrawing.texturedRect "leaking" shader colours

8.1.0 for Minecraft 1.20.1

25 Sep 20:03
9eb05f0
Compare
Choose a tag to compare

Repository version: 8.1.0+1.20.1

Added

  • Separate input/output filters for WItemSlot and ValidatedSlot (#209 by @Luligabi1)
  • New protected fields to WPlayerInvPanel (#209):
    • WItemSlot inventory
    • WItemSlot hotbar
    • @Nullable WWidget label

Changed

Deprecated

  • ValidatedSlot: getFilter, setFilter - replaced with get/setInputFilter
  • WItemSlot: getFilter, setFilter - replaced with get/setInputFilter

Fixed

  • Hard requirement on MC 1.20.1 being a soft requirement

8.0.2 for 1.20(.1)

23 Jul 17:37
e7a3683
Compare
Choose a tag to compare

Repository version: 8.0.2+1.20

Changed

8.0.1 for 1.20

02 Jul 16:00
900458e
Compare
Choose a tag to compare

Repository version: 8.0.1+1.20

Fixed

  • WPanelWithInsets.expandToFit(WWidget) not taking the insets into account

8.0.0 for 1.20

11 Jun 11:01
aaa6023
Compare
Choose a tag to compare

Repository version: 8.0.0+1.20

Changed

  • Updated to Minecraft 1.20
  • Replaced all MatrixStack parameters with DrawContext

Fixed

  • Incorrect position for screen titles with non-left alignment

7.1.1 for 1.19.4

11 Jun 10:47
6f41969
Compare
Choose a tag to compare

Repository version: 7.1.1+1.19.4

Fixed

  • Incorrect position for screen titles with non-left alignment

8.0.0 Beta 1 for 1.20-rc1

03 Jun 21:15
6b14e2b
Compare
Choose a tag to compare
Pre-release

Repository version: 8.0.0-beta.1+1.20-rc1

Changed

  • Updated to Minecraft 1.20
  • Replaced all MatrixStack parameters with DrawContext

7.1.0 for 1.19.4

27 May 18:14
8eb600e
Compare
Choose a tag to compare

Repository version: 7.1.0+1.19.4

Added

  • GUI- and widget-level dark mode toggles to override LibGui's global setting
    • GuiDescription.isDarkMode() is the primary API method here. Override it to force dark or light mode by returning a non-DEFAULT value.
    • WWidget.shouldRenderInDarkMode() checks if a specific widget should use dark mode or light mode. Custom widgets can simply replace calls to LibGui.isDarkMode() with shouldRenderInDarkMode() calls.
    • All built-in widgets and background painters support the new API.

7.0.1 for 1.19.4

15 May 15:11
a8e973b
Compare
Choose a tag to compare

Repository version: 7.0.1+1.19.4

Fixed

  • Maven publishing details referencing dependencies of the test mod

7.0.0 for 1.19.4

14 May 16:15
Compare
Choose a tag to compare

Added

Changed

  • Updated Simplified Chinese translation (#194 by @Enaium)

Fixed

  • Crash when tabbing to a text field and typing text after calling setText("")