Skip to content

ModularUI2 ​

106 merged pull requests.

New Features ​

  • #167 SliderWidget overrides onMouseScroll and adds configurable scroll steps (base 1, ctrl 0.1, shift 100, alt 10000) behind a usingScrollStep flag. It is off by default. - @chrombread
    • Added: scroll wheel input on slider widgets
  • #148 Extended ModularUIConfig with localization keys derived from .tooltip annotations and added translation entries to en_US.lang. - @Ranzuu
    • Added: config localization support, config tooltip translations
  • #139 Added configuration flag to ModularScreen and ClientScreenHandler to toggle the default dark overlay rendering. - @RealSilverMoon
    • Added: ModularScreen overlay toggle option
  • #134 FluidSlotSyncHandler gained a Predicate<FluidStack> filter with a getter and a setter. The filter is checked in tryClickPhantom and fillFluid, and the default accepts everything. - @TheYoingLad
    • Added: fluid filter for fluid slots
  • #131 Enhanced TextFieldHandler and MathUtils to parse SI prefixes and modifiers similar to GTNHLib. Added scroll step support for ALT modifier and improved modifier stacking. Added test GUI with text field examples. - @brachy84
    • Added: SI prefix support, % operator, ALT scroll step, INumberParser interface
    • Fixed: number input expression parsing
  • #127 Grid gained rowAlignments and columnAlignments setters with override flags. layoutWidgets picks the per-row or per-column alignment over the grid-wide alignment when one is set. - @TheYoingLad
    • Added: per-row Grid alignment, per-column Grid alignment
  • #122 Added showSlotOverlay config flag to ModularUIConfig. Conditionally render slot background in ItemSlot and FluidSlot based on config. - @Ranzuu
    • Added: showSlotOverlay configuration option
  • #114 Added color configuration fields to ModularUIConfig and localization keys to lang file. Refactored ClientScreenHandler debug rendering to use config colors. - @Ranzuu
    • Added: debug screen color config, debug text localization
  • #109 Added NEI overlay layer rendering in ItemSlot to support overlay and underlay rendering similar to ModularUI1. - @Luca-Guettinger
    • Added: NEI overlay/underlay support
  • #103 Added compileOnlyApi lwjgl3ify:3.0.15:api. IMuiScreen now implements InputEvents.KeyboardListener via Optional.Interface and forwards to ModularScreen/ModularPanel. New ModernInteractable interface with onKeyEvent/onTextInput for widgets, BaseTextFieldWidget uses it. Keyboard repeat events are enabled in OverlayStack.open and ClientScreenHandler.onGuiChanged. Also null-guards the animator in ScrollingTextWidget hover handlers and moves cursor reset into a finally block in ClientProxy. - @brachy84
    • Added: Lwjgl3ify support for text fields, ModernInteractable interface for widgets
    • Fixed: NPE in ScrollingTextWidget hover handlers when the animator is missing
  • #93 FluidSlotSyncHandler and FluidInteractions rewritten to handle complex scenarios: slots can be filled to capacity, containers can be partially filled to their limits, and stacks are intelligently consumed. - @danyadev
    • Added: Enhanced fluid container handling
  • #85 Adds a late NEI mixin on RecipeInfo that answers hasOverlayHandler, getStackPositioner and getOverlayHandler for ModularContainer screens implementing the new INEIRecipeTransfer interface. Adds ModularUIGuiContainerStackOverlay and ModularUIGuiContainerStackPositioner, and registers NEI as a targeted mod. - @Shigure-Ruiseki
    • Added: NEI recipe transfer for ModularUI2 screens, INEIRecipeTransfer interface
  • #84 Adds FluidDrawable (IDrawable) that draws a FluidStack through GuiDraw.drawFluidTexture at 16x16 default size, plus a TestTile usage. - @chrombread
    • Added: fluid drawable
  • #73 Adds EntityDisplayWidget (an IDrawable) taking a Supplier<EntityLivingBase>, with doesLookAtMouse, preDraw and postDraw options. It uses GuiDraw.drawEntityLookingAtMouse. A villager example is added to TestTile. - @chrombread
    • Added: entity display widget
  • #71 Adds ModularPanel.onCloseAction(Runnable), which onClose() runs before the state is set to CLOSED. - @serenibyss
    • Added: on-close action for panels
  • #64 Adds FluidDisplayWidget, which binds to a GenericSyncValue of FluidStack and draws via GuiDraw.drawFluidTexture. Adds GuiDraw.drawScaledAmountText, which scales text to the width with a 0.5 minimum for strings over 4 characters. - @Spicierspace153
    • Added: FluidDisplayWidget, scaled amount text drawing
  • #61 AbstractCycleButtonWidget gets playClickSound(boolean) and clickSound(Runnable) builder methods. onMousePressed calls a new playClickSound() that runs the override or falls back to Interactable.playButtonClickSound(). - @serenibyss
    • Added: click sound override for toggle and cycle buttons, option to disable click sound on toggle and cycle buttons
  • #60 Added scroll wheel support to TextFieldWidget that increments/decrements numeric values when focused and enabled. - @chrombread
    • Added: scroll-to-adjust feature for numeric text fields
  • #58 Adds a reverseChildren flag to Flow and a ReversedList wrapper over the child list. layoutWidgets iterates the reversed view when the flag is set. TestTile calls reverseLayout(false). - @chrombread
    • Added: reverse child order option for Flow layouts, ReversedList utility
  • #57 Adds a nonOpaque flag to UITexture and its builder, plus a withBlend overload in GuiDraw.drawTexture and Platform.setupDrawTex that enables GL blend instead of disabling it. The old overloads keep blend off. - @serenibyss
    • Added: nonOpaque option for UITexture builder, withBlend overloads for texture drawing
  • #56 Adds a tooltipOverride flag and setTooltipOverride to TextFieldWidget. onInit skips the default text tooltip when it is set, and drawForeground draws the tooltip whenever it is set. TestTile uses it as a test case. - @chrombread
    • Added: tooltip override for text fields

New Content ​

  • #143 Adds GuiTextures.SUN at (224, 48) and GuiTextures.MOON at (240, 48), with the matching sprites in icons.png. - @Eldrinn-Elantey
    • Added: SUN icon, MOON icon
  • #140 Adds GuiTextures.COLOR_WHEEL at (208, 48) in icons.png and registers it in GuiTextures. - @Eldrinn-Elantey
    • Added: COLOR_WHEEL icon
  • #130 Added FAVORITE_EMPTY to GuiTextures at UV (192, 48) in icons.png. - @Eldrinn-Elantey
    • Added: hollow star icon
  • #104 Added IShortValue, IShortSyncValue, ShortValue and ShortSyncValue, modelled on the boolean and int equivalents. Needed for GT5-Unofficial PR 6073. - @TheYoingLad
    • Added: ShortSyncValue, ShortValue, IShortValue, IShortSyncValue

Changes ​

  • #163 ModularUIConfig.guiDebugMode default changed from ModularUI.isDevEnv to false. - @Worive
  • #157 Modified AbstractFluidDisplayWidget and FluidSlot to fall back to NumberFormatUtil.getFluidUnit() for fluid unit determination instead of hardcoding UNIT_LITER, while preserving explicit fluidUnit() overrides. - @Eldrinn-Elantey
    • Fixed: useForgeFluidMillibuckets config not affecting GUI labels
  • #142 FluidSlotSyncHandler.tryClickContainer sets processFullStack from mouseButton == 0 instead of the shift flag. The click_to_fill, click_combined and click_to_empty lang strings are rewritten. - @AnsonYeung
    • Fixed: fluid transfer GUI moving only one cell instead of the whole stack
    • Migration: A GUI mouse-button change: left click on a tank moves the whole held stack of cells, right click moves one.
    • Closes GTNH#25123, GTNH#25283
  • #118 ClientScreenHandler.keyTyped splits Escape and inventory keybind handling and uses Keyboard constants. PanelManager gains closePanelsAndScreen(). BaseTextFieldWidget.onKeyEvent and onTextInput return early when unfocused, and the LWJGL3ify check moves inside the character-accepted branch. - @brachy84
    • Added: PanelManager.closePanelsAndScreen
    • Fixed: text field handling input while not focused
  • #106 FluidSlotSyncHandler.isFluidEmpty now returns true only for a null stack and no longer checks amount <= 0. - @TheYoingLad
  • #99 MCHelper.getFluidTooltip calls ItemFluidDisplay.addTooltipForFluid instead of building the formula line itself. The GT5-Unofficial dev dependency goes from 5.09.52.283 to 5.09.52.391. - @iouter
  • #90 Adds a protected client-side getItemStackForRendering(ItemStack, boolean dragging) to ItemSlot, called in drawSlot before the NEA virtual stack injection. It returns the stack unchanged by default. - @Kogepan229
    • Added: getItemStackForRendering hook on ItemSlot
  • #89 Moves the amount draw call in ItemSlot into a protected drawSlotAmountText method and adds long overloads of drawAmountText and drawStandardSlotAmountText in GuiDraw. - @RecursivePineapple
    • Added: overridable slot amount rendering, long overload of amount text drawing
  • #65 ItemDisplayWidget.draw passes the widget area minus a 1px offset to GuiDraw.drawItem and uses the new drawScaledAmountText for the amount instead of drawStandardSlotAmountText. - @Spicierspace153
  • #62 PacketSyncHandler.write now passes 256 instead of 64 as the max key length to NetworkUtils.writeStringSafe. - @serenibyss
    • Fixed: sync value keys truncated at 64 characters
  • #55 Refactored DropDownMenu text drawing logic to prevent position shifting on first open and to improve text layout within dropdown bounds. - @DarkShadow44
    • Fixed: text jumping on dropdown open, unintended line breaks
  • #54 Modified DropDownMenu background rendering to inherit the main item's background instead of using a separate style. - @DarkShadow44
  • #53 Adjusted DropDownMenu arrow positioning to include 1-2px margin on the right side. - @DarkShadow44
  • #46 Adds ITheme.getScrollbarTheme, the IThemeApi.SCROLLBAR key and a Scrollbar drawable registered for JSON as 'scrollbar'. Also adds Color utility changes, AbstractScrollWidget edits, extra test GUIs and a debug screen theme line. The diff is partly truncated. - @brachy84
    • Added: scrollbar theme, striped vanilla scrollbar drawable, widget theme line in the debug overlay

Bug Fixes ​

  • #161 GuiDraw.drawFluidTexture now tiles with a fixed FLUID_TILE_SIZE of 16 gui pixels instead of the sprite's icon width and height, which are doubled when the atlas is padded. - @Eldrinn-Elantey
    • Fixed: cropped fluid icons with padded sprites (Angelica RGSS, HD packs)
  • #160 ModularContainer.slotClick returns null in the hotbar swap branch when hotbarSlot == fromSlot. - @mcmlevi
    • Fixed: items voided when pressing a hotbar key over the same slot in a ModularUI container
    • Closes GTNH#26398
  • #158 Adds OverlayInputHandler, registered only when lwjgl3ify is loaded, to route text events to the focused overlay widget. Tooltip draws go through a new DeferredRenderQueue on ModularGuiContext and are flushed after the foreground pass, in OverlayStack for overlays. - @Pxx500
    • Fixed: overlay text input not accepting typing with lwjgl3ify, tooltips drawn under later widgets
    • Closes GTNH#25702
  • #153 Added MathUtils.percentOrSelf(String, double, long) that treats an expression containing '%' as a fraction of max. TextFieldWidget gets a NumberValidator overload of numbersDouble that passes the original input, and numbersLong uses it. Added MathUtilsTest. - @Worive
    • Fixed: 100% in bounded number fields being read as 1
  • #152 AbstractFluidDisplayWidget.draw returns early when fluid is null or amount <= 0. The later amount > 0 check was removed. - @tiffit
    • Fixed: empty fluid stacks rendering as full in fluid display widgets
  • #151 EvaluationValue.numberOfString now takes a Token and wraps the BigDecimal/BigInteger parsing in a try/catch that rethrows as EvaluationException. Expression.evaluateSubtree passes the token. - @vnesterovskyi
    • Fixed: BigDecimal parse failures leaking out of expression evaluation
  • #147 Added Platform.endDrawColor() (enable texture2D, enable alpha, disable blend) and call it after untextured draws in GuiDraw, Rectangle and TextFieldRenderer. ClientScreenHandler also calls Platform.setupDrawTex() after muiScreen.drawScreen(). - @Algent
    • Fixed: white NEI items in GregTech machine GUIs with Show Item Quantity Widget disabled
    • Closes GTNH#25499
  • #145 Clamped caret x to line length in TextFieldHandler moveCursorUp/moveCursorDown, fixed multi-line getSelectedText indexing and the scroll position lookup. TextRenderer.wouldFit now multiplies string width by scale and drops the scale term from the height check. - @TheYoingLad
    • Fixed: out-of-bounds errors when moving the caret up or down in text fields, out-of-bounds error when writing at the end of a line, copying multiple lines in text fields, out-of-bounds error when pasting on the last line, text width check ignoring scale
  • #138 ModularUIContainerObjectHandler.objectUnderMouse now returns false, so NEI's lastKeyTyped no longer treats the hovered ModularUI widget as an object obscuring the slot and the shift-drop goes through. - @AnsonYeung
    • Fixed: shift + drop not working in ModularUI screens
    • Closes GTNH#25138
  • #137 ToggleButton.backgroundOverlay adds the drawables to indices 0 and 1 of the background array with addToArray instead of calling background(false, ...). - @TheYoingLad
    • Fixed: toggle button overlay overriding theme background
  • #136 EvaluationValue.numberOfString returns zero when the text after the exponent marker contains a dot, instead of passing it to BigDecimal, which threw. - @Miklebe
    • Fixed: crash on decimal point after exponent in number input
  • #135 GuiContainerMixin redirects the Slot.inventory field read in mouseMovedOrUp. For ModularSlot it returns a dummy inventory owned by the SlotGroup (new getDummyInventoryForComparison), so vanilla's inventory-identity comparison for the double click gather works per slot group. - @AnsonYeung
    • Fixed: shift double click moving stacks within the source inventory when the destination is full
    • Closes GTNH#25006
  • #133 Added sync handler initialization check in PanelSyncHandler.closePanelInternal() to skip sync ops when torn down. Clamped cursor position in TextFieldHandler.insert() to prevent StringIndexOutOfBoundsException. - @Luca-Guettinger
    • Fixed: IllegalStateException during GUI close, StringIndexOutOfBoundsException in text input
  • #129 PanelSyncManager.initialize now sets locked before calling init on the sync handlers, instead of after. - @brachy84
    • Fixed: sync handler registration during panel init
  • #126 Widget, ItemSlot and TextFieldWidget drawForeground now skip drawing the tooltip when context.hasDraggable() is true. - @TheYoingLad
    • Fixed: tooltips showing through panels while dragging
    • Closes GTNH#24612
  • #125 IPositioned.disableCoverChildrenHeight() called coverChildrenWidth(-1); it now calls coverChildrenHeight(-1). - @TheYoingLad
    • Fixed: disableCoverChildrenHeight changing the width setting
  • #123 ClientScreenHandler.keyTyped now branches on whether a world is loaded. Escape calls closePanelsAndScreen in world, and the inventory keybind calls a new dropOrClosePanel helper that drops a draggable or closes the top panel. Follow-up to #118. - @brachy84
    • Fixed: circuit selection UI not closing with the inventory key
    • Closes GTNH#24648
  • #120 Fixes the modularui2.debug.pos_rel string in en_US.lang. - @Ranzuu
    • Fixed: debug overlay "Post" typo
  • #119 Added null check in GuiDraw to gracefully handle missing fluid textures instead of throwing exception. - @Luca-Guettinger
    • Fixed: crash from null fluid icon
  • #116 Added SALISARCANA to TargetedMod and excluded it on the THAUMCRAFT mixin group in Mixins, so ClientTickEventsFMLMixin is skipped when Salis Arcana is present. - @Alexdoru
    • Fixed: Thaumcraft compat mixin failing when Salis Arcana is installed
  • #113 ClientProxy.onUnloadWorld now checks that Minecraft.thePlayer is not null before calling onPlayerLeave on the client and integrated server. - @brachy84
    • Fixed: NPE when unloading a world
  • #112 UITexture.colorOverride becomes protected and is passed through the constructors of UITexture, AdaptableUITexture and TiledUITexture, and through copy() and getSubArea. The package-private TiledUITexture constructor argument order changed. - @TheYoingLad
    • Fixed: Opacity lost when copying a UITexture
  • #111 ModularNetwork.SERVER becomes a ServerManager keeping a per-player side, activate and receivePacket take the player, and onPlayerLeave clears state via PlayerLoggedOutEvent and a client WorldEvent.Unload handler for singleplayer. - @brachy84
    • Fixed: Possible Gregtech UI freezes caused by screens shared between players
    • Closes GTNH#24188
  • #108 Changed logoFile in mcmod.info from assets/modularui/ to assets/modularui2/. - @JackOfNoneTrades
    • Fixed: wrong mod logo path in mcmod.info
  • #107 FluidInteractions.getFluidForItem returns null for a null ItemStack. tryClickContainer and both tryClickPhantom overloads in FluidSlotSyncHandler changed from private to protected. Needed for GT5-Unofficial PR 6234. - @TheYoingLad
    • Fixed: NPE in fluid lookup for a null item
  • #102 Removed the itemSlot:player and itemSlot:player_hotbar color overrides from the vanilla.json theme, which now only sets the DEFAULT parent. - @Ranzuu
    • Removed: Red player slot colors in the vanilla theme
    • Fixed: Red slots on all ModularUI2 GUIs
  • #101 TextFieldWidget.setFormatAsInteger now calls setNumbers(Integer.MIN_VALUE, Integer.MAX_VALUE) when numbers mode is not already enabled, so non-numeric input is filtered. - @NeutronSelector
    • Fixed: InvalidNumberException when entering a non-numeric character in an integer text field
  • #97 SlotGroupWidget.onChildAdd: moved the comment terminator so the ItemSlot branch that sets slotGroup or slotGroupName on the slot is active again. - @brachy84
    • Fixed: slot group not being applied to slots
  • #94 GuiDraw.drawStandardSlotAmountText condition changed from amount != 1 to amount > 1. - @chrombread
    • Fixed: amount text drawn on slots with stack size below 1
  • #88 FluidInteractions.getContainerForFilledItem returns null when IFluidContainerItem.drain returns null. Fixes GT-New-Horizons-Modpack#23153. - @SuperSoupr
    • Fixed: fluid duping with Super Tanks
    • Closes GTNH#23153
  • #82 ModularContainer.slotClick now uses a new stackLimit(slot, stack) helper that also checks the item's max stack size. In 1.7.10 Slot.getItemStackLimit(ItemStack) does not exist, so getSlotStackLimit was used alone. The diff is truncated, so other changes in the file are not visible. - @brachy84
    • Fixed: slots ignoring item max stack size
  • #81 FluidSlotSyncHandler.replaceCursorItemStack now calls setCursorItem after reducing the held stack size. FluidInteractions.fillFluidContainer returns the original stack when FluidContainerRegistry.fillFluidContainer returns null, which avoids the NPE. - @chrombread
    • Fixed: cursor stack count not updating after filling or draining a fluid slot, NPE when a container does not support the fluid
  • #80 ModularPanel.onMouseScroll now checks isValid() on the hovered widget before calling onMouseScroll, matching the existing check in onMouseDrag. Also fixes indentation. - @RealSilverMoon
    • Fixed: scroll events sent to invalid widgets
  • #79 Widget.initialiseSyncHandler now calls setValue when the sync handler is an IValue, which also sets the sync handler, instead of only calling setSyncHandler. TestTile now registers a double sync value and binds the TextFieldWidget to it with .syncHandler(). - @chrombread
    • Fixed: TextFieldWidget value not being called when set through syncHandler()
  • #78 Commented out the Items.emerald branch (HoloUI with TestGui) in the test EventHandler.onItemUse and left a todo about ScreenEntityRender / TestGui. - @chrombread
    • Removed: emerald test GUI trigger
    • Fixed: crash when right clicking with an emerald in dev environments
  • #77 GuiDraw.drawEntityLookingAtMouse takes preDraw and postDraw consumers, and its yaw and pitch math is reworked. EntityDisplayWidget passes its consumers through. - @chrombread
    • Added: pre and post draw consumers for entities looking at the mouse
    • Fixed: entity display rotation when looking at mouse
  • #76 AbstractCycleButtonWidget, ItemDisplayWidget, ProgressWidget, SliderWidget and TextFieldWidget now override setValue to set their typed value, and setSyncHandler ignores null. The layer restriction check in Flex.resize is commented out. - @brachy84
    • Fixed: widget values lost when set directly, widgets relative to same-level widgets throwing a sizing error
  • #72 TextRenderer.getStartX and getStartY now round the alignment offsets with Math.round instead of truncating the combined value to int. - @serenibyss
    • Fixed: text offset with certain alignments
  • #70 Added verification checks in ModularPanel before executing operations to prevent getContext() calls on disposed widgets. - @RealSilverMoon
    • Fixed: DynamicSyncWidget disposal handling
  • #59 TextFieldWidget.onInit resets tooltipOverride to false after adding the default tooltip builder, matching upstream. - @chrombread
    • Fixed: text field tooltip always showing
  • #52 StyledText.draw uses widgetTheme.getTextColor() instead of getColor() as the fallback colour. - @DarkShadow44
    • Fixed: aligned text using the wrong theme colour
  • #51 DropDownMenu.DropDownItem overrides canClickThrough to return false. - @DarkShadow44
    • Fixed: click-through on drop down menu items
  • #50 DynamicSyncHandler now parses widgets separately from applying them, keeps the last rejected packet and resends it on init, and renames onWidgetUpdate to attachDynamicWidgetListener. Widgets with implicitly registered sync handlers now throw via WidgetTree.countUnregisteredSyncHandlers. DynamicSyncedWidget disposes the old child on update. - @brachy84
    • Added: initial child option on DynamicSyncedWidget
    • Fixed: dynamic sync handler updates arriving before init, old dynamic child not disposed
  • #49 PlayerSlotType.getPlayerSlotType now checks SlotItemHandler wrappers (new and legacy ModularUI) instead of only InventoryPlayer. The OFFHAND enum value and ITEM_SLOT_PLAYER_OFFHAND theme key are removed. ClientScreenHandler translates the cursor stack by z=500 when drawing. - @brachy84
    • Removed: OFFHAND player slot type, offhand slot theme key
    • Fixed: player slot type detection, cursor stack drawn under other elements
  • #45 Restored the null check on getHeldItem in EventHandler.onItemUse in the test package. - @chrombread
    • Fixed: NPE in test EventHandler when the player's hand is empty

Internal / Refactor ​

  • #132 Renamed GuiTextures.FAVORITE_EMPTY to FAVORITE_OUTLINE, with the texture name changed to favorite_outline. The constant was added only one PR earlier. - @Caedis
  • #121 SyncHandler and ValueSyncHandler gain a self-type generic parameter, and sync handler classes such as GenericSyncValue, EnumSyncValue and BinaryEnumSyncValue now take a second type argument. C2S is off by default and must be enabled through the setter. Custom sync handler subclasses need the new generic parameter. - @brachy84
    • Migration: Addon developers must check whether each sync handler needs client-to-server packets, call the setter to enable it where it does, and add the new generic type to custom sync handler classes.
  • #110 Grid gains sanitizeMatrix (pads rows, now also run in layoutWidgets), new grid, gridOfWidthHeight and createGridOfWidthElements builders replacing matrix, mapTo and mapToMatrix, and a getMarginEnd border condition change from border > -1 to border < 1. Test GUIs updated to the new methods. - @brachy84
    • Added: new Grid builder methods
    • Fixed: Grid end margin calculation
  • #105 Upstream sync touching about 80 files: coverChildren overloads with a minimum size (default 8), decoration and posRel(Alignment) in IPositioned, texture registration and serialization rework in DrawableSerialization/UITexture, equals on textures and ColorType, and changes to ModularPanel, ModularScreen and ModularContainer. Note disableCoverChildrenHeight calls coverChildrenWidth(-1) in the shown diff. - @brachy84
    • Added: coverChildren overloads with minimum size, decoration flag for widgets, posRel with Alignment
  • #95 IResizeable is reworked around a new IResizeParent, GuiError and GuiErrorHandler take IWidget instead of IGuiElement, and ITreeNode and IDelegatingWidget are added. ClientProxy reads the LWJGL major version and skips cursor creation above 2. NumberFormat gets SI prefix, infinity and NaN handling tests. - @brachy84
    • Added: ITreeNode, IDelegatingWidget, IResizeParent
    • Migration: Flex is renamed StandardResizer, and widget.flex() is replaced by resizer(), which returns a StandardResizer on widgets while IWidget.resizer() returns a ResizeNode. IUnResizeable, PopupMenu and DelegatingSingleChildWidget are removed, most WidgetTree helpers are gone, and GuiError.throwNew and getReference use IWidget instead of IGuiElement.
  • #86 Drops the shadowed mXparser dependency and adds Lombok for evalex, adds IPanelHandler.togglePanel, ISyncOrValue, and keeps parent screens' containers open in a stack via MCHelper.popScreen. Fixes the Hodgepodge mod entry that pointed at the Bogosorter id. - @brachy84
    • Added: panel toggle method, sync-or-value API
    • Removed: mXparser dependency
    • Fixed: Hodgepodge mod check using the wrong mod id
  • #66 Large upstream merge touching about 90 files. Visible changes include RecipeViewerSettings methods renamed (enable, disable, defaultState, isEnabled, addExclusionArea) with deprecated old names scheduled for removal in 3.2.0. IDrawable gains drawPadded and draw no longer applies padding. IIcon gets getSize and default sizes, FlowDrawable is added, and the cursor reset in ClientProxy is fixed to run outside the try block. - @brachy84
    • Added: FlowDrawable, drawPadded methods on IDrawable, renamed RecipeViewerSettings methods
    • Migration: WidgetTheme.withColor(int) is removed. ScrollData.drawScrollbar and ScrollArea.drawScrollbar take an IDrawable texture argument, so custom ScrollData subclasses must override drawScrollbar(ScrollArea, ModularGuiContext, WidgetTheme, IDrawable).
  • #48 WidgetTree is rewritten on top of a new InternalWidgetTree. IWidget gains getName, isName, isType and isNameAndType. Widget.debugName is deprecated in favour of Widget.name. ModularPanel.getAllHoveringList now returns an empty list instead of null. - @brachy84
    • Added: widget name lookup methods, WidgetTree functional test
    • Migration: Addon developers should replace debugName with name and check any WidgetTree calls they make.
  • #47 ILayoutWidget.layoutWidgets and postLayoutWidgets now return boolean, IResizeable.resize takes an isParentLayout flag and gains layout-state methods. Adds MCHelper.popScreen and a guard in GuiManager.openScreen against reopening an already open screen. - @brachy84
    • Added: MCHelper.popScreen
    • Fixed: screen opened twice when already open
    • Migration: Addon developers with a custom ILayoutWidget must return a boolean from layoutWidgets() and from any postLayoutWidgets() override (true when layout is done), and call one of the IResizeable setResized methods or updateResized() on each child.
  • #44 Large upstream sync of over 300 files, including the WidgetTheme refactor from CleanroomMC/ModularUI#162, animation changes, proxy and GuiError changes, and a new CameraTest. It also reverts #43. The diff was too large to view, so the details come from the body and file list. - @Dream-Master
    • Migration: Addon code using WidgetTheme must port to the new theme API: WidgetThemeKey and WidgetThemeEntry, SlotTheme and TextFieldTheme in place of WidgetSlotTheme and WidgetTextFieldTheme, AbstractDefaultTheme removed, and widget draw methods that receive a WidgetThemeEntry<?> instead of a WidgetTheme. See CleanroomMC/ModularUI PR 162.
  • #43 Upstream merge of over 300 files including the WidgetTheme refactor, which breaks GT5-Unofficial until it is updated. Adds a CameraTest and changes to the animation classes, proxies and GuiError. - @brachy84

Chores ​

  • #155 AbstractCycleButtonWidget.setState now builds the IndexOutOfBoundsException message with the state and stateCount. - @FourIsTheNumber
  • #154 In dependencies.gradle, changes the ModularUI 1.3.4:dev dependency from compileOnly to compileOnlyApi, because IItemHandler and IItemHandlerModifiable extend their MUI1 equivalents. - @SuperSoupr
  • #117 Set modrinthProjectId (Ecvd12QC) and curseForgeProjectId (624243) in gradle.properties. - @brachy84
  • #100 Bumped the Never Enough Animations curse.maven artifact to file 7664003 (sources 7663978) in dependencies.gradle to fix a maven resolution issue. - @brachy84
    • Fixed: maven resolution of the Never Enough Animations dependency
  • #98 dependencies.gradle switches to compileOnlyApi rfg.deobf of curse.maven:neverenoughanimation-1062347:7624765 with sources, and the local libs jars and the explicit jetbrains annotations dependency are removed. - @brachy84
    • Removed: bundled NEA jars
  • #96 Sync with upstream: unused imports removed, formatting fixes, a field made final, and test GUI registration moved from TestBlock and EventHandler to a new TestEventHandler. 51 files are not shown, so the full scope is unknown. - @brachy84
  • #83 ClientProxy.preInit no longer registers a new OverlayManager on the Forge event bus, and the import is removed. - @Alexdoru
    • Removed: unused OverlayManager event registration
  • #75 Upstream sync: adds IKey.dynamicKey, and DynamicKey now wraps a Supplier<IKey>. Adds RichText.addAll, ISynced.checkValidSyncHandler, and a PosGuiData constructor taking a BlockPos. IWidget.transform no longer applies a panel-layer z offset. Adds @NotNull annotations. 22 more files are not shown. - @brachy84
    • Added: dynamic key from key supplier, sync handler validity check, PosGuiData constructor with BlockPos
  • #74 Adds FluidTankLong, IFluidTankLong, FluidTanksHandler, IFluidTanksHandler and ListFluidHandler in utils.fluid, copied from MUI1 without changes. - @serenibyss
    • Added: long-capacity fluid tank classes
  • #69 Upstream sync: adds IFloatValue, IFloatSyncValue, FloatValue and FloatSyncValue, and adds notifyUpdate() to IValueSyncHandler, implemented in the sync value classes. Moves getFloatValue/setFloatValue out of IDoubleValue, removes DoubleValue.Dynamic.ofFloat, and makes ModularPanel.name() throw IllegalStateException (removes its toString override). - @brachy84
    • Added: float value and float sync value classes, notifyUpdate on value sync handlers
    • Removed: float default methods on the double value interface, Dynamic.ofFloat on DoubleValue
    • Migration: IValueSyncHandler now requires notifyUpdate(), which updates the cached value from its source and syncs it, so addon classes that implement IValueSyncHandler or extend ValueSyncHandler directly must implement it.
  • #68 Removes @ApiStatus.Experimental and the unused import from setFormatAsInteger in TextFieldRenderer and TextFieldWidget. - @serenibyss
    • Removed: experimental annotation on setFormatAsInteger

Contributors ​

Everyone who authored, reviewed or co-authored a change on this page, with how many of them:

@brachy84 (63), @chrombread (34), @TheYoingLad (23), @serenibyss (15), @Dream-Master (13), @Spicierspace153 (8), @FrostyFire1 (6), @DarkShadow44 (5), @Eldrinn-Elantey (5), @Luca-Guettinger (5), @Ranzuu (5), @AnsonYeung (4), @danyadev (3), @ghzdude (3), @Miklebe (3), @Nockyx (3), @RealSilverMoon (3), @UltraProdigy (3), @Alexdoru (2), @Algent (2), @Caedis (2), @FourIsTheNumber (2), @miozune (2), @Nikolay-Sitnikov (2), @RecursivePineapple (2), @SuperSoupr (2), @Worive (2), @Zorbatron (2), @ALongStringOfNumbers (1), @alppp (1), @Angry3vilbot (1), @boubou19 (1), @cubefury (1), @czqwq (1), @iouter (1), @JackOfNoneTrades (1), @Kogepan229 (1), @marisathewitch (1), @mcmlevi (1), @MLGfruitshoot (1), @NeutronSelector (1), @purebluez (1), @Pxx500 (1), @seventh-june (1), @Shigure-Ruiseki (1), @tiffit (1), @vnesterovskyi (1), @YannickMG (1)