GuiImmediateContext

data class GuiImmediateContext(val renderContext: RenderContext, val renderOffsetX: Int, val renderOffsetY: Int, val width: Int, val height: Int, val mouseX: Int, val mouseY: Int, val absoluteMouseX: Int, val absoluteMouseY: Int, val mouseXHF: Float, val mouseYHF: Float)(source)

A context containing the constraints of a gui elements, as well as the state of the user interface, relative to that gui element.

Constructors

Link copied to clipboard
constructor(renderContext: RenderContext, renderOffsetX: Int, renderOffsetY: Int, width: Int, height: Int, mouseX: Int, mouseY: Int, absoluteMouseX: Int, absoluteMouseY: Int, mouseXHF: Float, mouseYHF: Float)

Properties

Link copied to clipboard

The position of the mouse, relative to the root element.

Link copied to clipboard

The position of the mouse, relative to the root element.

Link copied to clipboard
val height: Int

The available height for that gui element to render in.

Link copied to clipboard
Link copied to clipboard
val mouseX: Int

The position of the mouse, relative to this gui element.

Link copied to clipboard

The position of the mouse, relative to this gui element in as high of a resolution as possible.

Link copied to clipboard
val mouseY: Int

The position of the mouse, relative to this gui element.

Link copied to clipboard

The position of the mouse, relative to this gui element in as high of a resolution as possible.

Link copied to clipboard
Link copied to clipboard

The current absolute offset for this gui context. This should not need to be accessed, unless you are contacting some API that does not access GlStateManager.

Link copied to clipboard

The current absolute offset for this gui context. This should not need to be accessed, unless you are contacting some API that does not access GlStateManager.

Link copied to clipboard
val width: Int

The available width for that gui element to render in.

Functions

Link copied to clipboard
fun limitSize(maxWidth: Int, maxHeight: Int): GuiImmediateContext

Construct a new context, which has not been translated, but possible smaller if the arguments demand so.

Link copied to clipboard
Link copied to clipboard
fun translated(xOffset: Int, yOffset: Int, width: Int, height: Int): GuiImmediateContext

Construct a new context representing that is located within this context.

Link copied to clipboard
fun translatedNonRendering(xOffset: Int, yOffset: Int, width: Int, height: Int): GuiImmediateContext

Construct a new context representing that is located within this context. Does not translate the rendering offset.

Link copied to clipboard
fun withBleed(xBleed: Int, yBleed: Int): GuiImmediateContext

Construct a new context that bleeds out over the boundaries of the existing context. This is usually used for more fuzzy click detection.