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 valueinput
.
AddInt(name, input)
Creates a bindable integer value with the name
name
and default valueinput
.
AddBool(name, input)
Creates a bindable boolean value with the name
name
and default valueinput
.
AddVector2(name, input)
Creates a bindable
Vector2
value with the namename
and default valueinput
.
AddChoice(name, input)
Creates a bindable string value with the name
name
and default valueinput
.
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 ofmin
andmax
. The value is stored toprecision
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 ofmin
andmax
.
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 labelname
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 arrayvalues
.
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
positionposition
. Ifdraw
is true, the hit circle is drawn.
AddSlider(curveType, list, draw)
Creates a slider of the type
curveType
with the anchor points inlist
. Ifdraw
is true, the slider is drawn.