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

Method maxLength_get

src/openrct2-ui/scripting/ScWidget.hpp:1072–1081  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1070
1071 private:
1072 static JSValue maxLength_get(JSContext* ctx, JSValue thisVal)
1073 {
1074 WidgetData data = GetWidgetData(thisVal);
1075 auto w = GetWindow(data._class, data._number);
1076 if (IsCustomWindow(w))
1077 {
1078 return JS_NewInt32(ctx, GetWidgetMaxLength(w, data._widgetIndex));
1079 }
1080 return JS_NewInt32(ctx, 0);
1081 }
1082
1083 static JSValue maxLength_set(JSContext* ctx, JSValue thisVal, JSValue value)
1084 {

Callers

nothing calls this directly

Calls 2

GetWindowFunction · 0.85
GetWidgetMaxLengthFunction · 0.85

Tested by

no test coverage detected