HudElement

abstract class HudElement

Provides functionality for game overlay elements.

Author

Aton

Constructors

Link copied to clipboard
fun HudElement(module: Module, xDefault: Int = 0, yDefault: Int = 0, width: Int = 10, height: Int = 10, defaultScale: Double = 1.0)

Sets up a hud Element. This constructor takes care of creating the NumberSettings required to save the position and scale of the hud element to the config.

Link copied to clipboard
fun HudElement(xHud: NumberSetting, yHud: NumberSetting, width: Int = 10, height: Int = 10, scale: NumberSetting)

It is advised to use the other constructor unless this one is required.

Functions

Link copied to clipboard
fun onOverlay(event: RenderGameOverlayEvent.Post)

This will initiate the hud render and translate to the correct position and scale.

Link copied to clipboard
abstract fun renderHud()

Override this method in your implementations.

Link copied to clipboard

Used for moving the hud element. Draws a rectangle in place of the actual element

Link copied to clipboard
open fun resetElement()

Resets the position of this hud element by setting the value of xSett and ySett to their default.

Link copied to clipboard
open fun scroll(amount: Int)

Handles scroll wheel action for this element. Can be overridden in implementation.

Properties

Link copied to clipboard
var height: Int
Link copied to clipboard
Link copied to clipboard
var width: Int
Link copied to clipboard
var x: Int

Use these instead of a direct reference to the NumberSetting

Link copied to clipboard
var y: Int

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard