From: Holger Schemel Date: Wed, 12 Apr 2023 11:54:25 +0000 (+0200) Subject: added showing configured level on music info screen X-Git-Tag: 4.3.6.0~33 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=07a0f43d96ff82b3254cfe4c6fcec5fe769d6e20;p=rocksndiamonds.git added showing configured level on music info screen --- diff --git a/src/screens.c b/src/screens.c index 60637697..a7e16439 100644 --- a/src/screens.c +++ b/src/screens.c @@ -3595,6 +3595,35 @@ void HandleInfoScreen_Music(int dx, int dy, int button) ystart += ystep_head; } + int music_level_nr = -1; + int i; + + if (!list->is_sound) + { + // check if this music is configured for a certain level + for (i = leveldir_current->first_level; + i <= leveldir_current->last_level; i++) + { + // (special case: "list->music" may be negative for unconfigured music) + if (levelset.music[i] != MUS_UNDEFINED && + levelset.music[i] == list->music) + { + music_level_nr = i; + + break; + } + } + + if (music_level_nr != -1) + { + DrawTextSCentered(ystart, font_head, "played in"); + ystart += ystep_head; + + DrawTextFCentered(ystart, font_text, "level %03d", music_level_nr); + ystart += ystep_head; + } + } + DrawTextSCentered(ybottom, font_foot, TEXT_NEXT_PAGE); if (button != MB_MENU_INITIALIZE)