re-add "get metric as Lua expression"
This commit is contained in:
@@ -968,6 +968,17 @@ RageColor ThemeManager::GetMetricC( const RString &sClassName, const RString &sV
|
||||
return RunExpressionC( sValue );
|
||||
}
|
||||
|
||||
LuaReference ThemeManager::GetMetricR( const RString &sClassName, const RString &sValueName )
|
||||
{
|
||||
RString sValue = GetMetricRaw( g_pLoadedThemeData->iniMetrics, sClassName, sValueName );
|
||||
|
||||
LuaHelpers::PrepareExpression( sValue );
|
||||
|
||||
LuaReference ref;
|
||||
ref.SetFromExpression( sValue );
|
||||
return ref;
|
||||
}
|
||||
|
||||
#if !defined(SMPACKAGE)
|
||||
apActorCommands ThemeManager::GetMetricA( const RString &sClassName, const RString &sValueName )
|
||||
{
|
||||
|
||||
@@ -75,6 +75,7 @@ public:
|
||||
float GetMetricF( const RString &sClassName, const RString &sValueName );
|
||||
bool GetMetricB( const RString &sClassName, const RString &sValueName );
|
||||
RageColor GetMetricC( const RString &sClassName, const RString &sValueName );
|
||||
LuaReference GetMetricR( const RString &sClassName, const RString &sValueName );
|
||||
#if !defined(SMPACKAGE)
|
||||
apActorCommands GetMetricA( const RString &sClassName, const RString &sValueName );
|
||||
#endif
|
||||
@@ -84,6 +85,7 @@ public:
|
||||
void GetMetric( const RString &sClassName, const RString &sValueName, float &valueOut ) { valueOut = GetMetricF( sClassName, sValueName ); }
|
||||
void GetMetric( const RString &sClassName, const RString &sValueName, bool &valueOut ) { valueOut = GetMetricB( sClassName, sValueName ); }
|
||||
void GetMetric( const RString &sClassName, const RString &sValueName, RageColor &valueOut ) { valueOut = GetMetricC( sClassName, sValueName ); }
|
||||
void GetMetric( const RString &sClassName, const RString &sValueName, LuaReference &valueOut ) { valueOut = GetMetricR( sClassName, sValueName ); }
|
||||
#if !defined(SMPACKAGE)
|
||||
void GetMetric( const RString &sClassName, const RString &sValueName, apActorCommands &valueOut );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user