documentation automatically generated from the engine's API registration tables
a method with return type self returns its own object, so calls can be chained.
if declared in your LuaEntryPoint file, the engine will invoke these.
| Method |
|---|
void on_init( void )called once after the beatmap loads, before play. events scheduled in on_init replay when seeking backwards. |
void on_update( float music_time_ms )called once per rendered frame. framerate-dependent and is not re-run when seeking. |
void on_fixed_update( float music_time_ms )called at a fixed rate in music time, decoupled from framerate. useful for simulation logic as it catches up in a loop on forward seek and replays deterministically. the rate is customizable by setting FixedUpdateRate in the inso file. note: if this is declared, the engine will call scheduled events using the fixed update timer for consistency. |
void on_beat( int beat )called when the music time crosses a beat of the active uninherited timing point. |
void on_timing_change( int beat, float bpm )called when a new uninherited timing point becomes active. |
void on_pause_change( bool paused )called when playback is paused or resumed. |
void on_controller_pressed( string key )called when a gameplay key goes down. key is one of "k1", "k2", "m1", "m2". |
void on_controller_released( string key )called when a gameplay key goes up. key is one of "k1", "k2", "m1", "m2". |
void on_key_pressed( string key )called when a keyboard key goes down. key is the SDL3 scancode name. |
void on_key_released( string key )called when a keyboard key goes up. key is the SDL3 scancode name. |
void on_cursor_moved( float x, float y )called when the cursor moves, with the new position in playfield (osupx) coordinates. |
void on_judgement( Hitobject hitobject, Judgement judgement, float timing_error_ms )called when an object is judged. judgement is a Judgement enum value; timing_error_ms is signed (hit time minus perfect time). hitobject is nil for judgements spawned via judgement_spawn without one. |
(Judgement|nil, float|nil) validate_judgement( Hitobject hitobject, Judgement judgement, float timing_error_ms )called before a judgement is committed. return nothing to let it pass, or return a Judgement value (and optionally a replacement timing error) to overwrite it - score, combo, hitsounds, animations and the judgement graphic all follow the overwritten result. Judgement.NONE is rejected; a judgement cannot be cancelled, overwrite to Judgement.IGNORED_HIT instead. judgements from judgement_spawn are not filtered. |
void on_kiai_change( bool kiai )called when the kiai state is set or unset. |
void on_combo_break( int lost_combo )called when the combo resets to 0, with the combo count that was lost. not called for breaks at 0 combo. |
void on_map_complete( void )called once when the last scoring hitobject has been judged and the results screen appears (play mode only). seeking backward re-arms it. |
free functions, called directly.
| Method |
|---|
any load_file( string filename )loads and runs a lua file from the mapset folder, returning whatever it returns. |
(float x, float y) get_cursor_pos( void )the cursor position in playfield (osupx) space. |
void set_cursor_visible( bool visible )shows or hides the built-in skin cursor. hide it to draw your own from a Drawable. |
void set_cursor_layer( Layer layer )moves the built-in skin cursor (trail, click expand and all) to the given render layer. put it on a captured layer to warp it with the scene, or on Layer.PLATFORM to keep it above post-processing. default is Layer.CURSOR. |
bool controller_is_down( string key )true if the named gameplay key is held. key is one of "k1", "k2", "m1", "m2". |
bool controller_is_up( string key )true if the named gameplay key is not held. key is one of "k1", "k2", "m1", "m2". |
bool key_is_down( string|int key )true if the given keyboard key is held. accepts an sdl scancode name or a numeric scancode. |
bool key_is_up( string|int key )true if the given keyboard key is not held. accepts an sdl scancode name or a numeric scancode. |
void trigger_event( string name, ... )fires every callback registered under name. object callbacks get (self, ...), globals get (...). |
void schedule_event( string name, float delay_ms = 0 )fires trigger_event(name) after delay_ms of music time. scheduled from on_init it replays on backward seek; scheduled from a callback it fires once. safe to call again from within a callback. |
void schedule_at( float time_ms, fn callback )runs callback on the first frame at or after music time time_ms. scheduled from on_init it replays on backward seek; scheduled from a callback it fires once. safe to call again from within a callback. |
void schedule_after( float delay_ms, fn callback )runs callback on the first frame at least delay_ms of music time from now. scheduled from on_init it replays on backward seek; scheduled from a callback it fires once. safe to call again from within a callback. |
void register_global_event( string name, fn callback )registers a callback not tied to any object; it receives only the extra args from trigger_event. |
void judgement_spawn( Judgement judgement, float time_error_ms = 0, Hitobject hitobject = nil )creates a judgement as if the game had posted it, but no graphic is created and validate_judgement is skipped. an attached hitobject attributes the judgement (per-object callbacks fire, slider combo rules apply) without counting as that object's own final judgement. calling this while a judgement is dispatching (on_judgement/validate_judgement) is an error. |
| Method |
|---|
Hitobject Hitobject.get_at_ms( int ms )the hitobject whose start time is exactly ms. errors if there's no object at that time. |
Hitobject[] Hitobject.get_in_range_ms( int from_ms, int to_ms )all hitobjects with start times in [from_ms, to_ms]. |
Hitobject[] Hitobject.get_visible( void )all hitobjects currently within their visible time window. |
Hitobject[] Hitobject.get_visible_incl_followpoints( void )like get_visible(), but also includes objects whose followpoint line is currently drawn (which can lead or trail their own approach window). use this set when positioning objects so their followpoints track the intended position before the object itself appears. |
Hitobject[] Hitobject.get_with_all_bits( int mask )all hitobjects with every extra-bit in mask set. a zero mask returns nothing. |
Hitobject[] Hitobject.get_with_any_bits( int mask )all hitobjects with at least one extra-bit in mask set. a zero mask returns nothing. |
self hitobject:register_event( string name, fn callback )registers callback to run when name is triggered for this object; it receives (self, ...). |
bool hitobject:is_hitcircle( void )true if this object is a hitcircle. |
bool hitobject:is_slider( void )true if this object is a slider. |
bool hitobject:is_spinner( void )true if this object is a spinner. |
self hitobject:hide( void )stops the object (and its slider body) from rendering until unhide(). persists across phase transitions; still hittable. |
self hitobject:unhide( void )undoes hide(). |
self hitobject:set_hidden_fades( bool enabled )renders this object like the hidden mod: no approach circle, the circle fades out before its hit time, slider bodies fade out over the slide. takes effect when the object's graphics spawn, so set it from on_init. |
self hitobject:hide_combo_numbers( void )stops drawing the combo number on this object's circle. |
self hitobject:unhide_combo_numbers( void )undoes hide_combo_numbers(). |
self hitobject:hide_followpoints( void )suppresses the followpoints both leaving and arriving at this object. |
self hitobject:unhide_followpoints( void )undoes hide_followpoints(). |
self hitobject:hide_followpoint_in( void )suppresses only the followpoint arriving at this object from the previous one. |
self hitobject:unhide_followpoint_in( void )undoes hide_followpoint_in(). |
self hitobject:hide_followpoint_out( void )suppresses only the followpoint leaving this object toward the next one. |
self hitobject:unhide_followpoint_out( void )undoes hide_followpoint_out(). |
self hitobject:set_snake_in( bool enabled )whether this slider's body snakes out of the head during the approach (default on). no-op on non-sliders; also gated by the user's snaking-in setting. |
self hitobject:set_snake_out( bool enabled )whether this slider's body retracts behind the ball on its final span (default on). no-op on non-sliders; also gated by the user's snaking-out setting. |
int hitobject:get_index( void )the object's index into the beatmap's hitobject list. |
int hitobject:get_extra_bits( void )the object's script-defined extra-bits mask used for filtering. |
bool hitobject:has_all_bits( int mask )true if every bit in mask is set on this object. |
bool hitobject:has_any_bits( int mask )true if at least one bit in mask is set on this object. |
(float x, float y) hitobject:get_base_pos( void )the object's current position in osupx before any script translation. |
int hitobject:get_stack_count( void )the object's note stacking level; 0 = unstacked. positive stacks offset up-left, negative (circles under a slider tail) down-right. the offset is already baked into the object's position. |
(float x, float y) hitobject:get_pos( void )the object's current position in osupx. |
self hitobject:set_pos( float x, float y )moves the object to an absolute osupx position. |
self hitobject:set_pos_px( float x, float y )moves the object to a screen-space pixel position, converted into playfield osupx. |
float hitobject:get_start_time( void )the object's start time in ms. |
self hitobject:set_start_time( float ms )sets the object's start time in ms. |
float hitobject:get_end_time( void )the object's end time in ms (equals start time for circles). |
self hitobject:set_end_time( float ms )sets the object's end time in ms. |
Phase hitobject:get_phase( void )the object's current lifecycle phase. |
self hitobject:add_element_for_phase( Phase phase, Element element )adds a custom element to draw while the object is in the given phase, replacing the default graphics. max 16 elements per phase. |
self hitobject:clear_drawables( void )removes all of the object's current drawables. |
float hitobject:get_hit_animation_length( void )the object's hit animation length in ms. |
self hitobject:set_hit_animation_length( float ms )overrides the object's hit animation length in ms. |
float hitobject:get_preempt( void )the object's approach (preempt) time in ms. |
self hitobject:set_preempt( float ms )overrides the object's approach (preempt) time in ms. |
float hitobject:get_ar( void )the object's approach rate, derived from its preempt time. |
self hitobject:set_ar( float ar )overrides the object's approach rate (converted to a preempt time). |
float hitobject:get_od( void )the object's overall difficulty, derived from its ok hit window. |
self hitobject:set_od( float od )overrides the object's hit windows (converted from an overall difficulty). |
(float marvelous, float good, float ok, float miss) hitobject:get_timing_windows( void )the object's hit window half-widths in ms. |
self hitobject:set_timing_windows( float marvelous, float good, float ok, float miss )overrides the object's hit window half-widths in ms; expects marvelous <= good <= ok <= miss. |
float hitobject:get_cs( void )the object's circle size, derived from its radius. |
float hitobject:get_cs_radius( void )the object's circle size radius in osupx. |
self hitobject:set_cs( float cs )overrides the object's circle size (converted to a radius). |
self hitobject:set_cs_radius( float radius )overrides the object's circle size radius in osupx. |
float hitobject:get_slider_distance( void )the slider's path length in osupx (0 for non-sliders). |
float hitobject:get_slider_velocity( void )the slider's velocity (0 for non-sliders). |
float hitobject:get_slider_duration_ms( void )the duration of one slider traversal in ms (0 for non-sliders). |
(float x, float y) hitobject:get_slider_ball_pos( void )the slider ball's current position in osupx (the head position for non-sliders). |
(float x, float y) hitobject:get_slider_ball_pos_at( float ms )the slider ball's position at the given music time in osupx. |
float hitobject:get_slider_ball_angle( void )the slider ball's current travel angle in radians (0 for non-sliders). |
float hitobject:get_slider_ball_angle_at( float ms )the slider ball's travel angle at the given music time in radians. |
float hitobject:get_slider_follow_circle_radius( void )the radius multiplier of the slider follow circle (0 for non-sliders). default value is 2.4. |
self hitobject:set_slider_follow_circle_radius( float mult )sets the radius multiplier of the slider follow circle. |
self hitobject:set_slider_element( SliderPart part, Element element )overrides the element used for a slider part (ball, follow circle, ticks, repeats, ends). |
| Method |
|---|
Drawable Drawable.new( string|Element source, float start_ms = 0, float end_ms = 0, Layer layer = Layer.BACKGROUND )creates a drawable from a texture name or an Element, on the current render layer. a texture name may be a mapset texture or a skin element via "skin:<name>" (e.g. "skin:cursor"). |
self drawable:register_event( string name, fn callback )registers callback to run when name is triggered for this drawable; it receives (self, ...). |
Drawable drawable:clone( void )creates an independent copy of this drawable. |
Element drawable:get_element( void )gets the underlying element type of the drawable. |
self drawable:set_element( Element el )sets the underlying element type of the drawable to the given element. |
self drawable:set_animation( Animation anim )overrides this drawable's animation with the given list, replacing the element template's for this instance only. |
Layer drawable:get_layer( void )the drawable's render layer. |
self drawable:set_layer( Layer layer )moves the drawable to the given render layer. |
self drawable:set_uv( float x, float y, float w, float h )sets the uv sub-rect in [0,1] space, picking a region of the texture. |
float drawable:get_uv_angle( void )the uv sub-rect's rotation in radians. |
self drawable:set_uv_angle( float angle_rad )rotates the uv sub-rect around its center. set it equal to the drawable's angle and a rotated quad samples the screen region it covers with the content upright - the basis for angled scene cuts. |
(float x, float y) drawable:get_pos( void )the drawable's position. |
self drawable:set_pos( float x, float y )sets the drawable's position. |
self drawable:set_pos_px( float x, float y )sets the drawable's position from a screen-space pixel position, converted into playfield osupx. |
(float w, float h) drawable:get_size( void )the drawable's size in osupx. |
self drawable:set_size( float w, float h )sets the drawable's size in osupx. |
(float w, float h) drawable:get_size_px( void )the drawable's size in screen-space pixels. |
self drawable:set_size_px( float w, float h )sets the drawable's size from a screen-space pixel size, converted into osupx. |
Anchor drawable:get_anchor( void )the drawable's anchor point. |
self drawable:set_anchor( Anchor anchor )sets the drawable's anchor point. |
self drawable:set_fullscreen( bool enabled )makes the drawable cover the whole render target (size derived each frame, tracks resizes); pos still nudges it in osupx and set_pos_px in pixels. handy for compositing a captured layer. |
self drawable:set_beat_pulse( bool enabled )pulses the drawable's size every beat: snaps up on the beat and eases back down before the next (the reverse arrow effect). |
self drawable:set_hitobject_dim( bool enabled )dims the drawable until shortly before its associated hitobject's hit time (or its own end time if unattached), matching approaching hitobjects. |
int drawable:get_color( void )the drawable's color as a packed rgba integer. |
self drawable:set_color( int color )sets the drawable's color from a packed rgba integer (see Color.rgb / Color.rgba). |
(float x, float y) drawable:get_vel( void )the drawable's linear velocity. |
self drawable:set_vel( float x, float y )sets the drawable's linear velocity. |
(float x, float y) drawable:get_accel( void )the drawable's linear acceleration. |
self drawable:set_accel( float x, float y )sets the drawable's linear acceleration. |
float drawable:get_angle( void )the drawable's rotation in radians. |
self drawable:set_angle( float angle_rad )sets the drawable's rotation in radians. |
float drawable:get_angle_vel( void )the drawable's angular velocity. |
self drawable:set_angle_vel( float angle_vel )sets the drawable's angular velocity. |
float drawable:get_animation_rate( void )the drawable's animation playback rate multiplier (1 = normal). |
self drawable:set_animation_rate( float rate )sets the drawable's animation playback rate multiplier (1 = normal). |
self drawable:set_loop_animation( bool enabled )loops the drawable's animation list instead of playing it once; the period comes from animation:set_loop_period (defaulting to the list's own extent). |
float drawable:get_start_time( void )the drawable's start time in ms. |
self drawable:set_start_time( float ms )sets the drawable's start time in ms. |
float drawable:get_end_time( void )the drawable's end time in ms. |
self drawable:set_end_time( float ms )sets the drawable's end time in ms. |
self drawable:set_time( float start_ms, float end_ms )sets the drawable's start and end time in ms. |
self drawable:hide( void )stops the drawable from rendering without destroying it; pair with show() to bring it back. |
self drawable:show( void )resumes rendering a hidden drawable. |
self drawable:destroy( void )permanently reaps the drawable next frame; its handle becomes invalid. |
| Method |
|---|
Element Element.new( string texture_name = nil )creates a quad element using the default shader. with a texture name (a mapset texture, or a skin element via "skin:<name>") it sets that texture, otherwise a blank white quad. |
Element element:clone( void )creates an independent copy of this element. |
self element:register_event( string name, fn callback )registers callback to run when name is triggered for this element; it receives (self, ...). |
self element:set_tex( string texture_name )sets the element's texture by name: a mapset texture, or a skin element via "skin:<name>" (e.g. "skin:hitcircle"). |
self element:set_uv( float x, float y, float w, float h )sets the uv sub-rect in [0,1] space, picking a region of the texture. |
self element:set_shader( string shader_name )sets the element's shader by mapset pipeline name. |
self element:set_premultiplied( bool enabled )composites the element as an already-premultiplied source (e.g. a captured render target sampled back out) using premultiplied-over blend instead of straight alpha. builtin quad shader only. |
self element:set_render_target( string render_target_name )redirects this element's draws into the named render target instead of the screen. |
self element:set_animation( Animation animation )attaches an animation list to the element. |
self element:set_mesh( string buffer_name, int vertex_count = 0 )marks the element as mesh-drawn, sourcing geometry from the named SSBO instead of the quad batch. |
self element:use_combo_color( bool enabled )when enabled, the element tints with the hitobject's combo color. |
| Method |
|---|
Animation Animation.new( TimeDomain domain = 0 )creates an empty animation list to attach to an element. domain says what keyframe times mean, defaulting to TimeDomain.NORMALIZED. |
self animation:move( float start, float end, float from_x, float from_y, float to_x, float to_y, Tween tween = 0 )appends a positional tween from (from_x, from_y) to (to_x, to_y) over [start, end]. |
self animation:move_x( float start, float end, float from, float to, Tween tween = 0 )appends a horizontal tween from from to to over [start, end], leaving the y position alone. |
self animation:move_y( float start, float end, float from, float to, Tween tween = 0 )appends a vertical tween from from to to over [start, end], leaving the x position alone. |
self animation:scale( float start, float end, float from_x, float from_y, float to_x, float to_y, Tween tween = 0 )appends a scale tween from (from_x, from_y) to (to_x, to_y) over [start, end]. |
self animation:scale_x( float start, float end, float from, float to, Tween tween = 0 )appends a horizontal scale tween from from to to over [start, end], leaving the height alone. |
self animation:scale_y( float start, float end, float from, float to, Tween tween = 0 )appends a vertical scale tween from from to to over [start, end], leaving the width alone. |
self animation:rotate( float start, float end, float from, float to, Tween tween = 0 )appends a rotation tween in radians from from to to over [start, end]. |
self animation:color( float start, float end, int from_color, int to_color, Tween tween = 0 )appends a color tween between two packed rgba colors over [start, end]. |
self animation:alpha( float start, float end, float from, float to, Tween tween = 0 )appends an alpha tween from from to to over [start, end]. |
self animation:texture( float start, float end, string texture_name, float layer = 0 )appends a keyframe that swaps to the named texture (and array layer) over [start, end]. |
self animation:frames( float start, float end, string texture_name )spreads every layer of a texture array as evenly-spaced frames over [start, end]. |
self animation:set_time_domain( TimeDomain domain )sets what this list's keyframe times mean. NORMALIZED is [0,1] across the drawable's lifetime, MILLISECONDS counts from the drawable's start, MAP_MILLISECONDS is absolute map time like an osu storyboard. MAP_MILLISECONDS ignores the drawable's animation rate. |
self animation:set_loop_period( float ms )sets the loop period in ms for drawables flagged LOOP_ANIMATION. 0 (default) loops over the list's own extent. ignored in the NORMALIZED domain, which always loops over [0,1]. |
| Method |
|---|
Buffer Buffer.get( string name )looks up a mapset buffer (SSBO) by name; returns nil if not found. |
void buffer:bind( int user_slot )binds the buffer to a user SSBO slot (0-7, mapping to USER_0..USER_7). |
void buffer:write_f32s( int byte_offset, float value, ... )writes one or more f32s at byte_offset (must be 4-byte aligned). |
void buffer:write_vec4( int vec4_index, float x, float y, float z, float w )writes four f32s at vec4_index * 16 bytes. |
int buffer:size( void )the buffer's size in bytes. |
| Method |
|---|
void Sound.play( string name, float volume = 1.0, float pan = 0.0 )plays a mapset sample once at the given volume and stereo pan. |
Sound Sound.play_loop( string name, float volume = 1.0 )starts looping a mapset sample and returns a handle you can stop(). |
void sound:stop( void )stops a looping sound started by Sound.play_loop. |
| Method |
|---|
int Color.rgb( int r, int g, int b )packs r, g, b (each 0-255) into an rgba integer with alpha 1. |
int Color.rgba( int r, int g, int b, int a )packs r, g, b, a (each 0-255) into an rgba integer. |
| Method |
|---|
float Beatmap.get_music_time_ms( void )the current music playback time in ms. |
float Beatmap.get_length_ms( void )the total length of the map's audio in ms. |
float Beatmap.get_bpm( void )the bpm at the current timing point. |
float Beatmap.get_beat_length_ms( void )the beat length in ms at the current timing point. |
float Beatmap.get_beat_proximity( float at_time_ms = now )1 exactly on the beat, easing off to 0 right before the next. drive your own pulse effects with this. |
float Beatmap.get_ar_ms( void )the map's approach (preempt) time in ms. |
float Beatmap.get_cs_osupx( void )the map's circle radius in osupx. |
bool Beatmap.is_paused( void )true if playback is currently paused. |
int Beatmap.add_layer( string name, { Layer anchor = Layer.HITOBJECTS, bool above = true } )declares a custom render layer positioned relative to a built-in anchor, returning its id. pass the id anywhere a Layer is taken (Drawable.new, set_cursor_layer, capture_layers, add_post_pass after). above=true draws it just after the anchor, false just before; ties among layers on the same anchor resolve in declaration order. capture it with capture_layers to route its drawables through a render target. declare these in on_init. |
void Beatmap.capture_layers( string render_target_name, table layers )redirects every drawable in the given layers into the named render target. |
void Beatmap.free_layers( table layers )stops redirecting the given layers into a render target. |
void Beatmap.set_skin_override( string skin_name )force loads a skin by folder name, as listed in the skin dropdown (e.g. "gn"). the override lasts as long as the map: it never touches the configured skin, and opening any map restores it. hitobjects already on screen keep the old skin's sizes until they expire. |
void Beatmap.clear_skin_override( void )restores the configured skin, dropping a set_skin_override. a no-op if nothing was overridden. opening a map does this on its own. |
int Beatmap.add_post_pass{ shader=, src=, dst=, Layer after }queues a fullscreen shader pass sampling src (string or table) into dst, running after the 'after' layer (default HITOBJECTS), and returns its id for remove_post_pass. src/dst names may be a render target, 'screen' (the window), or 'backbuffer' (the whole-frame capture; requires [General] Backbuffer: 1). |
void Beatmap.remove_post_pass( int pass_id )drops a pass added by add_post_pass, using the id it returned. passes keep their id when others are removed. note that freeing the layers a pass samples does not stop the pass: it keeps sampling whatever the render target last held. |
float Beatmap.get_accuracy( void )the running accuracy from 0 to 1 over objects judged so far. 1 before anything is judged. |
int Beatmap.get_combo( void )the current combo. |
int Beatmap.get_max_combo( void )the highest combo reached this play. |
(int marvelous, int good, int ok, int miss) Beatmap.get_hit_counts( void )per-result totals over objects judged so far. |
float Beatmap.get_unstable_rate( void )unstable rate over hits so far: 10x the standard deviation of hit timing errors. samples circle and slider head hits only. |
float Beatmap.get_hit_error_mean( void )the mean signed hit timing error in ms over hits so far. negative = early, positive = late. |
(float marvelous, float good, float ok, float miss) Beatmap.get_timing_windows( void )the current hit window half-widths in ms. |
void Beatmap.set_timing_windows( float marvelous, float good, float ok, float miss )sets the hit window half-widths in ms; expects marvelous <= good <= ok <= miss. |
| Method |
|---|
void Playfield.set_translation( float x, float y )sets the playfield offset in osupx, on top of the base centering translation. |
void Playfield.set_scale( float scale )sets the playfield scale multiplier (1.0 = default size). |
void Playfield.set_rotation( float radians )sets the playfield rotation in radians around the rotation anchor. |
void Playfield.set_rotation_anchor( float x, float y )sets the rotation pivot in osupx (default 256, 192 = visible playfield center). |
void Playfield.translate( float x, float y )adds to the current playfield translation in osupx. |
void Playfield.rotate( float radians )adds to the current playfield rotation in radians. |
void Playfield.scale( float scale )multiplies the current playfield size by the value. |
| Method |
|---|
(float x, float y) Window.get_size( void )returns the window size in pixels. |
(float x, float y) Window.get_size_px( void )returns the window size in pixels (alias of get_size). |
(float w, float h) Window.get_size_osupx( void )returns the window size in playfield osupx. set a drawable's size to this to fill the screen, then move it freely in osupx. assumes no playfield rotation; use drawable:set_fullscreen for the rotated case. |
(float x, float y) Window.px_to_osupx( float x, float y )converts a screen-space pixel position into playfield osupx (full transform: translate/scale/rotate). |
(float x, float y) Window.osupx_to_px( float x, float y )converts a playfield osupx position into screen-space pixels (full transform: translate/scale/rotate). |
(float x, float y) Window.get_pos( void )returns the window position in pixels. |
(float width, float height) Window.set_size( float width, float height )sets the window size in pixels. |
(float x, float y) Window.set_pos( float x, float y )sets the window position in pixels. |
(float opacity) Window.set_opacity( float opacity )fades the background drawable to opacity (0-1) and toggles window transparency below 1. |
(bool ok) Window.debug( bool ok )enables or disables debug mode. |
| Method |
|---|
void Shader.set_param( int index, float value )writes a single float into the user param buffer at index (0-63). |
void Shader.set_vec4( int index, float x, float y, float z, float w )writes a vec4 into the user param buffer at index (0-15). |
| Constant | Value |
|---|---|
Layer.BACKGROUND | 0 |
Layer.FOREGROUND | 1 |
Layer.HITOBJECTS | 2 |
Layer.OVERLAY | 3 |
Layer.UI | 4 |
Layer.CURSOR | 5 |
Layer.TOP | 6 |
Layer.PLATFORM | 7 |
| Constant | Value |
|---|---|
Judgement.NONE | 0 |
Judgement.MISS | 1 |
Judgement.OK | 2 |
Judgement.GOOD | 3 |
Judgement.MARVELOUS | 4 |
Judgement.SLIDER_SMALL_SCOREPOINT | 5 |
Judgement.SLIDER_LARGE_SCOREPOINT | 6 |
Judgement.SLIDER_SCOREPOINT_MISS | 7 |
Judgement.SLIDER_HEAD_MISS | 8 |
Judgement.SLIDER_HEAD_OK | 9 |
Judgement.SLIDER_HEAD_GOOD | 10 |
Judgement.SLIDER_HEAD_MARVELOUS | 11 |
Judgement.SLIDER_END_MISS | 12 |
Judgement.IGNORED_HIT | 13 |
Judgement.COMBO_BREAK | 14 |
| Constant | Value |
|---|---|
Anchor.TOP_LEFT | 0 |
Anchor.TOP_MIDDLE | 1 |
Anchor.TOP_RIGHT | 2 |
Anchor.MIDDLE_LEFT | 3 |
Anchor.CENTER | 4 |
Anchor.MIDDLE_RIGHT | 5 |
Anchor.BOTTOM_LEFT | 6 |
Anchor.BOTTOM_MIDDLE | 7 |
Anchor.BOTTOM_RIGHT | 8 |
| Constant | Value |
|---|---|
Tween.LINEAR | 0 |
Tween.QUAD_IN | 1 |
Tween.QUAD_OUT | 2 |
Tween.QUAD_IN_OUT | 3 |
Tween.CUBIC_IN | 4 |
Tween.CUBIC_OUT | 5 |
Tween.CUBIC_IN_OUT | 6 |
Tween.QUARTIC_IN | 7 |
Tween.QUARTIC_OUT | 8 |
Tween.QUARTIC_IN_OUT | 9 |
Tween.QUINTIC_IN | 10 |
Tween.QUINTIC_OUT | 11 |
Tween.QUINTIC_IN_OUT | 12 |
Tween.SINE_IN | 13 |
Tween.SINE_OUT | 14 |
Tween.SINE_IN_OUT | 15 |
Tween.EXPO_IN | 16 |
Tween.EXPO_OUT | 17 |
Tween.EXPO_IN_OUT | 18 |
Tween.BACK_IN | 19 |
Tween.BACK_OUT | 20 |
Tween.BACK_IN_OUT | 21 |
Tween.ELASTIC_OUT | 22 |
Tween.BOUNCE_OUT | 23 |
| Constant | Value |
|---|---|
Phase.NONE | 0 |
Phase.PREEMPT | 1 |
Phase.POSTEMPT | 2 |
Phase.HOLD | 3 |
Phase.HIT | 4 |
Phase.MISS | 5 |
| Constant | Value |
|---|---|
SliderPart.BALL | 0 |
SliderPart.FOLLOW_CIRCLE | 1 |
SliderPart.TICK | 2 |
SliderPart.REPEAT | 3 |
SliderPart.END | 4 |
SliderPart.END_OVERLAY | 5 |
| Constant | Value |
|---|---|
TimeDomain.NORMALIZED | 0 |
TimeDomain.MILLISECONDS | 1 |
TimeDomain.MAP_MILLISECONDS | 2 |