Skip to content

Releases: CottonMC/LibGui

3.0.0

24 Sep 09:06
016eb1e
Compare
Choose a tag to compare

Repository version: 3.0.0+1.16.3

Added

  • TooltipBuilder for creating widget tooltips. It replaces the old List<Text> with a nicer API that can take both Texts and OrderedTexts.
  • 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 drawing Textures
  • Change listeners for WItemSlot and ValidatedSlot
    • Instances of WItemSlot.ChangeListener can be added to WItemSlots using WItemSlot.addChangeListener
    • Slot change listeners are fired when a slot is modified or otherwise marked dirty
  • 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 and onHidden, 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 of StringVisitable
  • ScreenDrawing takes OrderedTexts instead of StringVisitables
  • WWidget.addTooltip takes a TooltipBuilder instead of a List<Text>
  • The texture fields in WBar, WSprite and WToggleButton use Textures instead of Identifiers

Fixed

  • Centering issues with big item slots and button icons (#77)
  • Rendering of vertical labeled sliders
  • Keyboard repeat events not always working (#27)
  • Some overrides of WWidget.paint missing @Environment(CLIENT) annotations

3.0.0 Beta 1

11 Aug 11:31
Compare
Choose a tag to compare

Repository version: 3.0.0-beta.1+1.16.2-rc2

Added

  • TooltipBuilder for creating widget tooltips. It replaces the old List<Text> with a nicer API that can take both Texts and OrderedTexts.
  • 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 drawing Textures
  • Change listeners for WItemSlot and ValidatedSlot
    • Instances of WItemSlot.ChangeListener can be added to WItemSlots using WItemSlot.addChangeListener
    • Slot change listeners are fired when a slot is modified or otherwise marked dirty

Changed

  • Updated to Minecraft 1.16.2 RC2 and latest versions of dependencies
  • Widgets now take a Text again instead of StringVisitable
  • ScreenDrawing takes OrderedTexts instead of StringVisitables
  • WWidget.addTooltip takes a TooltipBuilder instead of a List<Text>
  • The texture fields in WBar, WSprite and WToggleButton use Textures instead of Identifiers

Fixed

  • Centering issues with big item slots and button icons (#77)
  • Rendering of vertical labeled sliders
  • Keyboard repeat events not always working (#27)
  • Some overrides of WWidget.paint missing @Environment(CLIENT) annotations

2.3.0

02 Aug 21:14
Compare
Choose a tag to compare

Repository version: 2.3.0+1.16.1

Added

  • RGB interpolation method (#64 by @fiws)

Fixed

  • SyncedGuiDescription.insertIntoExisting not respecting Slot.getMaxStackAmount (#78 by @CoolMineman)

2.2.0

10 Jul 16:02
Compare
Choose a tag to compare

Repository version: 2.2.0+1.16.1

Added

  • WTiledSprite: getters (#72 by @fiws) and setters for tileWidth and tileHeight
  • 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, and TextureIcon which draws a texture
  • Added a getter for WButton.onClick

Fixed

  • Horizontal sliders facing left instead of right by default (#73 by @fiws)

2.1.1

01 Jul 08:45
Compare
Choose a tag to compare

Repository version: 2.1.1+1.16.1

Fixed

  • Player inventories not having slot peers, causing them to have no items

2.1.0

30 Jun 18:36
Compare
Choose a tag to compare

Repository version: 2.1.0+1.16.1

Added

  • GuiDescription.get/setTitleAlignment: for modifying the horizontal alignment of titles
  • GuiDescription.setTitleColor(int, int): for setting the light and dark title colors separately
  • WWidget.get/setHost: for modifying the widget host directly in cases where validate cannot be used, such as lists
  • Alignment support for WBox

Changed

  • Deprecated WWidget.createPeers in favour of WWidget.validate

Fixed

  • Slot peers having incorrect IDs (#68)
  • GuiDescription.setTitleColor(int) not setting the dark title color

2.0.1

24 Jun 15:26
Compare
Choose a tag to compare

Repository version: 2.0.1+1.16.1

Fixed

  • Crash on dedicated servers from BackgroundPainter being referenced in WItemSlot.<init>
  • Crash on dedicated servers from LibGuiClient.config being referenced in SyncedGuiDescription.getTitleColor

2.0.0

23 Jun 19:48
Compare
Choose a tag to compare

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 axis
  • WScrollPanel: 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 to SyncedGuiDescription
    • Instead of a RecipeType, the SyncedGuiDescription constructor now takes a ScreenHandlerType that can be registered with Fabric API's ScreenHandlerRegistry.
  • Text alignment changes
    • Alignment was renamed to HorizontalAlignment
    • Added VerticalAlignment
    • WLabel/WText.alignment -> horizontalAlignment, added vertical alignment support for text widgets
  • Widget labels and tooltips now use StringRenderables instead of Texts
  • The default background painter is now the 9patch background painter for resource pack support
  • WItemSlot's unused ltr constructor parameter was removed
  • Custom widgets
    • WWidget.paintBackground has been renamed to paint. It now also takes the MatrixStack 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

22 Jun 09:42
Compare
Choose a tag to compare

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

18 Jun 10:14
Compare
Choose a tag to compare

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