| 133 | } |
| 134 | |
| 135 | std::optional<std::pair<int, int>> |
| 136 | UiState::parse_goto(std::string_view x, std::string_view y) const { |
| 137 | const auto px = parse_int_field(x); |
| 138 | const auto py = parse_int_field(y); |
| 139 | if (!px.has_value() || !py.has_value()) { |
| 140 | return std::nullopt; |
| 141 | } |
| 142 | return std::make_pair(*px, *py); |
| 143 | } |
| 144 | |
| 145 | void UiState::set_status_message(std::string msg) { |
| 146 | status_message_ = std::move(msg); |