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. Integrating DynamicHUD

Changing default key bind

The getKeyBind() method within DynamicHudIntegration retrieves a Key Bind that is utilized to open the previously specified AbstractMoveableScreen during gameplay.

The default keybind passed is:

KeyBinding EDITOR_SCREEN_KEY_BINDING = KeyBindingHelper.registerKeyBinding(new KeyBinding(
        "DynamicHud Editor Screen",
        InputUtil.Type.KEYSYM,
        GLFW.GLFW_KEY_RIGHT_SHIFT,
        "DynamicHud"
));

In order to change the default keybind, you need to override the getKeyBind() method.

public class MyIntegration implements DynamicHudIntegration{

  @Override
  public KeyBinding getKeyBind() {
     return KeyBindingHelper.registerKeyBinding(new KeyBinding(
           "My Translation",
           INPUT_TYPE,
           KEY,
           "My Category"
     ));
  }
}
PreviousPassing AbstractMoveableScreen instanceNextChanging save and load file

Last updated 7 months ago

Was this helpful?