Difference between revisions of "Megacool"
From GiderosMobile
m (Text replacement - "</source>" to "</syntaxhighlight>") |
|||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
− | |||
<!-- GIDEROSOBJ:Megacool --> | <!-- GIDEROSOBJ:Megacool --> | ||
− | ''' | + | '''Supported platforms:''' [[File:Platform android.png]][[File:Platform ios.png]]<br/> |
− | ''' | + | '''Available since:''' Gideros 2018.10<br/> |
− | ''' | + | '''Inherits from:''' [[EventDispatcher]]<br/> |
− | === | + | |
− | + | === Description === | |
'''The Megacool plugin is kind of 'preview' at the moment, since iOS isn't supported, more internal API could be exposed, etc''' | '''The Megacool plugin is kind of 'preview' at the moment, since iOS isn't supported, more internal API could be exposed, etc''' | ||
Megacool SDK plugin is available for only Andorid and iOS as an external plugin. To use Megacool module: | Megacool SDK plugin is available for only Andorid and iOS as an external plugin. To use Megacool module: | ||
− | # | + | # add the plugin to your project |
− | # | + | # go to http://megacool.co and sign up, add your game. You will need to know your app identifier and the key for Android/iOS |
− | # | + | # in the gideros Megcool plugin settings fill in the identifier and key strings |
+ | To add Megacool SDK to your application you call: | ||
+ | <syntaxhighlight lang="lua"> | ||
+ | require "Megacool" | ||
+ | </syntaxhighlight> | ||
− | + | Megacool needs OpenGL ES 3 to work, you need to check for this before you require the plugin: | |
− | + | <syntaxhighlight lang="lua"> | |
− | < | ||
-- assume you have this line to make strings nicer to use: | -- assume you have this line to make strings nicer to use: | ||
local sub,lower=string.sub,string.lower | local sub,lower=string.sub,string.lower | ||
Line 25: | Line 27: | ||
if enhancedGfx then pcall(function() Megacool=require "Megacool" end) end | if enhancedGfx then pcall(function() Megacool=require "Megacool" end) end | ||
if Megacool then print("Megacool started") else print("Megacool not started") end | if Megacool then print("Megacool started") else print("Megacool not started") end | ||
− | </ | + | </syntaxhighlight> |
+ | |||
{|- | {|- | ||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | === Methods === |
− | [[ | + | [[Megacool.startRecording]] <br/><!--GIDEROSMTD:Megacool.startRecording() --> |
− | [[ | + | [[Megacool.stopRecording]] <br/><!--GIDEROSMTD:Megacool.stopRecording() --> |
− | [[ | + | [[Megacool.share]] <br/><!--GIDEROSMTD:Megacool.share() --> |
− | [[ | + | [[Megacool.setSharingText]] <br/><!--GIEROSMTD:Megacool.setSharingText() --> |
+ | |||
| style="width: 50%; vertical-align:top;"| | | style="width: 50%; vertical-align:top;"| | ||
− | === | + | === Events === |
− | [[ | + | [[Event.RECEIVED_SHARE_OPENED]]<br/><!--GIDEROSEVT:Event.RECEIVED_SHARE_OPENED receivedShareOpened--> |
− | [[ | + | [[Event.SENT_SHARE_OPENED]]<br/><!--GIDEROSEVT:Event.SENT_SHARE_OPENED sentShareOpened--> |
− | === | + | === Constants === |
|} | |} | ||
+ | |||
+ | {{GIDEROS IMPORTANT LINKS}} |
Latest revision as of 14:30, 13 July 2023
Supported platforms:
Available since: Gideros 2018.10
Inherits from: EventDispatcher
Description
The Megacool plugin is kind of 'preview' at the moment, since iOS isn't supported, more internal API could be exposed, etc
Megacool SDK plugin is available for only Andorid and iOS as an external plugin. To use Megacool module:
- add the plugin to your project
- go to http://megacool.co and sign up, add your game. You will need to know your app identifier and the key for Android/iOS
- in the gideros Megcool plugin settings fill in the identifier and key strings
To add Megacool SDK to your application you call:
require "Megacool"
Megacool needs OpenGL ES 3 to work, you need to check for this before you require the plugin:
-- assume you have this line to make strings nicer to use:
local sub,lower=string.sub,string.lower
if lower(sub(Shader:getProperties().version,1,11))=="opengl es 3" then enhancedGfx=true end
if enhancedGfx then pcall(function() Megacool=require "Megacool" end) end
if Megacool then print("Megacool started") else print("Megacool not started") end
MethodsMegacool.startRecording |
EventsEvent.RECEIVED_SHARE_OPENED Constants |