Fix ROT encoder nav for wizards (#4105)
This commit is contained in:
@@ -36,10 +36,10 @@ end
|
|||||||
|
|
||||||
local function fieldIncDec(event, value, max, force)
|
local function fieldIncDec(event, value, max, force)
|
||||||
if edit or force==true then
|
if edit or force==true then
|
||||||
if event == EVT_PLUS_BREAK then
|
if event == EVT_PLUS_BREAK or event == EVT_ROT_LEFT then
|
||||||
value = (value + max)
|
value = (value + max)
|
||||||
dirty = true
|
dirty = true
|
||||||
elseif event == EVT_MINUS_BREAK then
|
elseif event == EVT_MINUS_BREAK or event == EVT_ROT_RIGHT then
|
||||||
value = (value + max + 2)
|
value = (value + max + 2)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
@@ -50,12 +50,12 @@ end
|
|||||||
|
|
||||||
local function valueIncDec(event, value, min, max)
|
local function valueIncDec(event, value, min, max)
|
||||||
if edit then
|
if edit then
|
||||||
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then
|
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT or event == EVT_ROT_RIGHT then
|
||||||
if value < max then
|
if value < max then
|
||||||
value = (value + 1)
|
value = (value + 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then
|
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT or event == EVT_ROT_LEFT then
|
||||||
if value > min then
|
if value > min then
|
||||||
value = (value - 1)
|
value = (value - 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
|
|||||||
@@ -34,10 +34,10 @@ end
|
|||||||
|
|
||||||
local function fieldIncDec(event, value, max, force)
|
local function fieldIncDec(event, value, max, force)
|
||||||
if edit or force==true then
|
if edit or force==true then
|
||||||
if event == EVT_PLUS_BREAK then
|
if event == EVT_PLUS_BREAK or event == EVT_ROT_LEFT then
|
||||||
value = (value + max)
|
value = (value + max)
|
||||||
dirty = true
|
dirty = true
|
||||||
elseif event == EVT_MINUS_BREAK then
|
elseif event == EVT_MINUS_BREAK or event == EVT_ROT_RIGHT then
|
||||||
value = (value + max + 2)
|
value = (value + max + 2)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
@@ -48,12 +48,12 @@ end
|
|||||||
|
|
||||||
local function valueIncDec(event, value, min, max)
|
local function valueIncDec(event, value, min, max)
|
||||||
if edit then
|
if edit then
|
||||||
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then
|
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT or event == EVT_ROT_RIGHT then
|
||||||
if value < max then
|
if value < max then
|
||||||
value = (value + 1)
|
value = (value + 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then
|
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT or event == EVT_ROT_LEFT then
|
||||||
if value > min then
|
if value > min then
|
||||||
value = (value - 1)
|
value = (value - 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ end
|
|||||||
|
|
||||||
local function fieldIncDec(event, value, max, force)
|
local function fieldIncDec(event, value, max, force)
|
||||||
if edit or force==true then
|
if edit or force==true then
|
||||||
if event == EVT_PLUS_BREAK then
|
if event == EVT_PLUS_BREAK or event == EVT_ROT_LEFT then
|
||||||
value = (value + max)
|
value = (value + max)
|
||||||
dirty = true
|
dirty = true
|
||||||
elseif event == EVT_MINUS_BREAK then
|
elseif event == EVT_MINUS_BREAK or event == EVT_ROT_RIGHT then
|
||||||
value = (value + max + 2)
|
value = (value + max + 2)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
@@ -60,12 +60,12 @@ end
|
|||||||
|
|
||||||
local function valueIncDec(event, value, min, max)
|
local function valueIncDec(event, value, min, max)
|
||||||
if edit then
|
if edit then
|
||||||
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then
|
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT or event == EVT_ROT_RIGHT then
|
||||||
if value < max then
|
if value < max then
|
||||||
value = (value + 1)
|
value = (value + 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then
|
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT or event == EVT_ROT_LEFT then
|
||||||
if value > min then
|
if value > min then
|
||||||
value = (value - 1)
|
value = (value - 1)
|
||||||
dirty = true
|
dirty = true
|
||||||
|
|||||||
@@ -10,10 +10,10 @@ local MODELTYPE_QUAD = 3
|
|||||||
|
|
||||||
-- Common functions
|
-- Common functions
|
||||||
local function fieldIncDec(event, value, max)
|
local function fieldIncDec(event, value, max)
|
||||||
if event == EVT_PLUS_BREAK then
|
if event == EVT_PLUS_BREAK or event == EVT_ROT_LEFT then
|
||||||
value = (value + max)
|
value = (value + max)
|
||||||
dirty = true
|
dirty = true
|
||||||
elseif event == EVT_MINUS_BREAK then
|
elseif event == EVT_MINUS_BREAK or event == EVT_ROT_RIGHT then
|
||||||
value = (value + max + 2)
|
value = (value + max + 2)
|
||||||
dirty = true
|
dirty = true
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user