# `Cauldron2D.Drafter.Client.Screens`
[🔗](https://github.com/jaman/cauldron/blob/v0.2.2/cauldron_2d_drafter/lib/cauldron_2d/drafter/client/screens.ex#L1)

The screens `Cauldron2D.Drafter.Client` draws, as functions from its state to drafter
elements: `title/1`, `lobby/1`, `settings/1`, `guide/1`, `page/2`, `world/1` and
`summary/1`.

The title, the lobby and the settings show their keys; the world shows its key hints
only when `help?` is set, as a block of lines at the bottom, and the frames a second
the world sends only when `fps?` is set. Nothing on any screen
takes focus except the lobby chat while it is being typed into.

# `guide`

```elixir
@spec guide(map()) :: term()
```

The game's guide: the entries of `guide/0` one a row, each art drawn on a surface down
the left beside its name and text, from `state.guide.offset` for `state.guide.rows`
rows.

# `guide_length`

```elixir
@spec guide_length(module()) :: non_neg_integer()
```

How many rows the game's guide runs to, headings and gaps included.

# `lobby`

```elixir
@spec lobby(map()) :: term()
```

The lobby: worlds to join, who is in the chosen one, the chat, and the keys.

# `lobby_window`

```elixir
@spec lobby_window() :: pos_integer()
```

How many worlds the lobby lists at once; the window slides to keep the selection in view.

# `page`

```elixir
@spec page(map(), atom()) :: term()
```

A page the game added, by its key: its title, what it renders, and the way back.

# `play`

```elixir
@spec play(map()) :: term()
```

The world: the world with the game's hud beside or under it, and the hints when asked.

# `player_label`

```elixir
@spec player_label(module(), term()) :: String.t()
```

How the game writes the player `id`: its `player_label/1`, else the id as text.

# `run_label`

```elixir
@spec run_label(Cauldron2D.Client.Hud.row(), keyword()) :: term()
```

A row of runs as one label, with any label options.

# `self_label`

```elixir
@spec self_label(map()) :: String.t()
```

The player's own name as the header shows it: the username, and after it in
parentheses how the game's `player_label/1` writes them when that differs.

# `settings`

```elixir
@spec settings(map()) :: term()
```

Settings: every item on its own row, the cursor on one of them, and the keys that move and change it.

# `summary`

```elixir
@spec summary(map()) :: term()
```

The summary the game gave when play ended for this player, and the way back.

# `title`

```elixir
@spec title(map()) :: term()
```

The title screen: the game's name, its tagline and the menu.

# `world_at`

```elixir
@spec world_at([map()], non_neg_integer(), non_neg_integer()) ::
  non_neg_integer() | nil
```

The index of the world drawn on screen row `y` of the lobby, or `nil` for a row that is none.

# `zoom_text`

```elixir
@spec zoom_text(number()) :: String.t()
```

A zoom as text: `2×`, `1/2×`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
