180 lines
8.9 KiB
XML
180 lines
8.9 KiB
XML
<?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. -->
|
|
|
|
<!-- 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> -->
|
|
|
|
|
|
<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>
|
|
<Function name='Basename' return='string' arguments='string path'>
|
|
Returns the base name of file path.
|
|
</Function>
|
|
<Function name='FormatNumberAndSuffix' return='string' arguments='int num'>
|
|
Returns the number passed to the function followed by its suffix ("th", "nd", and so on).
|
|
</Function>
|
|
<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>
|
|
</GlobalFunctions>
|
|
|
|
<!-- Classes -->
|
|
<Classes>
|
|
<Class name='Actor'>
|
|
<Function name='halign' return='void' arguments='float fAlign'>
|
|
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.
|
|
</Function>
|
|
<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.
|
|
</Function>
|
|
<Function name='valign' return='void' arguments='float fAlign'>
|
|
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.
|
|
</Function>
|
|
<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.
|
|
</Function>
|
|
<Function name='x' return='void' arguments='float xPos'>
|
|
Set the x position of the Actor to <code>xPos</code>.
|
|
</Function>
|
|
<Function name='y' return='void' arguments='float yPos'>
|
|
Set the y position of the Actor to <code>yPos</code>.
|
|
</Function>
|
|
<Function name='z' return='void' arguments='float zPos'>
|
|
Set the z position of the Actor to <code>zPos</code>.
|
|
</Function>
|
|
</Class>
|
|
<Class name='ActorSound'>
|
|
<Description>
|
|
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.
|
|
</Description>
|
|
<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>
|
|
<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>
|
|
<Class name='Game'>
|
|
<Function name='GetName' return='string' arguments=''>
|
|
Returns the name of the game such as "dance" or "pump".
|
|
</Function>
|
|
</Class>
|
|
<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>
|
|
<Class name='RageSound'>
|
|
<Description>
|
|
See <Link class='ActorSound'>ActorSound</Link> for loading a sound.
|
|
</Description>
|
|
<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>
|
|
<Function name='speed' return='void' arguments='float fSpeed'>
|
|
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>
|
|
<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>
|
|
<Function name='GetLifeMeter' return='LifeMeter' arguments='PlayerNumber pn'>
|
|
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=''>
|
|
Returns the next <Link class='Song'>Song</Link> in the current <Link class='Course'>Course</Link>.
|
|
</Function>
|
|
</Class>
|
|
<Class name='Song'>
|
|
<Function name='GetDisplayArtist' return='string' arguments=''>
|
|
Returns the displayed artist of the song.
|
|
</Function>
|
|
<Function name='GetDisplayFullTitle' return='string' arguments=''>
|
|
Returns the displayed full title of the song, including subtitle.
|
|
</Function>
|
|
<Function name='GetDisplayMainTitle' return='string' arguments=''>
|
|
Returns the displayed main title of the song.
|
|
</Function>
|
|
<Function name='GetTranslitArtist' return='string' arguments=''>
|
|
Returns the transliterated artist of the song.
|
|
</Function>
|
|
<Function name='GetTranslitFullTitle' return='string' arguments=''>
|
|
Returns the transliterated full title of the song, including subtitle.
|
|
</Function>
|
|
<Function name='GetTranslitMainTitle' return='string' arguments=''>
|
|
Returns the transliterated main title of the song.
|
|
</Function>
|
|
<Function name='IsLong' return='bool' arguments=''>
|
|
Returns true if the song meets the criteria for a "Long Version".
|
|
</Function>
|
|
<Function name='IsMarathon' return='bool' arguments=''>
|
|
Returns true if the song meets the criteria for "Marathon" length.
|
|
</Function>
|
|
</Class>
|
|
</Classes>
|
|
<!-- 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>
|
|
</Documentation>
|