1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 01:59:43 +01:00

Fix legend positions

This commit is contained in:
AllyTally 2022-11-30 15:02:05 -04:00 committed by Misa Elizabeth Kai
parent cbfef2eb53
commit 88142ea839

View file

@ -2060,20 +2060,23 @@ static MapRenderData getmaprenderdata()
data.zoom = map.custommode ? map.customzoom : 1; data.zoom = map.custommode ? map.customzoom : 1;
data.xoff = map.custommode ? map.custommmxoff : 0; data.xoff = map.custommode ? map.custommmxoff : 0;
data.yoff = map.custommode ? map.custommmyoff : 0; data.yoff = map.custommode ? map.custommmyoff : 0;
data.legendxoff = 40 + data.xoff;
data.legendyoff = 21 + data.yoff;
// Magic numbers for centering legend tiles.
switch (data.zoom) switch (data.zoom)
{ {
case 4: case 4:
data.legendxoff = 60; data.legendxoff += 21;
data.legendyoff = 35; data.legendyoff += 16;
break; break;
case 2: case 2:
data.legendxoff = 48; data.legendxoff += 9;
data.legendyoff = 26; data.legendyoff += 5;
break; break;
default: default:
data.legendxoff = 43; data.legendxoff += 3;
data.legendyoff = 22; data.legendyoff += 1;
break; break;
} }