| 479 | } |
| 480 | |
| 481 | void onMouseUpOverview(WidgetIndex widgetIndex) |
| 482 | { |
| 483 | switch (widgetIndex) |
| 484 | { |
| 485 | case WIDX_LOCATE: |
| 486 | { |
| 487 | WindowBase* mainWindow = WindowGetMain(); |
| 488 | if (mainWindow != nullptr) |
| 489 | { |
| 490 | int32_t player = Network::GetPlayerIndex(static_cast<uint8_t>(number)); |
| 491 | if (player == -1) |
| 492 | { |
| 493 | return; |
| 494 | } |
| 495 | auto coord = Network::GetPlayerLastActionCoord(player); |
| 496 | if (coord.x || coord.y || coord.z) |
| 497 | { |
| 498 | WindowScrollToLocation(*mainWindow, coord); |
| 499 | } |
| 500 | } |
| 501 | } |
| 502 | break; |
| 503 | case WIDX_KICK: |
| 504 | { |
| 505 | auto kickPlayerAction = GameActions::PlayerKickAction(number); |
| 506 | GameActions::Execute(&kickPlayerAction, getGameState()); |
| 507 | } |
| 508 | break; |
| 509 | } |
| 510 | } |
| 511 | |
| 512 | void onDropdownOverview(WidgetIndex widgetIndex, int32_t dropdownIndex) |
| 513 | { |
nothing calls this directly
no test coverage detected