Rolly Docs

Share one look across Rolly products

Give every installed Rolly product the same theme, or give one product a look of its own, and let players' high contrast and reduced motion reach every product's screens.

Sheet
47 of 64
Rev
1.0.0
Updated
On this sheet

Every Rolly product carries its own copy of the design system, so the products share no C++ type. They share a look in three layers, and a game with one product works the same with none of them set.

The three layers

  1. Theme Source, per product: Project Settings > Plugins > Rolly Save Core UI > Theme Source. Shared (the default) follows the shared theme; Preset uses Theme Preset; Asset uses Theme, an asset of this product’s theme class.
  2. The shared theme: section [RollyUI], key Theme in your project’s DefaultGame.ini, holding a theme asset’s path or Preset:<id> (empty: the built-in Ember). Every product reads it when it picks its theme, and cooks the asset it names.
  3. While the game runs: the console variables rolly.ui.theme (a theme asset’s path or a preset id; while set it replaces the shared theme), rolly.ui.motion (0 to 1, the motion scale; 0 is reduced motion) and rolly.ui.contrast (0 or 1). Every product follows their changes and restyles its open screens at once.

Share a theme

Create a theme and edit it with its preview (see Make a theme of your own). Right-click it and choose Use as the Rolly UI Theme for All Rolly Products: it writes one key, [RollyUI] Theme, and every installed product uses the theme at once. A project that had no DefaultGame.ini when the editor started gets one with that key.

A product that should look different sets its Theme Source to Preset or Asset.

A theme of another Rolly product’s class works too: its values are copied by token name. Tokens the other theme lacks keep Ember’s values, and tokens this product does not know are ignored.

Remove a product that owns the shared theme

A shared theme whose product (and so its class) is gone cannot load: every product falls back to Ember and reports a setup error naming the asset and the fix. While both products are installed, right-click that theme and choose Duplicate as this product’s theme, then share the copy.

Let players change the look of every product

A player’s choice (a high contrast or reduced motion setting, a theme picker) sets the console variables at the Game Override priority, which beats your project’s configuration and device profiles and loses to ConsoleVariables.ini, the command line and the console that testers use. Put a project default of your own into DefaultEngine.ini under [SystemSettings]. A Play In Editor session’s choices end with it.

Blueprint

Use the theme subsystem’s Set High Contrast and Set Reduced Motion (see Make a theme of your own), or a settings product’s own settings for them.

C++

#include "Shared/RollySaveCoreSharedChannel.h"

void UMyAccessibilityMenu::ApplyChoices(bool bHighContrast, bool bStill, const FString& ThemeId)
{
	FRollySaveCoreSharedChannel::SetHighContrast(bHighContrast);       // rolly.ui.contrast
	FRollySaveCoreSharedChannel::SetMotionScale(bStill ? 0.0f : 1.0f); // rolly.ui.motion
	FRollySaveCoreSharedChannel::SetThemeValue(ThemeId);               // rolly.ui.theme: "Preset:Paper", an asset path, or empty
}
C++

Open screens of several products

Screens of several Rolly products open and close in any order for the same player. Each product records the game’s input only when its screens are the first to open, and gives it back only when no Rolly screen of any product is open any more (a map change gives it back at once). Each product asks the engine for its own pause, so pauses coexist. Every product places its screens where its presenter says: the game viewport by default, or a panel of the game’s own (Set Host Panel, see Open screens on the screen stack).

Limits

  • Each product keeps its own screen stack: Back reaches the top screen of the product whose screen has focus, and screens of two products never merge into one stack. A game that needs one strict order of screens across products opens them from one place.