Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

72 lines (49 sloc) 2.188 kB
/**
\page lua_api_displayable Displayable objects
Displayable objects are things that can be drawn on a destination surface.
They include the following types:
\subpage lua_api_surface,
\subpage lua_api_text_surface and
\subpage lua_api_sprite.
This page describes the methods common to those types.
<hr>
\section lua_api_displayable_methods Methods of all displayable types
<hr>
\subsection lua_api_displayable_draw displayable:draw(dst_surface, [x, y])
Draws this object on a destination surface.
- \c dst_surface (surface): The destination surface.
- \c x (number, optional): X coordinate of where to draw this object
(default \c 0).
- \c y (number, optional): Y coordinate of where to draw this object.
(default \c 0).
<hr>
\subsection lua_api_displayable_fade_in displayable:fade_in([delay], [callback])
Starts a fade-in effect on this object.
- \c delay (number, optional): Delay in milliseconds between two
frames of the fade-in animation (default is \c 20).
- \c callback (function, optional): A function to call when the
fade-in effect finishes.
<hr>
\subsection lua_api_displayable_fade_out displayable:fade_out([delay], [callback])
Starts a fade-out effect on this object.
- \c delay (number, optional): Delay in milliseconds between two
frames of the fade-out animation (default is \c 20).
- \c callback (function, optional): A function to call when the
fade-out effect finishes.
<hr>
\subsection lua_api_displayable_start_movement displayable:start_movement(movement, [callback])
Makes this object move.
Moving a displayable object means that when the objects gets displayed
somewhere, it is displayed with an offset corresponding to the result of the
movement.
- \c movement (movement): The movement to apply.
See \ref lua_api_movement_create to create it.
- \c callback (function, optional): A function to call when the movement
finishes.
\remark Only one movement can be applied at a time on a displayable object.
If you call this function, any previous movement running on this object is
stopped.
<hr>
\subsection lua_api_displayable_stop_movement displayable:stop_movement()
Stops the movement of this displayable object, if any.
*/
Jump to Line
Something went wrong with that request. Please try again.