Set functions to setup sound/text from external sources

This commit is contained in:
Insality
2020-01-30 00:31:17 +03:00
parent 8eda125d72
commit 09ae21a367
3 changed files with 21 additions and 6 deletions

View File

@@ -84,6 +84,16 @@ function M.set_default_style(style)
end
function M.set_text_function(callback)
settings.get_text = callback or const.EMPTY_FUNCTION
end
function M.set_sound_function(callback)
settings.play_sound = callback or const.EMPTY_FUNCTION
end
local function input_init(self)
if not self.input_inited then
self.input_inited = true