1
0
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:
Wojbie 2021-01-07 22:41:04 +01:00 committed by GitHub
parent 41226371f3
commit b2e5401486
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -667,8 +667,8 @@ while bRunning do
end
end
elseif param == keys.enter then
-- Enter
elseif param == keys.enter or param == keys.numPadEnter then
-- Enter/Numpad Enter
if not bMenu and not bReadOnly then
-- Newline
local sLine = tLines[y]

View File

@ -350,7 +350,7 @@ local function accessMenu()
selection = #mChoices
end
elseif key == keys.enter then
elseif key == keys.enter or key == keys.numPadEnter then
-- Select an option
return menu_choices[mChoices[selection]]()
elseif key == keys.leftCtrl or keys == keys.rightCtrl then

View File

@ -199,8 +199,8 @@ while true do
drawMenu()
drawFrontend()
end
elseif key == keys.enter then
-- Enter
elseif key == keys.enter or key == keys.numPadEnter then
-- Enter/Numpad Enter
break
end
end

View File

@ -546,7 +546,7 @@ local function playGame()
msgBox("Game Over!")
while true do
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
end
end
@ -627,7 +627,7 @@ local function runMenu()
elseif key == keys.down or key == keys.s then
selected = selected % 2 + 1
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!
end
end