mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
- added protection against oversized menu caption bars.
SWC20 is a mod that contains a caption that is larger then the entire screen and was pushing the actual menu content out of it. Fixes #239
This commit is contained in:
parent
8e0c50c22c
commit
20db6b0c78
3 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ class BloodMenuDelegate : RazeMenuDelegate
|
||||||
}
|
}
|
||||||
double fx, fy, fw, fh;
|
double fx, fy, fw, fh;
|
||||||
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
||||||
int h = texid.isValid()? texsize.Y : fonth;
|
int h = texid.isValid() && texsize.Y < 40? texsize.Y : fonth;
|
||||||
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ class DukeMenuDelegate : RazeMenuDelegate
|
||||||
}
|
}
|
||||||
double fx, fy, fw, fh;
|
double fx, fy, fw, fh;
|
||||||
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
||||||
int h = texid.isValid()? texsize.Y : fonth;
|
int h = texid.isValid() && texsize.Y < 40? texsize.Y : fonth;
|
||||||
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ class SWMenuDelegate : RazeMenuDelegate
|
||||||
}
|
}
|
||||||
double fx, fy, fw, fh;
|
double fx, fy, fw, fh;
|
||||||
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
[fx, fy, fw, fh] = Screen.GetFullscreenRect(320, 200, FSMode_ScaleToFit43Top);
|
||||||
int h = texid.isValid()? texsize.Y : fonth;
|
int h = texid.isValid() && texsize.Y < 40? texsize.Y : fonth;
|
||||||
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
return int((y+h) * fh / 200); // This must be the covered height of the header in true pixels.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue