MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / x_set

Method x_set

src/openrct2-ui/scripting/ScWindow.cpp:52–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 return JS_NewInt32(ctx, 0);
51 }
52 JSValue ScWindow::x_set(JSContext* ctx, JSValue thisVal, JSValue value)
53 {
54 JS_UNPACK_INT32(valueInt, ctx, value);
55
56 auto w = GetWindow(thisVal);
57 if (w != nullptr)
58 {
59 WindowSetPosition(*w, { valueInt, w->windowPos.y });
60 }
61 return JS_UNDEFINED;
62 }
63 JSValue ScWindow::y_get(JSContext* ctx, JSValue thisVal)
64 {
65 auto w = GetWindow(thisVal);

Callers

nothing calls this directly

Calls 2

GetWindowFunction · 0.85
WindowSetPositionFunction · 0.85

Tested by

no test coverage detected