Screen mode issue
deletro

Hello,

first of all, thank you for providing this plateform. It's really easy to use, adapt existing projects for our purpose.

I have an hidden object game project, almost everything works fine, but I have still an issue. I didn't find my answer in existing thread, sorry if there is already one.

Based on Hidden Cats game example:

if I export project for Windows app, it creates an .exe. Everything is launched correctly, however, I'm not able to close correctly the app. I need to do Ctrl+Alt+Suppr to kill the window.

I've tried to used "setFullScreen" (set to false) as below, it doesn't work

App = function()
{
    this.onClick = function()
    {
        wade.setFullScreen(false);
    };
    // this is where the WADE app is initialized
	this.init = function()
	{
        // load a scene
        		wade.loadScene('scene1.wsc', true, function()
	    {
            // the scene has been loaded, do something here

        });

	};
};

I've also tried to insert function in hidden.js without effect.

My questions:

1) Do I miss something?

2) Is it possible to configure application to be in window mode (to be able to have icons on top right of window to reduce or close it)?

3) Else how can I close the app on an event (like when user press on escape button of keyboard)?

Thank you very much in advance for your support.

All 2 Comments
Gio

Hi

To create a Windows application, WADE uses nw.js. As such, you can use all the nw.js options and functions to manage your game window.

In particular you want to edit the package.json file that is in the same folder as your exe file. See here for all the options regarding full screen, window size etc.

If you want to manage the window object through javascript (e.g. if you have a button to minimize, exit full screen etc) there is an explanation here.

However be aware that these functions will only work in the context of exported desktop apps (windows, linux and mac). They will not exist when the game is run in a browser or as a mobile app.

deletro

Hello Gio,

thank you very much for your quick feedback!

As I've didn't call nw.js in project, I've started to change package.jason as below and it works perfectly!:)

{"name":"Hidden object test","main":"app/index.html","icon":"app/icon.png","window":{"fullscreen":false,"width": 1024,"height": 768}}

I will check the nw.js solution.

Thank you again for for your support :)

Post a reply
Add Attachment
Submit Reply
Login to Reply