Scaling

Dynamic HUD utilizes the YACL config library to implement global scaling for all widgets. The scale can only be changed by the player and all widgets displayed with shouldScale set as true are affected by it.

The scale can be changed from 0.1f - 2.5f,

The default being 1f

In order to disable scaling for a single widget, you can set shouldScale flag to false.

MyWidget.setShouldScale(false);

The scaling is implemented by using the DrawHelper class

Widget.java
DrawHelper.scaleAndPosition(drawContext.getMatrices(), getX(), getY(), GlobalConfig.get().getScale());.

Use GlobalConfig.get().getScale() if you want to make use of DynamicHUD's inbuilt global scaling for your custom widget.

Last updated

Was this helpful?