0 Favourites

NW.js - remove right-click menu + custom icons

  • Hi,

    I'd like to remove all traces of evidence that my Construct 2 project is running in a "browser".

    I'm using NW.js (the latest version) and I want to get rid of the right click menu. (the one with these options:

    Reload app

    Simulate Browser Restart

    Inspect

    Inspect Background page)

    I also want to use custom window and file icons.

    Does someone know how to do this?

    Thanks

  • For the last part: custom icons have to be added manually at this point.

    You have to edit the "resources" of the exe-file (that's something like metadata in the header).

    There are tools to do this, for example an old and trusty tool called "Resource Hacker".

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Just change the images in the c2 project (under icons in the project menu). There you can replace the loading logo and the icons that are used for the game window. If you want to change the .exe icon then you'll need to convert one of those images to a .ico and use resource hacker to replace the one in nw.exe.

    I don't have those options you listed when using right click...??

  • Thanks, you two.

    I get the browser menu when I rightclick on the black part outside of the game's screen in NW.js (when giving the player the ability to resize the window)

  • You could always add a small javascript <script> in your main HTML index file to disable right-clicking.

    of course this doesn't really secure anything.. but it can hide the right-click context menu.

    More info.

    I did try this on one of my own test projects and it does effectively hide the right-click context menu.

  • You could always add a small javascript <script> in your main HTML index file to disable right-clicking.

    of course this doesn't really secure anything.. but it can hide the right-click context menu.

    More info.

    I did try this on one of my own test projects and it does effectively hide the right-click context menu.

    This could work, but then you'll have to repack your game manually with NW.js, since first you'll need a HTML5 export to modify the code.

  • > You could always add a small javascript <script> in your main HTML index file to disable right-clicking.

    > of course this doesn't really secure anything.. but it can hide the right-click context menu.

    >

    > More info.

    >

    > I did try this on one of my own test projects and it does effectively hide the right-click context menu.

    >

    This could work, but then you'll have to repack your game manually with NW.js, since first you'll need a HTML5 export to modify the code.

    Really its a lot of work when you could just build your game around "scale inner" or "scale outer" and that would prevent the black bars in the first place and remove the option to right click for a context menu.

  • Really its a lot of work when you could just build your game around "scale inner" or "scale outer" and that would prevent the black bars in the first place and remove the option to right click for a context menu.

    Yes, that's a way easier solution.

  • Sorry for the bump, but the solution is to use the non-dev version of NW, I believe.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)