Skip to main content

Toolbars

Add a toolbar to your game to provide quick access to common actions in a concise format.

Toolbar {
VolumeToggle
FlatButton(LeaderboardPage) {
Icon("fa-solid fa-trophy")
" Leaderboard"
}
}
ToolbarRight {
LoginToggle
}

Parts of the toolbar

You can place content in your toolbar using one of the following three functions:

  • Toolbar - places content on the left side of the toolbar. This is where your most common actions should go.
  • ToolbarRight - places content on the right side of the toolbar. Emphasise your most important actions here.
  • ToolbarBack - this is a special place on the toolbar that normally contains the back button. By default, Easel will automatically display a button to return to the homepage here, but if you want to override this behavior, you can place your own content here instead.

See Toolbar for a full list of parameters for these functions.

Built-in toolbar elements

There are a number of built-in UI elements that you can add to your toolbar with a single line.

These toggles are designed to be used outside a game (for example, on the homepage) as they may force a player to leave their current game:

  • LoginToggle - lets players sign up, login, and manage their account.
  • PartyToggle - for inviting friends to play together.
  • RoamingToggle - choose which multiplayer regions to play in.

These toggles are designed to be used in-game:

These toggles can be used either in-game or on the homepage: