X-Git-Url: https://code.delx.au/refind/blobdiff_plain/01d6efef434287c7661d149b4f34dbfb156ce7ec..b04a842814ccc991ed93a52acbd7ac27768be686:/refind/menu.c diff --git a/refind/menu.c b/refind/menu.c index dc3121d..4fa93b1 100644 --- a/refind/menu.c +++ b/refind/menu.c @@ -63,6 +63,7 @@ #include "libeg.h" #include "libegint.h" #include "line_edit.h" +#include "mystrings.h" #include "../include/refit_call_wrapper.h" #include "../include/egemb_back_selected_small.h" @@ -969,17 +970,15 @@ static VOID DrawMainMenuEntry(REFIT_MENU_ENTRY *Entry, BOOLEAN selected, UINTN X { EG_IMAGE *Background; - if (SelectionImages != NULL) { - if (selected) { - Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, + if (selected) { + Background = egCropImage(GlobalConfig.ScreenBackground, XPos, YPos, + SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height); + egComposeImage(Background, SelectionImages[Entry->Row], 0, 0); + BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos); + } else { // Image not selected; copy background + egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos, SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height); - egComposeImage(Background, SelectionImages[Entry->Row], 0, 0); - BltImageCompositeBadge(Background, Entry->Image, Entry->BadgeImage, XPos, YPos); - } else { // Image not selected; copy background - egDrawImageWithTransparency(Entry->Image, Entry->BadgeImage, XPos, YPos, - SelectionImages[Entry->Row]->Width, SelectionImages[Entry->Row]->Height); - } // if/else - } // if + } // if/else } // VOID DrawMainMenuEntry() static VOID PaintAll(IN REFIT_MENU_SCREEN *Screen, IN SCROLL_STATE *State, UINTN *itemPosX,