update LuaDocs for Singletons, Enums for 5.1-new

This commit is contained in:
quietly-turning
2020-06-25 04:49:09 -04:00
parent 7804efb103
commit d62797973f
2 changed files with 105 additions and 0 deletions
+12
View File
@@ -2361,6 +2361,18 @@
<EnumValue name='&apos;EditState_RecordPaused&apos;' value='2'/>
<EnumValue name='&apos;EditState_Playing&apos;' value='3'/>
</Enum>
<Enum name='EffectMode'>
<EnumValue name='&apos;EffectMode_Normal&apos;' value='0'/>
<EnumValue name='&apos;EffectMode_Unpremultiply&apos;' value='1'/>
<EnumValue name='&apos;EffectMode_ColorBurn&apos;' value='2'/>
<EnumValue name='&apos;EffectMode_ColorDodge&apos;' value='3'/>
<EnumValue name='&apos;EffectMode_VividLight&apos;' value='4'/>
<EnumValue name='&apos;EffectMode_HardMix&apos;' value='5'/>
<EnumValue name='&apos;EffectMode_Overlay&apos;' value='6'/>
<EnumValue name='&apos;EffectMode_Screen&apos;' value='7'/>
<EnumValue name='&apos;EffectMode_YUYV422&apos;' value='8'/>
<EnumValue name='&apos;EffectMode_DistanceField&apos;' value='9'/>
</Enum>
<Enum name='FailType'>
<EnumValue name='&apos;FailType_Immediate&apos;' value='0'/>
<EnumValue name='&apos;FailType_ImmediateContinue&apos;' value='1'/>
+93
View File
@@ -1978,6 +1978,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='AnnouncerManager'>
<Description>
This singleton is accessible to Lua via <code>ANNOUNCER</code>.
</Description>
<Function name='DoesAnnouncerExist' return='bool' arguments='string sAnnonucer'>
Returns true if Announcer <code>sAnnouncer</code> exists.
</Function>
@@ -1992,6 +1995,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='ArchHooks'>
<Description>
This singleton is accessible to Lua via <code>HOOKS</code>.
</Description>
<Function name='AppHasFocus' return='bool' arguments=''>
Returns <code>true</code> if the application presently has focus.
</Function>
@@ -2183,6 +2189,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='CharacterManager'>
<Description>
This singleton is accessible to Lua via <code>CHARMAN</code>.
</Description>
<Function name='GetAllCharacters' return='{Character}' arguments=''>
Returns a table of all characters installed.
</Function>
@@ -2331,6 +2340,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='CryptManager'>
<Description>
This singleton is accessible to Lua via <code>CRYPTMAN</code>.
</Description>
<Function name='GenerateRandomUUID' return='string' arguments=''>
Generates a random UUID (version 4).
</Function>
@@ -2633,6 +2645,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='GameManager'>
<Description>
This singleton is accessible to Lua via <code>GAMEMAN</code>.
</Description>
<Function name='GetFirstStepsTypeForGame' return='StepsType' arguments='Game game'>
Return the first <Link class='StepsType' /> for the specified <code>game</code>.
</Function>
@@ -2656,6 +2671,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='GameSoundManager'>
<Description>
This singleton is accessible to Lua via <code>SOUND</code>.
</Description>
<Function name='DimMusic' return='void' arguments='float fVolume, float fDuration'>
Set the music volume to <code>fVolume</code> for <code>fDuration</code> seconds.
</Function>
@@ -2686,6 +2704,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='GameState'>
<Description>
This singleton is accessible to Lua via <code>GAMESTATE</code>.
</Description>
<Function name='AddStageToPlayer' return='void' arguments='PlayerNumber pn'>
Adds another stage to the specifed player.
</Function>
@@ -3195,6 +3216,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='InputFilter'>
<Description>
This singleton is accessible to Lua via <code>INPUTFILTER</code>.
</Description>
<Function name='GetMouseWheel' return='float' arguments=''>
Returns the mouse wheel value.
</Function>
@@ -3231,6 +3255,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='MemoryCardManager'>
<Description>
This singleton is accessible to Lua via <code>MEMCARDMAN</code>.
</Description>
<Function name='GetCardLocked' return='bool' arguments='PlayerNumber pn'>
Returns <code>true</code> if player <code>pn</code>'s card is locked.
</Function>
@@ -3275,6 +3302,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='MessageManager'>
<Description>
This singleton is accessible to Lua via <code>MESSAGEMAN</code>.
</Description>
<Function name='Broadcast' return='void' arguments='string sMessage, table paramTable'>
Broadcast the message to all listeners subscribed to <code>sMessage</code>. The
second argument is an optional table of parameters. It may be omitted or explicitly
@@ -3339,6 +3369,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='NoteSkinManager'>
<Description>
This singleton is accessible to Lua via <code>NOTESKIN</code>.
</Description>
<Function name='GetMetric' return='string' arguments='string sElement, string sValue'>
Returns a string from the specified element and value.
</Function>
@@ -4117,6 +4150,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='PrefsManager'>
<Description>
This singleton is accessible to Lua via <code>PREFSMAN</code>.
</Description>
<Function name='GetPreference' return='various' arguments='string sPreference'>
Return the value of the preference <code>sPreference</code>.
</Function>
@@ -4339,6 +4375,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='ProfileManager'>
<Description>
This singleton is accessible to Lua via <code>PROFILEMAN</code>.
</Description>
<Function name='GetLocalProfile' return='Profile' arguments='string sProfileID'>
Returns the Profile for the specified profile ID.
</Function>
@@ -4438,6 +4477,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='RageDisplay'>
<Description>
This singleton is accessible to Lua via <code>DISPLAY</code>.
</Description>
<Function name='GetDisplayHeight' return='int' arguments=''>
Return the height of the display.
</Function>
@@ -4517,6 +4559,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='RageFileManager'>
<Description>
This singleton is accessible to Lua via <code>FILEMAN</code>.
</Description>
<Function name='DoesFileExist' return='bool' arguments='string sPath'>
Returns <code>true</code> if a file exists at <code>sPath</code>.
</Function>
@@ -4531,6 +4576,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='RageInput'>
<Description>
This singleton is accessible to Lua via <code>INPUTMAN</code>.
</Description>
<Function name='GetDescriptions' return='{string}' arguments=''>
Return an array of connected input device descriptions.
</Function>
@@ -4759,6 +4807,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='ScreenManager'>
<Description>
This singleton is accessible to Lua via <code>SCREENMAN</code>.
</Description>
<Function name='AddNewScreenToTop' return='void' arguments='string sScreenName, string sMessage'>
Adds a screen at the top of the screen stack. (<code>sMessage</code> is an optional ScreenMessage posted once the new screen is finished.)
</Function>
@@ -5140,6 +5191,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='SongManager'>
<Description>
This singleton is accessible to Lua via <code>SONGMAN</code>.
</Description>
<Function name='DoesCourseGroupExist' return='bool' arguments='string sGroup'>
Returns <code>true</code> if the specified course group exists.
</Function>
@@ -5469,6 +5523,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='StatsManager'>
<Description>
This singleton is accessible to Lua via <code>STATSMAN</code>.
</Description>
<Function name='GetAccumPlayedStageStats' return='StageStats' arguments=''>
Returns the accumulated played StageStats.
</Function>
@@ -5699,6 +5756,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='ThemeManager'>
<Description>
This singleton is accessible to Lua via <code>THEME</code>.
</Description>
<Function name='DoesLanguageExist' return='bool' arguments='string langName'>
Returns <code>true</code> if the specified language exists in the current theme.
</Function>
@@ -5988,6 +6048,9 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='UnlockManager'>
<Description>
This singleton is accessible to Lua via <code>UNLOCKMAN</code>.
</Description>
<Function name='AnyUnlocksToCelebrate' return='bool' arguments=''>
Returns <code>true</code> if there are any unlocks to celebrate.
</Function>
@@ -6087,6 +6150,20 @@ save yourself some time, copy this for undocumented things:
</Classes>
<!-- Enums -->
<Enums>
<Description>
StepMania's enums are exposed to Lua as global tables. Note that although the enum values start at 0, these global Lua tables are indexed starting at 1.<br />
Functions that require enums as arguments will accept either the string constant or number value.<br />
For example, <Link class='GameState' function='SetPreferredDifficulty' /> accepts a <code>PlayerNumber</code> and <code>Difficulty</code> as arguments.
Each of these is valid way to set P1's preferred difficulty to hard:<br />
<pre><code>
-- using strings
GAMESTATE:SetPreferredDifficulty( "PlayerNumber_P1", "Difficulty_Hard" )
-- using values
GAMESTATE:SetPreferredDifficulty( 0, 3 )
-- using global Lua tables
GAMESTATE:SetPreferredDifficulty( PlayerNumber[1], Difficulty[4] )
</code></pre>
</Description>
<Enum name='BlendMode'>
<Description>
Blending modes. See <Link class='Actor' function='blend' />.
@@ -6103,4 +6180,20 @@ save yourself some time, copy this for undocumented things:
</Description>
</Enum>
</Enums>
<!-- Singletons -->
<Singletons>
<Description>
The StepMania engine uses singletons internally when it needs only one instance of a class.<br />
Each singleton has a class name (e.g. RageDisplay, NoteSkinManager, etc.) from the C++ engine, and a similar (but different) userdata name available to Lua (e.g. <code>DISPLAY</code>, <code>NOTESKIN</code>, etc.).<br />
Simple examples:
<pre><code>
-- use GameState's singleton to get the current song
local song = GAMESTATE:GetCurrentSong()
-- use ScreenManager's singleton to briefly show text on-screen
SCREENMAN:SystemMessage("hello from Lua!")
</code></pre>
</Description>
</Singletons>
</Documentation>