Skip to content

Gnuiapi

GNamimates edited this page Oct 30, 2024 · 4 revisions

Class Name: GNUIAPI

Methods

Returns Methods
GNUI.Canvas api.getScreenCanvas()
api.debugMode()
api.newBox(parent: GNUI.Any)
api.newNineslice()
api.playSound(sound : Minecraft.soundID, pitch : number?, volume : number?)

api.getScreenCanvas()

Gets a canvas for the screen. Quick startup for putting UI elements onto the screen.

Returns GNUI.Canvas

api.debugMode()

Enables debug mode for the soon to be created boxes. This will not enable debug mode on exiting boxes.

api.newNineslice(texture, UVx1, UVy1, UVx2, UVy2, borderLeft, borderTop, borderRight, borderBottom, expandTop, expandRight, expandBottom, expandLeft)

creates a nineslice with every parameter you need

Arguments

  • texture

  • UVx1 the UV coordinate of the top left corner

  • UVy1

  • UVx2

  • UVy2

  • borderLeft the borders for the ninepatch

  • borderTop

  • borderRight

  • borderBottom

  • expandTop the expansion of the ninepatch from its box.

  • expandRight

  • expandBottom

  • expandLeft

api.playSound(sound, pitch, volume)

Arguments

  • Minecraft.soundID sound

  • number? pitch

  • number? volume

Clone this wiki locally