FBInstant.context.chooseAsync

From GiderosMobile
Revision as of 11:04, 23 August 2018 by Hgy29 (talk | contribs) (Created page with "__NOTOC__ '''Available since:''' Gideros 2018.3<br/> === Description === <br /> Opens a context selection dialog for the player. If the player selects an available context, th...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Available since: Gideros 2018.3

Description


Opens a context selection dialog for the player. If the player selects an available context, the client will attempt to switch into that context, and resolve if successful. Otherwise, if the player exits the menu or the client fails to switch into the new context, this function will reject.

= FBInstant.context.chooseAsync(optionscallback,)

options: (table) A table specifying conditions on the contexts that should be offered. optional
'callback: (function) A function that will be called with two arguments: true when the game has switched into the context chosen by the user. Otherwise, the promise will reject (if the user cancels out of the dialog, for example) and an error code if the function failed. '