Problem Description
Scenario: offer player option to upload images for customisation on platform nw.js. In the upload dialog, if the player presses Cancel then there is no way for events to detect this selection, even though nw.js offers api support (see here for v14.2 changelog - nw.js receives an On-Cancel trigger event).
Attach a Capx
capx
Description of Capx
Simple example to offer player option to upload an image to one of two sprites. If you click on one of them a global variable changes to manage the mode of the event sheet and a nw.js open dialog opens. Either select an image file and upload, via OK, or press Cancel. If you press Cancel then the global Mode variable cannot be reset because there is no event trigger for the dialog when it is closed using Cancel.
Steps to Reproduce Bug
- Click on a sprite and upload a new image by pressing OK.
- Click on a sprite and then cancel the upload / close the dialog window.
- Observe that the 'game' is now locked because the global Mode variable is incorrectly set for image upload.
Observed Result
As above.
Expected Result
The nw.js plugin requires a dialog Cancel or close trigger event, as supported by nw.js api.
Affected Browsers
- nw.js only - tested on v14.2
Operating System and Service Pack
w10 x64
Construct 2 Version ID
r229 64 bit