generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 50
4.0 migration guide
Juuxel edited this page Jun 9, 2021
·
2 revisions
- Default background painters no longer have any padding applied.
- If you're using the default
WGridPanel
instance created in the base GUI description classes, you don't necessarily need to do anything. - If you're manually setting a root panel, you can achieve the same end result by doing
setInsets(Insets.ROOT_PANEL)
on your root panel.
- If you're using the default
-
CottonHud
methods are now static, so replaceCottonHud.INSTANCE
withCottonHud
. - The 9patch background painter API has been reworked to use LibNinePatch, which has more features and less bugs. The background painter class itself was renamed from
NinePatch
toNinePatchBackgroundPainter
.
- Replace all
ScreenDrawing
methods that don't takeMatrixStack
s with theirMatrixStack
variants. - Any mouse handling methods now return an
InputResult
describing whether the input action was processed or ignored. As a rule of thumb: If your widget responds to doing things with the mouse, returnPROCESSED
. - Replace
LibGuiClient.config.darkMode
withLibGui.isDarkMode()
- Replace
WWidget.createPeers
withWWidget.validate