1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-16 04:45:17 +03:00

[Horus] Options in widgets can now have a min and a max defined

This commit is contained in:
Bertrand Songis 2016-06-07 18:05:02 +02:00
parent 3940716b5d
commit 5822cfded1
9 changed files with 50 additions and 36 deletions

View file

@ -807,6 +807,16 @@ ZoneOption * createOptionsArray(int reference)
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
option->deflt.signedValue = lua_tointeger(L, -1);
break;
case 3:
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
option->min.signedValue = lua_tointeger(L, -1);
break;
case 4:
luaL_checktype(L, -2, LUA_TNUMBER); // key is number
luaL_checktype(L, -1, LUA_TNUMBER); // value is number
option->max.signedValue = lua_tointeger(L, -1);
break;
}
}
option++;