Lua virtual replace (#7337)

This commit is contained in:
Carsten W
2020-01-27 15:10:46 +01:00
committed by 3djc
parent 3744e8e1ea
commit 23f16d039e
18 changed files with 128 additions and 143 deletions
@@ -23,9 +23,9 @@ local MODELTYPE_QUAD = 2
-- Common functions
local function fieldIncDec(event, value, max)
if event == EVT_ROT_LEFT or event == EVT_UP_BREAK then
if event == EVT_VIRTUAL_DEC or event == EVT_VIRTUAL_DEC_REPT then
value = (value + max)
elseif event == EVT_ROT_RIGHT or event == EVT_DOWN_BREAK then
elseif event == EVT_VIRTUAL_INC or event == EVT_VIRTUAL_INC_REPT then
value = (value + max + 2)
end
value = (value % (max+1))
@@ -53,7 +53,7 @@ end
local function modelTypeMenu(event)
drawModelChoiceMenu()
if event == EVT_ENTER_BREAK then
if event == EVT_VIRTUAL_ENTER then
if modelType == MODELTYPE_PLANE then
return "plane.lua"
elseif modelType == MODELTYPE_DELTA then
@@ -73,7 +73,7 @@ local function run(event)
error("Cannot be run as a model script!")
end
if event == EVT_EXIT_BREAK then
if event == EVT_VIRTUAL_EXIT then
return 2
end