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

This commit is contained in:
Bertrand Songis
2016-06-07 20:35:17 +02:00
parent 3940716b5d
commit 5822cfded1
9 changed files with 50 additions and 36 deletions
+10
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++;