| 1026 | } |
| 1027 | |
| 1028 | void onTextInputPrice(WidgetIndex widgetIndex, std::string_view text) |
| 1029 | { |
| 1030 | if (widgetIndex == WIDX_PRICE && !text.empty()) |
| 1031 | { |
| 1032 | std::string strText(text); |
| 1033 | auto money = StringToMoney(strText.c_str()); |
| 1034 | if (money == kMoney64Undefined) |
| 1035 | { |
| 1036 | return; |
| 1037 | } |
| 1038 | |
| 1039 | money = std::clamp(money, 0.00_GBP, kMaxEntranceFee); |
| 1040 | auto gameAction = GameActions::ParkSetEntranceFeeAction(money); |
| 1041 | GameActions::Execute(&gameAction, getGameState()); |
| 1042 | } |
| 1043 | } |
| 1044 | |
| 1045 | void onPrepareDrawObjective() |
| 1046 | { |
nothing calls this directly
no test coverage detected