Lua virtual replace (#7337)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user