News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

alert dialog

Started by THLeaderH, June 11, 2020, 12:15:08 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

THLeaderH

This patch provides a gui component to show an alert. This component is intended to be used as the confirmation dialog.

Simutrans has a lot of dangerous operations, such as "sell convoy" button. Such operations should show a dialog to confirm that the player really want to do that before they are executed. The attached patch contains the alert gui component and the application to "sell convoy" button. You can define multiple items to select in the dialog with alert_dialog class. confirmation_dialog class provides an alert dialog with only "OK" and "cancel" buttons, which is typically useful for the confirmation.

Dwachs

This is a design choice *not* to bother players with such confirmation dialogs, which are most of the time ignored anyway.
Parsley, sage, rosemary, and maggikraut.

Yona-TYT

Quote from: Dwachs on June 11, 2020, 12:23:56 PMThis is a design choice *not* to bother players with such confirmation dialogs, which are most of the time ignored anyway.
Certainly . :p

Mariculous

#3
I agree with the idea in general, but I do not think a confirm dialog is the way to go.
A system to first enable those buttons and then allow these to be used until the window gets closed, might be a less annoying protection mechanism

Isaac Eiland-Hall

Just as long as there is an option to disable this...

Ters

Quote from: Freahk on June 11, 2020, 04:04:33 PM
I agree with the idea in general, but I do not think a confirm dialog is the way to go.
A system to first enable those buttons and then allow these to be used until the window might be a less annoying protection mechanism
And probably one that works better as well. People don't read these alerts, at least after a while, and probably think it is a confirmation for what the user wanted to do, not what the user actually clicked on. Having to "unsafe" the buttons might work better, and is a common method of preventing unintended triggering of anything from guns via fire alarms to phones.

The main technical challenge with such dialog boxes is also that they need to know when things taking place in the game make one or more of the options presented illegal, or the entire dialog itself meaningless. Which is why a lot of such dialogs won't let the user do anything else, but that won't work when playing against other players.

prissi

AN unsafe button could be very simple to add. One would need a third state however for the skins.

Dwachs

There is always the possibility to grey out the button to make it inactive.
Parsley, sage, rosemary, and maggikraut.

prissi

Yes, but I think the unsafe button is a button you have to deliberately click twice. Hence it should be a normal clickable button, on second click somewhat activated. If the next mouse event is not for this button (i.e. looses focus) or 5 seconds have passed the button returns to normal. If there is a second click, then the action will be done.

Having a clickable greyed out button is somewhat confusing, I think.