| 578 | } |
| 579 | |
| 580 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 581 | { |
| 582 | switch (widget) { |
| 583 | case WID_MTS_LIST_LEFT: { // add to playlist |
| 584 | int y = this->GetRowFromWidget(pt.y, widget, WidgetDimensions::scaled.framerect.top, GetCharacterHeight(FS_SMALL)); |
| 585 | _music.PlaylistAdd(y); |
| 586 | break; |
| 587 | } |
| 588 | |
| 589 | case WID_MTS_LIST_RIGHT: { // remove from playlist |
| 590 | int y = this->GetRowFromWidget(pt.y, widget, WidgetDimensions::scaled.framerect.top, GetCharacterHeight(FS_SMALL)); |
| 591 | _music.PlaylistRemove(y); |
| 592 | break; |
| 593 | } |
| 594 | |
| 595 | case WID_MTS_MUSICSET: { |
| 596 | int selected = 0; |
| 597 | ShowDropDownList(this, BuildSetDropDownList<BaseMusic>(&selected), selected, widget); |
| 598 | break; |
| 599 | } |
| 600 | |
| 601 | case WID_MTS_CLEAR: // clear |
| 602 | _music.PlaylistClear(); |
| 603 | break; |
| 604 | |
| 605 | case WID_MTS_ALL: case WID_MTS_OLD: case WID_MTS_NEW: |
| 606 | case WID_MTS_EZY: case WID_MTS_CUSTOM1: case WID_MTS_CUSTOM2: // set playlist |
| 607 | _music.ChangePlaylist((MusicSystem::PlaylistChoices)(widget - WID_MTS_ALL)); |
| 608 | break; |
| 609 | } |
| 610 | } |
| 611 | |
| 612 | void OnDropdownSelect(WidgetID widget, int index, int) override |
| 613 | { |
nothing calls this directly
no test coverage detected