Added AutoScale=2 and "k" postfix to Meter=STRING.

----
For instance:
A=2800000000, B=0

- AutoScale=0
AutoScale is disabled. Uses Scale value. (Same as before.)
A="2800000000", B="0"

- AutoScale=1
Scales value by 1024. (Same as before.)
A="2.6 G", B="0.0 "

- AutoScale=2
Scales value by 1000.
A="2.8 G", B="0.0 "

- AutoScale=1k
Scales value by 1024, and uses kilo as the lowest unit.
A="2.6 G", B="0.0 k"

- AutoScale=2k
Scales value by 1000, and uses kilo as the lowest unit.
A="2.8 G", B="0.0 k"
----
This commit is contained in:
spx
2011-01-19 15:31:45 +00:00
parent 837488871b
commit 235841e01f
24 changed files with 97 additions and 44 deletions

View File

@ -1,6 +1,6 @@
/*
** Lua binding: measure
** Generated automatically by tolua++-1.0.92 on 11/23/10 00:33:48.
** Generated automatically by tolua++-1.0.92 on 01/19/11 04:59:42.
*/
#ifndef __cplusplus
@ -451,7 +451,7 @@ static int tolua_measure_CMeasure_GetStringValue00(lua_State* tolua_S)
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CMeasure",0,&tolua_err) ||
!tolua_isboolean(tolua_S,2,1,&tolua_err) ||
!tolua_isnumber(tolua_S,2,1,&tolua_err) ||
!tolua_isnumber(tolua_S,3,1,&tolua_err) ||
!tolua_isnumber(tolua_S,4,1,&tolua_err) ||
!tolua_isboolean(tolua_S,5,1,&tolua_err) ||
@ -462,7 +462,7 @@ static int tolua_measure_CMeasure_GetStringValue00(lua_State* tolua_S)
#endif
{
CMeasure* self = (CMeasure*) tolua_tousertype(tolua_S,1,0);
bool autoScale = ((bool) tolua_toboolean(tolua_S,2,false));
AUTOSCALE autoScale = ((AUTOSCALE) (int) tolua_tonumber(tolua_S,2,0));
double scale = ((double) tolua_tonumber(tolua_S,3,1.0));
int decimals = ((int) tolua_tonumber(tolua_S,4,0));
bool percentual = ((bool) tolua_toboolean(tolua_S,5,false));

View File

@ -1,6 +1,6 @@
/*
** Lua binding: measure
** Generated automatically by tolua++-1.0.92 on 11/23/10 00:33:48.
** Generated automatically by tolua++-1.0.92 on 01/19/11 04:59:42.
*/
/* Exported function */