| 6636 | } |
| 6637 | |
| 6638 | void IncomeOnTextInput(WidgetIndex widgetIndex, std::string_view text) |
| 6639 | { |
| 6640 | if ((widgetIndex != WIDX_PRIMARY_PRICE && widgetIndex != WIDX_SECONDARY_PRICE) || text.empty()) |
| 6641 | return; |
| 6642 | |
| 6643 | std::string strText{ text }; |
| 6644 | money64 price = StringToMoney(strText.c_str()); |
| 6645 | if (price == kMoney64Undefined) |
| 6646 | { |
| 6647 | return; |
| 6648 | } |
| 6649 | |
| 6650 | price = std::clamp(price, kRideMinPrice, kRideMaxPrice); |
| 6651 | |
| 6652 | if (widgetIndex == WIDX_PRIMARY_PRICE) |
| 6653 | { |
| 6654 | IncomeSetPrimaryPrice(price); |
| 6655 | } |
| 6656 | else |
| 6657 | { |
| 6658 | IncomeSetSecondaryPrice(price); |
| 6659 | } |
| 6660 | } |
| 6661 | |
| 6662 | void IncomeOnPrepareDraw() |
| 6663 | { |
nothing calls this directly
no test coverage detected