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

Method OperatingLengthWindow

src/openrct2-ui/windows/Ride.cpp:3360–3376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3358 }
3359
3360 void OperatingLengthWindow(WidgetIndex widgetIndex)
3361 {
3362 auto ride = GetRide(rideId);
3363 if (ride == nullptr)
3364 return;
3365
3366 uint8_t upperBound = Limits::kMaxWaitingTime;
3367 uint8_t lowerBound = 0;
3368 Formatter ft;
3369 ft.Add<int16_t>(lowerBound);
3370 ft.Add<int16_t>(upperBound);
3371 auto title = (widgetIndex == WIDX_MINIMUM_LENGTH) ? STR_MINIMUM_WAITING_TIME : STR_MAXIMUM_WAITING_TIME;
3372 auto currentValue = (widgetIndex == WIDX_MINIMUM_LENGTH) ? ride->minWaitingTime : ride->maxWaitingTime;
3373 char buffer[5]{};
3374 snprintf(buffer, std::size(buffer), "%u", currentValue);
3375 WindowTextInputRawOpen(this, widgetIndex, title, STR_ENTER_VALUE, ft, buffer, 4);
3376 }
3377
3378 void OperatingTweakTextInput(const Ride& ride)
3379 {

Callers

nothing calls this directly

Calls 2

GetRideFunction · 0.85
WindowTextInputRawOpenFunction · 0.85

Tested by

no test coverage detected