Adding Widgets
Now that DynamicHUD is aware of your mod, you can start adding widgets. Widgets are the components that will be displayed on your HUD. This is done in the addWidgets()
method of your MyIntegration
class.
In this example, we will be using the included TextWidget
.
TextWidget exampleWidget;
: This line declares aTextWidget
object namedexampleWidget
.TextWidget
is a type of widget that can be added to the HUD.public void addWidgets()
: This method is called to add widgets to the HUD. Inside this method, theaddWidget
method ofWidgetManager
is called withtextWidget
as the argument, adding the previously createdTextWidget
to the HUD.
Last updated
Was this helpful?