How can I create a Quit/close button?

Get help using Construct 2

Post » Wed Apr 24, 2013 7:39 am

How can I create a Quit/close button? For example, In the main menu of my game I have QUIT button. If I clicked the QUIT button it will close the game.
B
8
Posts: 11
Reputation: 799

Post » Wed Apr 24, 2013 8:03 am

Add Browser and Mouse Objects to layout.

+ On Object Clicked (Left, Clicked, QuitButtonObject)
- Browser -> Close
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Wed Apr 24, 2013 8:21 am

@procrastinator
does this work on mobile devices if i export to cocoonJS ?
B
23
S
6
G
5
Posts: 132
Reputation: 4,487

Post » Wed Apr 24, 2013 11:15 am

Don't have experience with that sorry. Hopefully someone else with experience can help.
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Wed Apr 24, 2013 11:35 am

@philx Just tested it with my current project and it does indeed work. On Android 4.1.2, at least.
B
56
S
15
G
10
Posts: 910
Reputation: 11,942

Post » Wed Apr 24, 2013 11:42 am

It should work on CocoonJS (did you try it?) and node-webkit. On other platforms like HTML5 it doesn't always work, because web pages don't always have permission to close the browser window.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Wed Apr 24, 2013 2:02 pm

Where is this "browser" located?
B
8
Posts: 11
Reputation: 799

Post » Wed Apr 24, 2013 4:01 pm

I FIGURED IT OUT! Thanks for the reply @procrastinator :D
B
8
Posts: 11
Reputation: 799

Post » Wed Apr 24, 2013 5:11 pm

for me it goes quite slow exiting the page on mobile devices, you touch exit takes like 5 seconds to close. on laptop goes like a flash though
B
9
S
3
G
3
Posts: 25
Reputation: 2,393

Post » Wed Apr 24, 2013 6:22 pm

@c4r70, nps. Hope it works ok. I've even learned about issues using this from the replies here :)
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Next

Return to How do I....?

Who is online

Users browsing this forum: imnotspecial, tomi71, totoe, Yahoo [Bot] and 13 guests