Jump to content



Photo
- - - - -

PinballY - Exit Table (Are You Sure ?)

pinbally exit button back button

  • Please log in to reply
17 replies to this topic

#1 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 10 April 2023 - 06:02 AM

For our family, PinballY is working-out great.

 

Just one thing so far ... it the heat of play ... we have had family-members reach down to press the Launch-Ball button and they accidentally press the Exit button instead. The table and game in progress immediately ends, and PinballY returns back to the Table Selection Wheel.

 

I've tried making it Exit and then Back, but the effect on the Table is basically the same (it ends abruptly). 

 

I was wondering if there is a way to add a Prompt or Confirmation like (Are you sure ?). Then some button to instead continue game, and then another to really exit. Anything along those lines would be fine.

 

Not sure about others, but I only have one Button to dedicate to Exit/Back.  Maybe it could work like this:
a. If a Table is running, it should act like Exit-Button (ie, Exit Table/Game with Confirmation)
b. If just on the Table Selection Wheel, maybe it could act like Back-Button .

 

I'm only mentioning it in case it could all be rolled into one solution.

 

The Back-Button has proven to be a handy way to Shut-Down Windows Properly/Cleanly and have the computer turn-off completely (then, I just press the master power-switch on my power-strip to shut-off everything else).


Edited by Tesla, 10 April 2023 - 04:25 PM.


#2 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,260 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 11 April 2023 - 04:17 AM

You might try reassigning your exit button to the "Pause Game" function.  I'm not sure the UI is what you're looking for, but functionally it should be pretty close - it brings PinballY to the foreground and shows a menu with options to resume or exit the game.  If that's in the right ballpark, you can pretty easily customize that menu (like any other) with Javascript.  There are examples in the help files showing how to create your own menus (see the Javascript > Worked Examples section).



#3 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 12 April 2023 - 01:57 AM

You might try reassigning your exit button to the "Pause Game" function.  I'm not sure the UI is what you're looking for, but functionally it should be pretty close - it brings PinballY to the foreground and shows a menu with options to resume or exit the game.  If that's in the right ballpark, you can pretty easily customize that menu (like any other) with Javascript.  There are examples in the help files showing how to create your own menus (see the Javascript > Worked Examples section).

 

Thanks for the reply.

 

So, how exactly is the Pause button suppose to work? I don't see a description here:

 

http://mjrnet.org/pi...tonOptions.html

 

Regardless, I did try to use it. A menu does indeed appear. The top (pre highlighted) option is "Resume Game", but when I press the "Select/Enter" button the game terminates anyway and I am returned to the Table Selection Wheel.


Edited by Tesla, 12 April 2023 - 03:48 AM.


#4 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 12 April 2023 - 03:47 AM

You might try reassigning your exit button to the "Pause Game" function. 

 

Correction.

 

Yes, the "Pause Game" command/button seems to work perfectly, thanks.

 

Your PinballY is fine. The problem was on my end. The fix was to remove the Back-Button's assignment to Exit-Game (Q) in VPX/Prefs/Keys. Interesting they call it "Exit Game" because it is more like Pause (because you can resume).

 

Additionally, I can also assign my Back-Button to existing Cancel/Escape (ESC) in PinballY. This doesn't interfere with the above because they "operate in different contexts" as the documentation states. PinballY gives you a little warning during that assignment, but you should still do it. 

 

I say it "works perfectly" because I now have one-button that Prompts user, Pauses/Resumes/Exits Game ... and still shuts-down PinballY and Windows-10 when used from the Table Selection Wheel.


Edited by Tesla, 12 April 2023 - 06:12 AM.


#5 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 14 April 2023 - 12:13 AM

If that's in the right ballpark, you can pretty easily customize that menu (like any other) with Javascript.  There are examples in the help files showing how to create your own menus (see the Javascript > Worked Examples section).

 

So, I can remove these

- Exit PinballY

- Power Off

 

From the Pause menu with JavaScript?

 

Why? Because I would rather those are only presented on the Cancel/Escape menu when the Back-Button is pressed while the Table-Selection-Wheel is being browsed.



#6 mjr

mjr

    Pinball Wizard

  • Members
  • PipPipPipPipPip
  • 3,260 posts

  • Flag: United States of America

  • Favorite Pinball: Medieval Madness

Posted 14 April 2023 - 12:24 AM

> So, I can remove these [...] from the Pause menu with JavaScript?
 
Yes - see:
 
 
Look for To delete an item in a system menu: [...]


#7 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 14 April 2023 - 03:44 AM

Great, thanks for that doc-resource.

So, I wrote these and the new Pause-Menu seems to work for me:

 

main.js

---------

import "PauseMod.js"

 

 

PauseMod.js

-----------------

mainWindow.on("menuopen", ev => {
    if (ev.id == "pause game") {
        ev.deleteMenuItem(command.Quit);
        ev.deleteMenuItem(command.PowerOff);
        ev.tidyMenu();
    }
});

Edited by Tesla, 09 November 2023 - 05:54 PM.


#8 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 24 November 2023 - 04:11 AM

I had this working before, but now that I've converted this ALP to just Windows/Pinscape/VPX ... it's not executing my code or bring-up the menu any more.

 

AFAIK, none of my PinballY stuff changed.

 

I'm guessing I picked the wrong key for something in Pinscape key-define? Man, you forget a lot in 6-months (it's really kinda sad). 


Edited by Tesla, 24 November 2023 - 04:12 AM.


#9 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 24 November 2023 - 06:32 PM

It looks like before, I was using the ESC-key for both Exit/Quit buttons in PinballY.

 

So, I tried using the ESC-keyboard-key in Pinscape key-config for my cabinet's single Pause/Exit/Back/Quit button.

 

But the Table in play will just exit-completely. To even get the Pause Menu to appear, I have to use Q-key now.

 

But for some reason, when on that Pause menu, PinballY decides to go-ahead and exit VPX completely anyway. I'll keep trying.


Edited by Tesla, 24 November 2023 - 06:36 PM.


#10 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 24 November 2023 - 07:10 PM

I'm looking here:

http://mjrnet.org/pi...php?sid=buttons

 

While the other buttons seem to work fine assigned as Keyboard-keys (I think because they are needed in VPX) ...

 

maybe my cabinet's single multi-function Pause/Exit/Back/Quit button ... should only be detected by PinballY?

 

Is that when you shift to using Joystick-buttons? I'll try it now.


Edited by Tesla, 25 November 2023 - 02:15 AM.


#11 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 25 November 2023 - 12:47 AM

OK, this is what I did and it seems to work.

 

In Pinscape-config, I could not get my buttons to detect as Joystick buttons (only as Keyboard keys). So, I picked a key that is not being used by VPX to be my Pause-Menu key.

- I assigned the P-key to the cabinet's Pause/Exit/Back/Quit button.

-  -   I can now again get my custom Pause-Menu while still playing the Table.

 

In PinballY / Options / Buttons

- Set both Pause-Game and Cancel-Escape to the P-key

-  -  Acknowledge the warning but Assign them both as the same key/button anyway

-  -  I think this works because they "operate in different contexts" as docs state.

- Set Exit-Game to Nothing (an empty field)

 

This works for me to have a single button to do all those functions, whether you are in a VPX-Table or PinballY. And you don't have to worry about a family member accidentally pressing the Back-Button (while reaching for the  Launch button) and abruptly ending your multi-player game. 

 

Hopefully this helps someone later.


Edited by Tesla, 25 November 2023 - 02:14 AM.


#12 Cadorna

Cadorna

    Enthusiast

  • Members
  • PipPipPip
  • 134 posts

  • Flag: Argentina

  • Favorite Pinball: Too many to choose ...

Posted 29 November 2023 - 06:21 PM

OK, this is what I did and it seems to work.

 

In Pinscape-config, I could not get my buttons to detect as Joystick buttons (only as Keyboard keys). So, I picked a key that is not being used by VPX to be my Pause-Menu key.

- I assigned the P-key to the cabinet's Pause/Exit/Back/Quit button.

-  -   I can now again get my custom Pause-Menu while still playing the Table.

 

In PinballY / Options / Buttons

- Set both Pause-Game and Cancel-Escape to the P-key

-  -  Acknowledge the warning but Assign them both as the same key/button anyway

-  -  I think this works because they "operate in different contexts" as docs state.

- Set Exit-Game to Nothing (an empty field)

 

This works for me to have a single button to do all those functions, whether you are in a VPX-Table or PinballY. And you don't have to worry about a family member accidentally pressing the Back-Button (while reaching for the  Launch button) and abruptly ending your multi-player game. 

 

Hopefully this helps someone later.

Do you have a Pinscape KL25Z board installed in your cabinet and a NIGHT/SHIFT button on it?



#13 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 29 November 2023 - 06:58 PM

Do you have a Pinscape KL25Z board installed in your cabinet and a NIGHT/SHIFT button on it?

 

 

Yes, I have a Standalone Pinscaped KL25z installed.

 

No NIGHT-SHIFT button. Haven't even heard of it but I will try to look it up.

 

Edit:

 

Found it: http://mjrnet.org/pi...p?sid=nightmode

 

No, nothing like that for me. AFAIK, the only noise-maker I have inside my cabinet currently are the speakers hooked-up to my sound-card.


Edited by Tesla, 29 November 2023 - 07:03 PM.


#14 Cadorna

Cadorna

    Enthusiast

  • Members
  • PipPipPip
  • 134 posts

  • Flag: Argentina

  • Favorite Pinball: Too many to choose ...

Posted 29 November 2023 - 08:25 PM

Well, you can use it for extra functionalities even if you don't have anything to mute. With that button, you can easily duplicate the total of functions of buttons in the cabinet.
 
So your proposed solution works, that for sure but it is not the ideal in my opinion. When you press the EXIT button while playing VPX you are not REALLY pausing the game. You're just pausing the process to return to PinballY but the table still running in the background. So if a ball was in play would be lost for sure. The NIGHT/SHIFT button allows you to keep it pressed while pressing a different button and assign to that process a different action.
 
For example, my current setup is:
 
- VPX (10.8 Beta 5) config has the P key assigned to PAUSE and the Q for EXIT the game. I also disabled the ESC key but that is not really necessary.
 
- Pinsacape KL25Z config has assigned to the NIGHT/SHIFT button plus the EXIT button to the Q key and the P key to the EXIT button.
 
- PinballY:
 
Pause Game: Empty
 
Cancel/Escape: P
 
Cancel/Escape: Esc
 
Exit game: Q
 
So in that way, while you're playing in VPX if you press ONLY the EXIT button, the game pauses and resumes if you press the EXIT button again.If you press and hold the NIGHT/SHIFT button and then the EXIT button, the game will be terminated and returned to the frontend (PinballY)
 
Once in PinballY, the EXIT button will work as usual, I mean you don't have to combine it with the NIGHT/SHIFT button to exit or escape and return to the previous option if you want that.
 
 
 


#15 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 30 November 2023 - 07:01 PM

I kinda like the way my Multi-Function Exit-buttons works now. Yes, the ball is in play ... but it gets accidentally pressed while waiting to be Launched . The Resume game option works fine.

 

However, the Shift-Button looks like it could be handy. Seems like you could "hide it" and then make the Shifted-Actions secret/admin functions?



#16 Cadorna

Cadorna

    Enthusiast

  • Members
  • PipPipPip
  • 134 posts

  • Flag: Argentina

  • Favorite Pinball: Too many to choose ...

Posted 30 November 2023 - 09:22 PM

I kinda like the way my Multi-Function Exit-buttons works now. Yes, the ball is in play ... but it gets accidentally pressed while waiting to be Launched . The Resume game option works fine.

 

However, the Shift-Button looks like it could be handy. Seems like you could "hide it" and then make the Shifted-Actions secret/admin functions?

You can find ten buttons on the sides and front of a "standard" cabinet. Then you have another four inside for PinMame functions. Of course, anyone can add more if they wish. But with those 14 plus SHIFT, you could double your chances. I know, you may be thinking that you will never need that many options, but believe me, each of us has been in your current position and eventually you will need them too. Basically you can assign another key to the SHIFTED buttons and also IR commands to turn some devices on/off or even activate/deactivate TV/Playfield options like 3D in my situation. If you are a PinVol user, you can manage your cabinet volume, mute it, etc. It's just an extra button that gives you a lot of flexibility.



#17 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 01 December 2023 - 01:13 AM

Thanks for the advice. Good to have options.

 

Also, thanks for reminding me that I still need to install PinVol. 

The volume buttons on my mini-wireless-keyboard are easy to get to, but using the Magna-Save buttons would be cooler.



#18 Tesla

Tesla

    Pinball Fan

  • Silver Supporter
  • 816 posts
  • Location:Texas, USA

  • Flag: United States of America

  • Favorite Pinball: Star Trek - TNG

Posted 12 September 2025 - 07:30 PM

So, I finally took a closer look at the ALP's D-Pad and saw that it was simple to add those 4-buttons to my Pinscaped KL25z. Made them Volume Up/Down and a secret-PinballY Exit-to-Windows button (that only works in PinballY, NOT VPX).

 

The whole idea here is that I run tables from Pinball-Y and while we are playing multiplayer, no (newbie) player can press a button on the cabinet and accidentally end the game or something else weird (while trying to Launch-Ball, Buy-In, or whatever).

 

Still using my PauseMod.js as above.

Inside VPX key-config ... there are no Exit, Pause, or Escape keys defined

Escape is also NOT defined in Pinscape Buttons.

In PinballY, (for these kinds of core-keys) I only define:

1 = Start-Select/Enter

Y = Back-Cancel/Escape

P = Pause=Game 

 

Works great (now on a newer computer running it all).


Edited by Tesla, 12 September 2025 - 08:33 PM.






Also tagged with one or more of these keywords: pinbally, exit button, back button