Changed TimingData GetReturnsNumbers metric to optional boolean arg to the functions.
This commit is contained in:
@@ -4830,8 +4830,8 @@ save yourself some time, copy this for undocumented things:
|
|||||||
<Class name='TimingData'>
|
<Class name='TimingData'>
|
||||||
<Description>
|
<Description>
|
||||||
GetBPMsAndTimes, GetStops, GetDelays, GetLabels, GetWarps, GetCombos, GetTimeSignatures, GetTickcounts, GetFakes, GetScrolls, and GetSpeeds all have two different modes.<br />
|
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 false (or nothing) is the argument to these functions, 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 />
|
If the argument 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 />
|
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 />
|
Example:<br />
|
||||||
local bpmsand= timing_data:GetBPMsAndTimes()<br />
|
local bpmsand= timing_data:GetBPMsAndTimes()<br />
|
||||||
@@ -4841,7 +4841,7 @@ save yourself some time, copy this for undocumented things:
|
|||||||
end<br />
|
end<br />
|
||||||
-- do something that looks at all the bpms and times. <br />
|
-- do something that looks at all the bpms and times. <br />
|
||||||
Becomes:<br />
|
Becomes:<br />
|
||||||
local bpmsand= timing_data:GetBPMsAndTimes()<br />
|
local bpmsand= timing_data:GetBPMsAndTimes(true)<br />
|
||||||
-- do something that looks at all the bpms and times. <br />
|
-- do something that looks at all the bpms and times. <br />
|
||||||
</Description>
|
</Description>
|
||||||
<Function name='GetActualBPM' return='{float}' arguments=''>
|
<Function name='GetActualBPM' return='{float}' arguments=''>
|
||||||
|
|||||||
@@ -4714,9 +4714,6 @@ TimerOnCommand=visible,false
|
|||||||
[PaneDisplay]
|
[PaneDisplay]
|
||||||
NullCountString=""
|
NullCountString=""
|
||||||
|
|
||||||
[TimingData]
|
|
||||||
GetReturnsNumbers=false
|
|
||||||
|
|
||||||
# Apparently these are still used. Let it be known that they're severely deprecated.
|
# Apparently these are still used. Let it be known that they're severely deprecated.
|
||||||
[DancingCharacters]
|
[DancingCharacters]
|
||||||
2DCharacterXP1=SCREEN_WIDTH*0.25
|
2DCharacterXP1=SCREEN_WIDTH*0.25
|
||||||
|
|||||||
+1
-1
@@ -1045,7 +1045,7 @@ public:
|
|||||||
#define GET_FUNCTION(get_name, segment_name) \
|
#define GET_FUNCTION(get_name, segment_name) \
|
||||||
static int get_name(T* p, lua_State* L) \
|
static int get_name(T* p, lua_State* L) \
|
||||||
{ \
|
{ \
|
||||||
if(TIMING_DATA_RETURNS_NUMBERS) \
|
if(lua_toboolean(L, 1)) \
|
||||||
{ \
|
{ \
|
||||||
TimingSegmentSetToLuaTable(p, segment_name, L); \
|
TimingSegmentSetToLuaTable(p, segment_name, L); \
|
||||||
} \
|
} \
|
||||||
|
|||||||
Reference in New Issue
Block a user