NSClient: add `void SetInfoKeyFloat(string, float)` and `float GetInfoKeyFloat(string)` methods
This commit is contained in:
parent
4a8f4a6082
commit
08cac51d5f
|
@ -71,6 +71,11 @@ public:
|
||||||
/** Get the string value of an InfoKey. */
|
/** Get the string value of an InfoKey. */
|
||||||
nonvirtual string GetInfoKey(string);
|
nonvirtual string GetInfoKey(string);
|
||||||
|
|
||||||
|
/** Floating point based version of SetInfoKey(). */
|
||||||
|
nonvirtual void SetInfoKeyFloat(string, float);
|
||||||
|
/** Floating point based version of GetInfoKey(). */
|
||||||
|
nonvirtual float GetInfoKeyFloat(string);
|
||||||
|
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
|
|
|
@ -75,6 +75,18 @@ NSClient::GetInfoKey(string strKey)
|
||||||
return infokey(this, strKey);
|
return infokey(this, strKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NSClient::SetInfoKeyFloat(string strKey, float floatValue)
|
||||||
|
{
|
||||||
|
forceinfokey(this, strKey, ftos(floatValue));
|
||||||
|
}
|
||||||
|
|
||||||
|
float
|
||||||
|
NSClient::GetInfoKeyFloat(string strKey)
|
||||||
|
{
|
||||||
|
return infokeyf(this, strKey);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue