2007-04-08 10:08:31 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
<!-- Before checking the documentation in, make sure that it validates by
going to http://tools.decisionsoft.com/schemaValidate/ and using
Lua.xsd for the XML Schema and this file for the XML Instanace. -->
2007-08-06 00:06:35 +00:00
<!-- Using Link:
To add a link to a function in the current class:
<Link function='addx'>See addx()</Link>
To add a link to a function in another class:
<Link class='ActorFrame' function='propogate'>ActorFrame:propogate()</Link>
To add a link to a class:
<Link class='ActorFrame'>ActorFrame</Link>
To add a link to a global function:
<Link class='GLOBAL' function='Basename'>Basename()</Link>
To add a link to an Enum:
<Link class='ENUM' function='CoinMode'>CoinMode</Link> -->
2007-04-08 10:08:31 +00:00
<Documentation xmlns= 'http://www.stepmania.com' xmlns:xsi= 'http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation= 'http://www.stepmania.com Lua.xsd' >
<!-- Global functions -->
<GlobalFunctions>
2007-08-07 12:18:19 +00:00
<Function name= 'Basename' return= 'string' arguments= 'string path' >
2007-04-08 10:08:31 +00:00
Returns the base name of file path.
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'FormatNumberAndSuffix' return= 'string' arguments= 'int num' >
2007-08-05 00:39:23 +00:00
Returns the number passed to the function followed by its suffix (" th" , " nd" , and so on).
</Function>
2007-08-12 14:09:22 +00:00
<Function name= 'LoadActor' return= 'ActorDef' arguments= 'string sPath, ...' >
Returns an Actor definition for the actor at <code> sPath</code> . If <code> sPath</code> points to a Lua file, any additional arguments will be passed to that script.
</Function>
2007-04-08 10:08:31 +00:00
</GlobalFunctions>
<!-- Classes -->
<Classes>
<Class name= 'Actor' >
2007-08-07 12:18:19 +00:00
<Function name= 'halign' return= 'void' arguments= 'float fAlign' >
2007-08-06 00:43:07 +00:00
Set the fractional horizontal alignment of the Actor according to <code> fAlign</code> which should be a float in the range 0..1. An alignment of 0 is left aligned while an alignment of 1 is right aligned. See <Link function= 'horizalign' > horizalign()</Link> for the common case.
2007-08-06 00:06:35 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'horizalign' return= 'void' arguments= 'HorizAlign align' >
Set the horizontal alignment of the Actor according to <code> align</code> . See <Link function= 'halign' > halign()</Link> for fractional alignment.
2007-08-06 00:06:35 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'valign' return= 'void' arguments= 'float fAlign' >
2007-08-06 00:43:07 +00:00
Set the fractional vertical alignment of the Actor according to <code> fAlign</code> which should be a float in the range 0..1. An alignment of 0 is top aligned while an alignment of 1 is bottom aligned. See <Link function= "vertalign" > vertalign</Link> for the common case.
2007-08-06 00:06:35 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'vertalign' return= 'void' arguments= 'VertAlign align' >
Set the vertical alignment of the Actor according to <code> align</code> . See <Link function= "valign" > valign()</Link> for fractional alignment.
2007-08-06 00:06:35 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'x' return= 'void' arguments= 'float xPos' >
2007-08-06 00:43:07 +00:00
Set the x position of the Actor to <code> xPos</code> .
2007-04-08 10:08:31 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'y' return= 'void' arguments= 'float yPos' >
2007-08-06 00:43:07 +00:00
Set the y position of the Actor to <code> yPos</code> .
2007-04-08 10:08:31 +00:00
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'z' return= 'void' arguments= 'float zPos' >
2007-08-06 00:43:07 +00:00
Set the z position of the Actor to <code> zPos</code> .
</Function>
</Class>
2007-08-12 04:50:56 +00:00
<Class name= 'ActorSound' >
2007-08-12 06:09:06 +00:00
<Description>
2007-08-12 06:51:15 +00:00
This Actor represents a playable sound. There are two attributes that can be set on load.<br />
* <code> SupportPan</code> - Let the sound pan from side to side.<br />
* <code> SupportRateChanging</code> - Let the sound change rate and pitch.
2007-08-12 06:09:06 +00:00
</Description>
2007-08-12 04:50:56 +00:00
<Function name= 'get' return= 'RageSound' arguments= '' >
Returns the <Link class= 'RageSound' > RageSound</Link> that can be played by this Actor.
</Function>
<Function name= 'load' return= 'void' arguments= 'string sPath' >
Loads the sound at <code> sPath</code> .
</Function>
<Function name= 'play' return= 'void' arguments= '' >
Play the sound.
</Function>
<Function name= 'playforplayer' return= 'void' arguments= 'PlayerNumber pn' >
Play the sound on the given player's side. You must set <code> SupportPan = true</code> on load.
</Function>
</Class>
2007-08-12 04:17:30 +00:00
<Class name= 'BitmapText' >
<Function name= 'GetText' return= 'string' arguments= '' >
Returns the text.
</Function>
<Function name= 'jitter' return= 'void' arguments= 'bool bJitter' >
If <code> bJitter</code> is <code> true</code> , move each character of the string around by a small random amount.
</Function>
<Function name= 'maxheight' return= 'void' arguments= 'float fHeight' >
Set the maximum height of the unzoomed text to <code> fHeight</code> . If <code> fHeight</code> is <code> 0</code> , then there is no maximum height.
</Function>
<Function name= 'maxwidth' return= 'void' arguments= 'float hWidth' >
Set the maximum width of the unzoomed text to <code> fWidth</code> . If <code> fWidth</code> is <code> 0</code> , then there is no maximum width.
</Function>
<Function name= 'rainbowscroll' return= 'void' arguments= 'bool bRainbowScroll' >
If <code> true</code> , set each character of the text in turn to the rainbow colors in the metrics <code> BitmapText::RainbowColor#</code> .
</Function>
<Function name= 'settext' return= 'void' arguments= 'string sText' >
Set the text to <code> sText</code> .
</Function>
<Function name= 'vertspacing' return= 'void' arguments= 'int iSpacing' >
Add <code> iSpacing</code> pixels of padding between lines of text.
</Function>
<Function name= 'wrapwidthpixels' return= 'void' arguments= 'int iWidth' >
Wrap the unzoomed text at <code> iWidth</code> pixels. If you <Link class= 'Actor' function= 'zoom' > zoom</Link> or <Link class= 'Actor' function= 'zoomx' > zoomx</Link> by <code> x</code> and you want the text wrapped at <code> width</code> , then you should use <code> wrapwidthpixels(width/x)</code> .
</Function>
</Class>
2007-08-12 04:50:56 +00:00
<Class name= 'Game' >
<Function name= 'GetName' return= 'string' arguments= '' >
Returns the name of the game such as " dance" or " pump" .
</Function>
</Class>
2007-08-12 14:09:22 +00:00
<Class name= 'GameState' >
<Function name= 'GetHumanPlayers' return= '{PlayerNumber}' arguments= '' >
Returns an array of <Link class= 'PlayerNumber' > PlayerNumber</Link> s corresponding to Human players.
</Function>
</Class>
2007-08-12 04:50:56 +00:00
<Class name= 'RageSound' >
2007-08-12 06:09:06 +00:00
<Description>
See <Link class= 'ActorSound' > ActorSound</Link> for loading a sound.
</Description>
2007-08-12 04:50:56 +00:00
<Function name= 'SetProperty' return= 'void' arguments= 'string sProperty, float fVal' >
Set the value of <code> sProperty</code> to <code> fVal</code> . The supported properties depend on how the associated <Link class= 'ActorSound' > ActorSound</Link> was loaded.
</Function>
<Function name= 'pitch' return= 'void' arguments= 'float fPitch' >
Set the pitch to <code> fPitch</code> . The associated <Link class= 'ActorSound' > ActorSound</Link> have <code> SupportsRateChanging = true</code> on load.
</Function>
2007-08-12 04:53:11 +00:00
<Function name= 'speed' return= 'void' arguments= 'float fSpeed' >
2007-08-12 04:50:56 +00:00
Set the speed (that is, the rate at which the sound plays) to <code> fSpeed</code> . The associated <Link class= 'ActorSound' > ActorSound</Link> must have <code> SupportsRateChanging = true</code> on load.
</Function>
</Class>
2007-08-06 00:43:07 +00:00
<Class name= 'ScreenGameplay' >
<Function name= 'Center1Player' return= 'bool' arguments= '' >
Returns <code> true</code> if a single <Link class= 'Player' > Player</Link> has its NoteField centered.
</Function>
2007-08-07 12:18:19 +00:00
<Function name= 'GetLifeMeter' return= 'LifeMeter' arguments= 'PlayerNumber pn' >
2007-08-06 00:43:07 +00:00
Returns the <Link class= 'LifeMeter' > LifeMeter</Link> for the specified <Link class= 'ENUM' function= 'PlayerNumber' > PlayerNumber</Link> <code> pn</code> .
</Function>
<Function name= 'GetNextCourseSong' return= 'Song' arguments= '' >
2007-08-06 00:45:23 +00:00
Returns the next <Link class= 'Song' > Song</Link> in the current <Link class= 'Course' > Course</Link> .
2007-04-08 10:08:31 +00:00
</Function>
</Class>
2007-07-06 03:07:10 +00:00
<Class name= 'Song' >
2007-08-06 00:43:07 +00:00
<Function name= 'GetDisplayArtist' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the displayed artist of the song.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'GetDisplayFullTitle' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the displayed full title of the song, including subtitle.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'GetDisplayMainTitle' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the displayed main title of the song.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'GetTranslitArtist' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the transliterated artist of the song.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'GetTranslitFullTitle' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the transliterated full title of the song, including subtitle.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'GetTranslitMainTitle' return= 'string' arguments= '' >
2007-07-06 03:14:18 +00:00
Returns the transliterated main title of the song.
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'IsLong' return= 'bool' arguments= '' >
2007-07-06 04:08:21 +00:00
Returns true if the song meets the criteria for a " Long Version" .
2007-07-06 03:07:10 +00:00
</Function>
2007-08-06 00:43:07 +00:00
<Function name= 'IsMarathon' return= 'bool' arguments= '' >
2007-07-06 04:08:21 +00:00
Returns true if the song meets the criteria for " Marathon" length.
2007-07-06 03:07:10 +00:00
</Function>
</Class>
2007-04-08 10:08:31 +00:00
</Classes>
2007-08-12 06:09:06 +00:00
<!-- Enums -->
<Enums>
<Enum name= 'HorizAlign' >
<Description>
Horizontal alignment. See <Link class= 'Actor' function= 'horizalign' > Actor:horizalign()</Link> .
</Description>
</Enum>
<Enum name= 'VertAlign' >
<Description>
Vertical alignment. See <Link class= 'Actor' function= 'vertalign' > Actor:vertalign()</Link> .
</Description>
</Enum>
</Enums>
2007-04-08 10:08:31 +00:00
</Documentation>