Minor styling changes to thumbnails

This commit is contained in:
Sasha Koshka
2022-05-02 02:10:05 -04:00
parent 175adacfb1
commit 3e5614b442
2 changed files with 15 additions and 5 deletions

View File

@@ -192,7 +192,8 @@ int data_refreshWorldList () {
SDL_Surface *image = SDL_LoadBMP(path);
if (!image) { return 4; }
if (image->h < image->w) {
// Do not accept vertical images
if (image->h <= image->w) {
int scale = image->h / 16;
int *pixel = item->thumbnail.buffer;
for (int y = 0; y < 16; y ++)

View File

@@ -326,10 +326,19 @@ int drawWorldListItem (
mouseY < y + 16 ;
SDL_Rect rect;
rect.x = x;
rect.y = y;
rect.w = 128;
rect.h = 16;
rect.x = x - 1;
rect.y = y - 1;
rect.w = 130;
rect.h = 18;
SDL_Rect thumbnailShadow;
thumbnailShadow.x = x + 1;
thumbnailShadow.y = y + 1;
thumbnailShadow.w = 16;
thumbnailShadow.h = 16;
tblack(renderer);
SDL_RenderFillRect(renderer, &thumbnailShadow);
int *pixel = item->thumbnail.buffer;
for (int yy = 0; yy < 16; yy++) {