Archived Legacy DynamicHUD
  • Dynamic HUD
  • Import using Gradle
  • Widgets
    • Adding Widgets
      • TextWidget
      • ItemWidget
      • ArmorWidget
    • Creating your own Widget class
    • Widget class
    • WidgetManager
    • WidgetBox
  • Saving and Loading
    • Saving and Loading
    • Changing save file name and directory
  • Moveable Screen
    • AbstractMoveableScreen
    • Default Moveable Screen
    • Using the default Moveable Screen
    • Creating and using your own MoveableScreen class
  • ContextMenu
    • ContextMenu class
    • ContextMenuOptionsProvider interface
    • DoubleInputScreen
    • DataInputScreen
  • Slider Widget
    • Slider
  • SliderWidgetBuilder
  • ColorPicker
    • ColorGradientPicker
      • ColorPickerButton
      • GradientBox
      • GradientSlider
  • Helpers
    • ColorHelper
    • DrawHelper
    • TextureHelper
Powered by GitBook
On this page
  • WidgetBox:
  • Fields
  • Constructors
  • Methods
  1. Widgets

WidgetBox

This page talks about WidgetBox class

PreviousWidgetManagerNextSaving and Loading

WidgetBox:

The class represents a box around a widget.

Fields

  • width: The width of the box.

  • height: The height of the box.

  • x1, x2, y1, y2: The coordinates of the box.

Constructors

  • WidgetBox(float x1, float y1, float x2, float y2, float scale): Constructs a WidgetBox object with the given coordinates and scale.

  • WidgetBox(float x1, float y1, double height, double width, float scale): Constructs a WidgetBox object with the given height and width and scale.

Methods

  • contains(Widget widget, double x, double y): Returns whether the given point is inside this box.

  • intersects(int otherX1, int otherY1, int otherX2, int otherY2): Returns whether this box intersects with another box defined by the given coordinates.

  • getWidth(): Returns the width of this box.

  • getHeight(): Returns the height of this box.

WidgetBox