Add confirmation dialogue box when leaving game page.

All things Desktop Dungeons

Add confirmation dialogue box when leaving game page.

Postby Prezombie on Sun Oct 14, 2012 7:14 pm

That "Play Desktop Dungeons – Beta!" link right above the game killed my game, as did accidentally pushing the "back" button on my mouse. It would be appreciated if confirmation for leaving the page was added.
Prezombie
 
Posts: 21
Joined: Thu Jun 02, 2011 1:40 am

Re: Add confirmation dialogue box when leaving game page.

Postby dislekcia on Mon Oct 15, 2012 11:08 am

What, like one of those Javascript popups? ... I actually have no idea how to do that, because I'd have to do it in the site and not the game. A bit too focused on Unity right now, my head is.
User avatar
dislekcia
 
Posts: 1754
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

Re: Add confirmation dialogue box when leaving game page.

Postby Prezombie on Mon Oct 15, 2012 5:17 pm

Exactly. It's a very simple piece of javascript, you can find an example how to do it here.

http://www.openjs.com/scripts/events/ex ... mation.php
Prezombie
 
Posts: 21
Joined: Thu Jun 02, 2011 1:40 am

Re: Add confirmation dialogue box when leaving game page.

Postby squirrelnest on Fri Oct 19, 2012 3:16 am

I don't have much to add, except that those back buttons on the mouse are terrible. I also hate the keyboards with a little power switch between the arrow keys and delete button. (I had to pull the darn thing off.)
User avatar
squirrelnest
 
Posts: 76
Joined: Fri Jun 08, 2012 7:34 am

Re: Add confirmation dialogue box when leaving game page.

Postby dislekcia on Fri Oct 19, 2012 4:33 pm

Thaaaaaat should be working now. I hope.

Different browsers do different things to the message you try to display. Hope it's not too angry-sounding. (I hate JS, just so you know)
User avatar
dislekcia
 
Posts: 1754
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

Re: Add confirmation dialogue box when leaving game page.

Postby Prezombie on Wed Oct 24, 2012 11:01 pm

Thank you for climbing out of your comfort zone for us, it works perfectly. We thank you for saving our hardware from a rage-induced beating. :)
Prezombie
 
Posts: 21
Joined: Thu Jun 02, 2011 1:40 am

Re: Add confirmation dialogue box when leaving game page.

Postby harfatum on Wed Oct 24, 2012 11:32 pm

Yes, this is fantastic. Thanks!
Have a mug of tea.
User avatar
harfatum
 
Posts: 159
Joined: Thu Nov 10, 2011 3:04 am

Re: Add confirmation dialogue box when leaving game page.

Postby The Avatar on Thu Oct 25, 2012 2:06 am

Thank you! You just saved my VGT run, and no doubt many more runs in the future. You guys are awesome.
JakshdfFiha$#jaigb532i97fbnPKASN*@)sdjbau9a0)f+,Ahghs*hr)sk_sabdh^ujsbUA3{mvio/~dgffdsT^klndf,#ikon%(d

I speak chaos.
User avatar
The Avatar
 
Posts: 4453
Joined: Mon Sep 12, 2011 8:52 pm
Location: Demonic Library

Re: Add confirmation dialogue box when leaving game page.

Postby dislekcia on Thu Oct 25, 2012 12:03 pm

Awesome, glad it works :)
User avatar
dislekcia
 
Posts: 1754
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

Re: Add confirmation dialogue box when leaving game page.

Postby effullbao on Wed Nov 07, 2012 10:55 pm

It seems that the confirmation box isn't appearing for me anymore. I tested it in Google Chrome and Safari. It might've been due that incident where the game was rolled back to a previous version.
effullbao
 
Posts: 8
Joined: Wed Nov 07, 2012 10:44 pm

Next

Return to Desktop Dungeons

Who is online

Users browsing this forum: Astral, Bing [Bot], Google [Bot] and 7 guests