niknak68's Forum Posts

  • 5 posts
  • Well, I've got a little further. If you hack out this code from c2runtime.js

    if (this.runtime.isWinJS && WinJS["Application"])

    {

    WinJS["Application"]["onbackclick"] = function (e)

    {

    return !!self.runtime.trigger(cr.plugins_.Browser.prototype.cnds.OnBackButton, self);

    };

    }

    then you can add your own handler for onbackclick.

    However, I'd like to generate an escape key press with

    $(function() {

    var e = $.Event('keypress');

    e.which = 27; // Character 'ESC'

    $('item').trigger(e);

    });

    which I can look for in Construct2 but the key press is never getting through. If I do it in a standalone HTML file it works fine so I guess something else is conflicting with it........

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just a quick update with things I've tried.....

    This Javascript should work (thank you Google) but no luck yet, it still minimizes the app when the hardware back button is pressed. I've added a reference to Windows Mobile Extensions to the Visual studio project as well.

    <script type="text/javascript" charset="utf-8">

    var hardwareButtons = Windows.Phone.UI.Input.HardwareButtons;

    hardwareButtons.addEventListener("backpressed", function (e) {

    e.handled = true; // Notifies OS that you've handled the back button event.

    //Trigger an escape key press, I'm looking for this in Construct2 to trigger a back navigation

    var f = $.Event('keypress');

    f.which = 27; // Escape

    $('item').trigger(f);

    });

    </script>

    Then in Construct2 I have an array that I use as a stack to store all the pages I visit, when escape is pressed I pop the last page off the stack and navigate to it.

    But still no luck. Does anyone have any suggestions?

    This functionality of the back button means that no Construct2 Apps will be able to pass certification for the Windows store now which is not good.

  • Problem Description

    When exported as a Windows store project, the Hardware back button on Windows phones closes the construct2 application.

    Attach a Capx

    Simple capx

    https://www.dropbox.com/s/0n9xxb4rfz9zg40/BackButton.capx?dl=0

    Exported windows project

    https://www.dropbox.com/s/o3gwisp6vjvs0wh/BackButton.zip?dl=0

    Description of Capx

    It has two pages you can navigate between. The Hardware back button should navigate back through the page history but instead closes the app. This functionality is now a requirement for publishing to the Windows store, it's been introduced in the last few days.

    When you submit an app for certification you get the following error back after a few days

    [quote:10vkzcuf]App Policies: 10.4 Back Button

    Pressing the Back button must return the app to the previous page or return to any previous page within the back stack.

    /b]

    Steps to Reproduce Bug

      Export project for Windows store Open with visual studio Build and deploy to any mobile emulator (i.e. Mobile Emulator 10.0.10240.0 1080p 6 inch 2GB) Click the button "Page 1" to navigate to a new page Click on the Emulators Hardware Back Button

    Observed Result

    Application closes

    Expected Result

    Should navigating back to page 1

    Affected Browsers

      Windows Store Application

    Operating System and Service Pack

    Windows 10 Build 10586

    Construct 2 Version ID

    Release 227(64-bit)

  • This is my first game so please be gentle with me

    https://www.scirra.com/arcade/other-games/tiddlywinks-5346

    For anyone who didn't go to school in England in the 1960's, Tiddlywinks is a tabletop game for 4 players. You flip little plastic discs (winks) into a cup, first one to flip them all in wins.

    I've tried to make a single player game where you try to get the wink through an obstacle course and into the red cup. I've only made 6 levels so far, working on some more at the moment. There's also a multi player game where you play competitively with 4 players on the same device.

    Anyway, any feedback would be very welcome.

    Nick

  • Hello everybody!

    Really looking forward to writing some fun retro games. Although at my age they are just games

  • 5 posts