On Ren'Py the key "K_AC_BACK" (=Android Backbutton) is mapped to rollback, as it is expected when in dialog, but it does nothing in the main menu.
My tester was expecting it to minimize/iconify the app, and I think he has a point.
My questions:
- Is renpy.iconify() the correct function for Android? Is it another one? Should it exist?
- Can it (or other function) be mapped to "K_AC_BACK" with "key" or "keysym"?
- Should my code (see below) work on Android devices (I'll try to test later).
Code: Select all
if renpy.variant("touch"):
key "K_AC_BACK" action Function(renpy.iconify)
Code: Select all
if renpy.variant("touch"):
key "K_AC_BACK" action renpy.iconify()
- Due to the prediction system, the function is actually executed before pressing anything, and it minimizes/iconifies the window.
- When windowed again, the program shows an error: "Action is required in ui.key". The action IS there (is the function) and it's being executed and asked for at the same time.