Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Confirmation box and buttons

Discussion in 'Game Design' started by Kazen, Nov 27, 2021.

  1. Kazen

    Kazen

    Joined:
    Feb 17, 2015
    Posts:
    68
    Hi,
    So I'm working on the UI in my game and I'm currently working with my confirmation dialogs/boxes and was thinking sbout how to place my buttons amd default selection. Confirmation boxes are the common 'Do you want to overwrite your save file?' yes/no.

    So checking screenshots from games while googling it seems thst most use the primary button eg 'Yes/Overwrite' to the left and 'no/cancel' eg like it's most commonly used on windows. Lots of ux sites recommend doing the other way around using cancel/save in that order like mac/ios/Android. Don't know my target plattform/s yet though but what would you do/are you doing? Support both based on plattform? Just use one? What about consoles, dont think they have a standard. Or should i just put them vertically? Googles material guidelines makes sense to me, putting the confirming action last eg cancel/overwrite, but then comes default selection in play too.

    The primary action should be what most users want to do eg overwrite, but I guess the default selected should always be put on the cancel button right? Or does this just apply for destructive actions like overwriting saves and as a different example, like buying items in a shop would have a default selection on the primary action eg 'buy' instead of cancel. Not sure if the player would be confused with the default selection being different based on what's being asked?

    Anyone has some insights?
     
  2. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    well i think the most important thing is just that you have consistency within your game and avoid confusing things like double negatives.

    If you are talking about how to position the buttons, I'd do so in a way that it is least likely to accidentally click a destructive action. That would probably mean that moving your mouse in less ergonomic way or stretching a little further would be needed for the overwrite or whatever destructive action.

    In my project I do buttons only for confirmation and they always require two presses. First press changes the button to ask "Proceed?" and second press fires whatever event. I like this because it gives some safety net but also you can get through menus fast by double clicking if you are confident in what you are doing.

    To cancel there is a universal cancel/escape key that works on everything. I do it this way just to keep UI as simple and neat as possible. I don't like games that look like airplane cockpits
     
  3. Kazen

    Kazen

    Joined:
    Feb 17, 2015
    Posts:
    68
    Yes, consistency definitely, and keeping it simple is the goal.

    Yes i'm talking about positioning of the buttons and that for eg mac/android/windows/console seems to have different standards and i'm thinking about if i should use the same standards based on platform although console does not seem to have a standard. Maybe i should just use one order and stick to it. Although I started thinking that maybe i should put them vertically instead which gives it better consistency if i have more than two options where it feels like it makes sense to have them stacked vertically for readability and such)

    I'm also talking about default selected item which's not really needed with mouse navigation but i'm also allowing for navigstion with keyboard or controller only too, but I think I've settled on setting the default to cancel/escape always (again, for consistency) like you said, to avoid miss-clicks.

    Yes, a universal cancel-button is available, I try to keep it as simple as possible too :)
     
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If you bind the save to the game slot, it designs out the need for multiple saves and designs out save scumming. If you are doing an RTS it's OK to be technical otherwise it's probably worth binding 1 game slot to 1 save slot. If people want multiple saves, they'll have to kick off a new game slot from the start.
     
    TonyLi likes this.
  5. Kazen

    Kazen

    Joined:
    Feb 17, 2015
    Posts:
    68
    Yes, that's a good suggestion about save games to be locked into one slot, if it makes sense. That was just one example though and the questions were more focused on where to put the buttons on confirmation boxes/dialogs when they're needed.

    Having thought about it a bit more, I think putting them from top to bottom
    [OVERWRITE]
    [CANCEL]
    Instead of [OVERWRITE][CANCEL] or [CANCEL][OVERWRITE]
    Skips the problem about if I need to make it dependent on which platform it's on, and it'll be more consistent If i would need multiple buttons too.

    So I think I'll try vertical positioning and default the selection to [CANCEL] when navigating with keyboard/controller.
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should consider not having confirmation boxes. If you make a mistake in a fighting game you get punched. Same for this. If you want a layer of security I suggest the hold button progress ring.

    [THING] [CANCEL] is pretty cringe and decades out of date. We can do better.
     
  7. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,004
    I sort of agree, but how can you let people start a new profile on an already existing one, or overwrite a save?

    You could have an explicit delete function and you have to manually delete something and then start a new profile, but that also adds a level of complication.
     
  8. Kazen

    Kazen

    Joined:
    Feb 17, 2015
    Posts:
    68
    Well, I'm also looking at the Xbox accessibility guidelines for dialogs and they explicitly tell us not to force players into doing hold actions or provide alternatives. When I can, I want to try and make everything as accessible as possible. Also maybe I don't play enough games anymore because I haven't really played where you use long holds to confirm an action, and that would only really play out if it's the user that performs the action. To me it sounds pretty unnatural.
    Confirmation dialogs feels inevitable anyway because they, as an example, could be put up as an indirect action caused by a saving operation that failed. Maybe not a perfect example but you need to let the user know in some way and give them a way to fix, like retry or skip or something.