If you’re using CocoonIO, you can switch to this Tutorial. But you also can use the additional plugin Cordova Dialog by Cranberrygame.
[creativ_button url=”https://shatter-box.com/knowledgebase/cocoonio-make-a-on-exit-message-in-construct-2/” icon=”book” label=”CocoonIO – Make an on exit message in Construct 2″ colour=”blue” colour_custom=”” size=”medium” edge=”straight” target=”_blank”]
Install the plugin
For this tutorial you need the Cordova Dialog plugin by Cranberrygame. You get them in the scirra store.
Download the package and drag & drop the
file into Construct 2.
Then restart Construct 2.
Then start coding the dialog function. An easy example is shown below.
The result will look like that then.
Demo (Android file)
You can try the demo android application file to see it in action. Just download it here.
Moreover you can download the capx example over here. But remember to install the plugins “CocoonCanvas+” & “CordovaDialogs” first.
Additionally you can use the CocoonCanvasPlus plugin to make an exit dialog.
File is for learning purposes only!
For this example you must also install the core plugin “Dialogs” in CocoonIO and Intel XDK.
Go to cocoon.io and select your project. Then click on the “Plugin” tab and select “Core“.
Find “Dialogs” and click install. Don’t forget to save your settings then.
If you use Intel XDK there are no further steps required. In this case the plugin is included in the config.xml file.