-
Notifications
You must be signed in to change notification settings - Fork 1
2. Examples
Jere edited this page Sep 6, 2025
·
3 revisions
Here are some examples on how to trigger some specific actions inside the Pogly instance. This assumes all the code is inside of a command's execute method.
For full set of StDBHelper methods, check out StDBHelper.
// Sets the active layout to be "Runescape".
const stdb: StDBHelper = new StDBHelper();
stdb.SetLayoutActiveByName("Runescape");const stdb: StDBHelper = new StDBHelper();
const layout: Layouts = stdb.GetActiveLayout();
stdb.SpawnText("Hello World!", layout);// 1 Is the Elements ID on the canvas.
const stdb: StDBHelper = new StDBHelper();
stdb.EditTextByID(1, "Bye World!");// Spawns the image with ElementData ID 1.
const stdb: StDBHelper = new StDBHelper();
const layout: Layouts = stdb.GetActiveLayout();
stdb.SpawnImage(1, layout);// 1 Is the Elements ID on the canvas.
const stdb: StDBHelper = new StDBHelper();
stdb.EditImageByID(1, "https://i.imgur.com/zEiKtsL.png");// Spawns the widget with ElementData ID 1.
const stdb: StDBHelper = new StDBHelper();
const layout: Layouts = stdb.GetActiveLayout();
stdb.SpawnWidget(1, layout);// 1 Is the Elements ID on the canvas.
// Title is the variable name
// Welcome! is the new value
const stdb: StDBHelper = new StDBHelper();
stdb.EditWidgetVariable(1, "title", "Welcome!");