Docs: Playground - Poyo-SSB/osu-playground GitHub Wiki

Playground is the class which allows access to osu!Playground's core functionality.


Properties

PLAYFIELD_WIDTH

The width of the osu! playfield in osu!pixels (512).

PLAYFIELD_HEIGHT

The height of the osu! playfield in osu!pixels (384).


Methods

AddFloat(name, input)

Creates a bindable floating point value with the name name and default value input.

AddInt(name, input)

Creates a bindable integer value with the name name and default value input.

AddBool(name, input)

Creates a bindable boolean value with the name name and default value input.

AddVector2(name, input)

Creates a bindable Vector2 value with the name name and default value input.

AddChoice(name, input)

Creates a bindable string value with the name name and default value input.

Note
The min and max values in these functions can be either numbers or other bindable values.

AddOptionFloat(variable, name, precision, min, max)

Binds a bindable floating point value to an option in the options panel with the label name and minimum and maximum values of min and max. The value is stored to precision decimal places.

AddOptionInt(variable, name, min, max)

Binds a bindable integer value to an option in the options panel with the label name and minimum and maximum values of min and max.

AddOptionBool(variable, name)

Binds a bindable boolean value to an option in the options panel with the label name.

AddOptionVector2(variable, name)

Binds a bindable Vector2 value to an option in the options panel with the label name as well as a handle to manipulate the value.

AddOptionChoice(variable, name, values)

Binds a bindable string value to an dropdown in the options panel with the label name with the options in the array values.

GetValueFloat(name)

Gets the value of a bindable floating point variable by its name.

GetValueInt(name)

Gets the value of a bindable integer variable by its name.

GetValueBool(name)

Gets the value of a bindable boolean variable by its name.

GetValueVector2(name)

Gets the value of a bindable Vector2 variable by its name.

GetValueChoice(name)

Gets the value of a bindable string variable by its name.

Note
The draw parameters in hit object functions are optional and default to true.

AddHitCircle(position, draw)

Creates a hit circle at the Vector2 position position. If draw is true, the hit circle is drawn.

AddSlider(curveType, list, draw)

Creates a slider of the type curveType with the anchor points in list. If draw is true, the slider is drawn.