Skip to content

Commit

Permalink
add option to ignore the back button
Browse files Browse the repository at this point in the history
  • Loading branch information
pazos committed Jun 14, 2020
1 parent fc4982b commit b6eaf1e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions assets/android.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,7 @@ local function run(android_app_state)
-- ignore some events
android.input.ignore_touchscreen = false
android.input.ignore_volume_keys = false
android.input.ignore_back_button = false

android.getVolumeKeysIgnored = function()
return android.input.ignore_volume_keys
Expand All @@ -1523,6 +1524,14 @@ local function run(android_app_state)
android.input.ignore_volume_keys = ignored
end

android.isBackButtonIgnored = function()
return android.input.ignore_back_button
end

android.setBackButtonIgnored = function(ignored)
android.input.ignore_back_button = ignored
end

android.isTouchscreenIgnored = function()
return android.input.ignore_touchscreen
end
Expand Down

0 comments on commit b6eaf1e

Please sign in to comment.