DevelopmentPlans/Dialogs

From BZFlagWiki
Jump to: navigation, search
Picture Frame.png This page contains the design document for an enhancement or feature. It is a work of collaborative development, and may not represent the final design. If you are not part of the development or design group, please post comments and suggestions on the talk page and not in the middle of the design.


Features[edit]

  • Modal dialogs
    • Keyboard, mouse, and joystick navigation
    • Takes over the controls
    • Provide the ability to have popup menus that can be navigated.
    • Use for starting polls, team selection, player stats (the 'home' key screen), and as a replacement for the 'o' menu
    • Allow the server to specify customized buttons or menu items
  • Unobtrusive dialogs
    • Keyboard, mouse, and joystick hotkeys (hotkeys default to only being on the keyboard, but could be configured on other devices)
    • Use for voting in polls and notifications
    • Allow them to be positioned on the left, center, and right
  • Server controlled and configurable
    • Replace some current forms of interaction with dialogs so that the server can improve or customize these operations.
    • Enable plugins to trigger dialogs
  • Dialog priority
    • Modal dialogs take priority, and should gray out the background. Additionally, hotkeys on any unobtrusive dialogs should be hidden when a modal dialog is shown.
  • Handle dismissing dialogs on the server (though provide a dismiss option on some dialogs). This would allow dialogs to be closed when they are no longer relevant (such as when a poll is completed/vetoed) or when a specific amount of time has passed.

Dialog Management[edit]

The server should be the manager of the dialogs. The client should just show what it was told to display, and should send which hotkey was pressed. This way, the server will know when a user has viewed/dismissed a dialog and can accurately set timeouts on dialogs that were not focused on yet (such as when multiple unobtrusive/modal dialogs were shown, or when a modal dialog obscured an unobtrusive dialog).

Protocol[edit]

This is a possible idea for how the protocol could be laid out.

Unobtrusive Dialog:

  • GUID
  • Dialog Type (set to unobtrusive)
  • Alignment (left, right, center)
  • Message

Modal Dialog with text:

  • GUID
  • Dialog Type (set to modal text)
  • Title
  • Message
  • Item Count (Number of buttons)
  • Item Labels (Item Count number of strings, labels for the buttons)

Modal Dialog with menu:

  • GUID
  • Dialog Type (set to modal menu)
  • Title
  • Message (Can be a zero length string)
  • Item Count (Number of menu rows)
  • Item Labels (Item Count number of strings, labels for the menu items)

Mockups[edit]

Unobtrusive dialog:

DevelopmentPlans Dialog Unobtrusive.png