DynamicHUD Dev Guide
DownloadNeed Support?
  • Dynamic HUD
  • Import using Gradle
  • Integrating DynamicHUD
    • Integrating DynamicHUD
    • Adding Widgets
    • Adding your own WidgetRenderer
    • Passing AbstractMoveableScreen instance
    • Changing default key bind
    • Changing save and load file
    • Registering Custom Widgets
  • Widget
    • Widget class
    • How to create a custom widget
    • Widget Renderer
    • WidgetData
    • DynamicValueRegistry
    • Scaling
  • Screens
    • AbstractMoveableScreen
  • ContextMenu
    • ContextMenu class
    • Using context menu
    • Option<T> class
      • Color Option
      • Boolean Option
      • Double Option
      • Runnable Option
      • Enum Option
      • List Option
      • SubMenu Option
Powered by GitBook
On this page

Was this helpful?

  1. Widget

Scaling

PreviousDynamicValueRegistryNextAbstractMoveableScreen

Last updated 7 months ago

Was this helpful?

Dynamic HUD utilizes the 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 widget, you can set shouldScale 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());

As of now, the YACL screen can only be opened using mod menu.

Currently, the scaling does not affect the position of the mouse. So, it may cause, ContextMenu's to stop functioning.

YACL