Updated TimingData docs.

This commit is contained in:
Kyzentun
2014-09-10 05:37:13 -06:00
parent 321c2cdc62
commit 3006b70d71
+16
View File
@@ -4606,6 +4606,22 @@ save yourself some time, copy this for undocumented things:
</Function>
</Class>
<Class name='TimingData'>
<Description>
GetBPMsAndTimes, GetStops, GetDelays, GetLabels, GetWarps, GetCombos, GetTimeSignatures, GetTickcounts, GetFakes, GetScrolls, and GetSpeeds all have two different modes.<br />
If the metric TimingData:GetReturnsNumbers is false (the default), they return tables of strings. The strings are numbers separated by '='.<br />
If the metric TimingData:GetReturnsNumbers is true, they return tables of tables, and the inner tables contain numbers as described for each function.<br />
The first form is kept around and is the default for compatibility with older themes. The advantage of the second form is that you no longer need to have a bit of code in your theme to transform the string into a table of numbers before you can use it.<br />
Example:<br />
local bpmsand= timing_data:GetBPMsAndTimes()<br />
for i, s in ipairs(bpmsand) do<br />
local sand= split("=", s)<br />
bpmsand[i]= {tonumber(sand[1]), tonumber(sand[2])}<br />
end<br />
-- do something that looks at all the bpms and times. <br />
Becomes:<br />
local bpmsand= timing_data:GetBPMsAndTimes()<br />
-- do something that looks at all the bpms and times. <br />
</Description>
<Function name='GetActualBPM' return='{float}' arguments=''>
Returns the minimum and maximum BPM of the song in a table (in that order).
</Function>