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

Function GetWidgetMaxLength

src/openrct2-ui/scripting/CustomWindow.cpp:1435–1447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1433 }
1434
1435 int32_t GetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex)
1436 {
1437 if (w->classification == WindowClass::custom)
1438 {
1439 auto& customInfo = GetInfo(static_cast<CustomWindow*>(w));
1440 auto customWidgetInfo = customInfo.GetCustomWidgetDesc(w, widgetIndex);
1441 if (customWidgetInfo != nullptr)
1442 {
1443 return customWidgetInfo->MaxLength;
1444 }
1445 }
1446 return 0;
1447 }
1448
1449 void SetWidgetMaxLength(WindowBase* w, WidgetIndex widgetIndex, int32_t value)
1450 {

Callers 2

maxLength_getMethod · 0.85
focusMethod · 0.85

Calls 1

GetCustomWidgetDescMethod · 0.80

Tested by

no test coverage detected