Remove local variable in example

This commit is contained in:
Malin E
2021-11-30 17:22:46 +01:00
parent cc0a7b05ce
commit 8766ba1242

View File

@@ -53,10 +53,16 @@ local XBoxController = {
}
}
isPropertyBound = true;
local freezeValue = function(name, axis, min, max)
return [[
local joystickType = openspace.navigation.joystickAxis(']] .. name .. "', " .. axis .. [[);
local isPropertyBound = true;
if joystickType == "None" then
isPropertyBound = false;
else
isPropertyBound = true;
end
if isPropertyBound then
openspace.navigation.bindJoystickAxis(']] .. name .. "', " .. axis .. [[, "None");
isPropertyBound = false;