| 3376 | } |
| 3377 | |
| 3378 | void OperatingTweakTextInput(const Ride& ride) |
| 3379 | { |
| 3380 | switch (ride.mode) |
| 3381 | { |
| 3382 | case RideMode::poweredLaunchPasstrough: |
| 3383 | case RideMode::poweredLaunch: |
| 3384 | case RideMode::upwardLaunch: |
| 3385 | case RideMode::poweredLaunchBlockSectioned: |
| 3386 | case RideMode::stationToStation: |
| 3387 | case RideMode::dodgems: |
| 3388 | return; |
| 3389 | default: |
| 3390 | break; |
| 3391 | } |
| 3392 | |
| 3393 | const auto& operatingSettings = ride.getRideTypeDescriptor().OperatingSettings; |
| 3394 | const auto& gameState = getGameState(); |
| 3395 | int16_t maxValue = gameState.cheats.unlockOperatingLimits ? Limits::kCheatsMaxOperatingLimit |
| 3396 | : operatingSettings.MaxValue; |
| 3397 | int16_t minValue = gameState.cheats.unlockOperatingLimits ? 0 : operatingSettings.MinValue; |
| 3398 | |
| 3399 | const auto& title = widgets[WIDX_MODE_TWEAK_LABEL].text; |
| 3400 | Formatter ft; |
| 3401 | ft.Add<int16_t>(minValue * operatingSettings.OperatingSettingMultiplier); |
| 3402 | ft.Add<int16_t>(maxValue * operatingSettings.OperatingSettingMultiplier); |
| 3403 | |
| 3404 | uint16_t currentValue = static_cast<uint16_t>(ride.operationOption) * operatingSettings.OperatingSettingMultiplier; |
| 3405 | char buffer[6]{}; |
| 3406 | snprintf(buffer, std::size(buffer), "%u", currentValue); |
| 3407 | |
| 3408 | WindowTextInputRawOpen(this, WIDX_MODE_TWEAK, title, STR_ENTER_VALUE, ft, buffer, 4); |
| 3409 | } |
| 3410 | |
| 3411 | void OperatingOnDropdown(WidgetIndex widgetIndex, int32_t dropdownIndex) |
| 3412 | { |
nothing calls this directly
no test coverage detected