Skip to content

Components

Scroll

A viewport onto something larger than itself — an inventory, a quest log, a tall settings page — clipped to its own box. Its content size is measured from what is laid out inside it, or typed. Follow End keeps a log on its newest line.

On this page

Add it

+ Add node → Scroll View creates a node with it already on. Already have a node for it? Add component → ScrollComponent.

From a script

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

rgs
set_point("ScrollComponent", "content", vec2(0.0, 0.0));
set_number("ScrollComponent", "wheel", 48.0);
set_flag("ScrollComponent", "drag", true);
set_flag("ScrollComponent", "follow_end", false);

Fields

FieldScript nameKindDefaultWhat it does
Contentcontenttwo numbers (x, y)(0, 0)How big the thing being looked at is, in UI units — or zero on an axis to measure it instead.
Wheelwheelnumber, at least 148How far one wheel notch scrolls.
DragdragcheckboxonWhether dragging the viewport itself pans it.
Follow Endfollow_endcheckboxoffWhile the view is scrolled to its end, new content keeps it there, until the player scrolls back.