---
# System prepended metadata

title: ElectrodZ UX/Menus Functionality
tags: [BA3, CGL, Semesterproject, ElectrodZ]

---

###### tags: `Semesterproject` `CGL` `BA3` `ElectrodZ`

# ElectrodZ UX/Menus Functionality

## Title Screen

- Proceed To [Main Menu](#Main-Menu)
    > Get ClientSynchronizer: Clients.ConnectToNetwork(...)
    > client.OnAuthentificationAcknowledged => connected to server. allow proceed to main menu.
    > set timer to tell when connection can not be established
    
##  Main Menu

- Proceed To [Play](#Play-Menu)
- Proceed To [Settings](#Settings)
- Quit

## Settings

    (nothing to see here)

## Play Menu

- Gamemode Selector to join a random lobby of that gamemode
    > client.SendListAvailableGameModesMessage(null)
    > client.OnAvailableGameModesListed => client.SendListLobbiesMessage(selected_game_mode)
    > client.OnLobbiesListed => client.JoinLobby(random_lobby)
- Buttons Beneath:
    - [Find Public Lobby](#Find-Lobby-Menu)
        > show list of lobbies
    - Connect To Private Lobby
        - enter LobbyCode
        > client.SendJoinLobbyMessage(lobbyCode, userName);
        > client.OnLobbyJoinAcknowledged => go into lobby screen
        > client.OnLobbyJoinFailed => show: joining lobby failed: reason

    - Host [New Lobby](#Create-Lobby-Menu)

### Find Lobby Menu

- Join Random
    > client.SendJoinLobbyMessage(lobbyCode, userName);
    > client.OnLobbyJoinAcknowledged => go into lobby screen
    > client.OnLobbyJoinFailed => show: joining lobby failed: reason & Refresh Lobbies
- [Create New](#Create-Lobby-Menu)
- Refresh List
    > client.SendListLobbiesMessage()
- List of Lobbies
    - Choose one to join
        > client.SendJoinLobbyMessage(lobbyCode, userName);
        > client.OnLobbyJoinAcknowledged => go into lobby screen
        > client.OnLobbyJoinFailed => show: joining lobby failed: reason & Refresh Lobbies


### Create Lobby Menu

- gamemode picker
- Some kind of settings menu depending on which game mode picked
    - lobbyName
    - [private] or public
    - minUserCount
    - maxUserCount
    - isStartingAutomatically
    // - gameMode rules
- create button
    > client.CreateAndJoinLobby(...)
    > client.OnLobbyJoinAcknowledged => go into lobby screen
    > client.OnLobbyJoinFailed => show: joining lobby failed: reason & Refresh Lobbies

### In All Menus:
> client.OnPeerDisconnected => connection to server was interrupted. (try again | quit)
> client.OnErrorMessageReceived => show info: error message received