Module BackHandler

Component with event on back and backspace button.

# Overview #

Back Handler is recommended to put in every game window to close it or in main screen to call settings window.

# Notes #

• Back Handler inheritance BaseComponent, you can use all of its methods in addition to those described here.

• Back Handler react on release action ACTION_BACK or ACTION_BACKSPACE

Usage:

    local callback = function(self, params) ... end
    
    local params = {}
    local back_handler = self.druid:new_back_handler(callback, [params])
    

Fields

on_back The DruidEvent Event on back handler action.
params Custom args to pass in the callback


Fields

on_back
The DruidEvent Event on back handler action.

Trigger on input action ACTION_BACK or ACTION_BACKSPACE

Usage:

    -- Subscribe additional callbacks:
    back_handler.on_back:subscribe(callback)
params
Custom args to pass in the callback
  • params any (optional)

Usage:

    -- Replace params on runtime:
    back_handler.params = { ... }
generated by LDoc TESTING Last updated 2015-01-01 12:00:00