mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-12 03:00:30 +00:00
Added Numpad Enter Support in rom lua programs. (#657)
This commit is contained in:
parent
41226371f3
commit
b2e5401486
@ -667,8 +667,8 @@ while bRunning do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif param == keys.enter then
|
elseif param == keys.enter or param == keys.numPadEnter then
|
||||||
-- Enter
|
-- Enter/Numpad Enter
|
||||||
if not bMenu and not bReadOnly then
|
if not bMenu and not bReadOnly then
|
||||||
-- Newline
|
-- Newline
|
||||||
local sLine = tLines[y]
|
local sLine = tLines[y]
|
||||||
|
@ -350,7 +350,7 @@ local function accessMenu()
|
|||||||
selection = #mChoices
|
selection = #mChoices
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif key == keys.enter then
|
elseif key == keys.enter or key == keys.numPadEnter then
|
||||||
-- Select an option
|
-- Select an option
|
||||||
return menu_choices[mChoices[selection]]()
|
return menu_choices[mChoices[selection]]()
|
||||||
elseif key == keys.leftCtrl or keys == keys.rightCtrl then
|
elseif key == keys.leftCtrl or keys == keys.rightCtrl then
|
||||||
|
@ -199,8 +199,8 @@ while true do
|
|||||||
drawMenu()
|
drawMenu()
|
||||||
drawFrontend()
|
drawFrontend()
|
||||||
end
|
end
|
||||||
elseif key == keys.enter then
|
elseif key == keys.enter or key == keys.numPadEnter then
|
||||||
-- Enter
|
-- Enter/Numpad Enter
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -546,7 +546,7 @@ local function playGame()
|
|||||||
msgBox("Game Over!")
|
msgBox("Game Over!")
|
||||||
while true do
|
while true do
|
||||||
local _, k = os.pullEvent("key")
|
local _, k = os.pullEvent("key")
|
||||||
if k == keys.space or k == keys.enter then
|
if k == keys.space or k == keys.enter or k == keys.numPadEnter then
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -627,7 +627,7 @@ local function runMenu()
|
|||||||
elseif key == keys.down or key == keys.s then
|
elseif key == keys.down or key == keys.s then
|
||||||
selected = selected % 2 + 1
|
selected = selected % 2 + 1
|
||||||
drawMenu()
|
drawMenu()
|
||||||
elseif key == keys.enter or key == keys.space then
|
elseif key == keys.enter or key == keys.numPadEnter or key == keys.space then
|
||||||
break --begin play!
|
break --begin play!
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user