How do I return focus to my game? [SOLVED]

0 favourites
  • 3 posts
From the Asset Store
Game "Little Dino Adventure Returns" with complete Source-Code (Construct3 / .c3p) + HTML5 Exported.
  • Quick Question: After I click on a button/checkbox how do I return focus to my game window?

    Context: I am working on a layout editor for a card game. I have a checkbox called "Pin Rotations?"

    Pin Rotations (Unchecked): When I push the left or right direction keys the cards will rotate around their image points, which are centered.

    Pin Rotations (Checked): When I push the left or right direction keys the cards rotate around a central point for all selected cards.

    Here's my problem. I select some cards, click on the checkbox, and then press the cursor keys. Nothing happens, of course, because the checkbox still has the focus. But if I click on my game window to return focus there it deselects all the selected cards.

    How do I fix this?

  • on clicked, set unfocused

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well, good grief, I didn't even think to check the button's actions.

    I've been working on this problem for over an hour. I searched the manual for "focus", as well these forums, and couldn't find anything helpful. Then I tried Deepseek and ChatGPT but they kept suggesting: "Go into System and set the focus to your UI layer". Except there IS no "focus" event under System.

    This took 2 seconds and it works! Thank you!!!!

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