Skip to content

Components

FocusRing

Draws a ring round the control the keys or a pad have moved to on this canvas, and round the lit row of an open list, so a player with no mouse can see where they are. Any pointer press hides it until the next key. Goes on a Canvas.

On this page

Add it

Add component → FocusRingComponent in the Inspector, on the node that should carry it.

From a script

A script on the same node writes these fields by name. FocusRingComponent is the name to pass.

rgs
set_colour("FocusRingComponent", "color", vec4(1.0, 1.0, 1.0, 1.0));
set_number("FocusRingComponent", "width", 2.0);
set_number("FocusRingComponent", "outset", 2.0);

Fields

FieldScript nameKindDefaultWhat it does
Colorcolorcolour#ffffffThe ring's colour.
Widthwidthnumber, at least 0, step 0.52How thick the ring is.
Outsetoutsetnumber, step 0.52How far outside the control the ring sits.