Adjust GUI to different resolutions
This commit is contained in:
parent
9b2fc5f14c
commit
50ceea3f0a
4 changed files with 64 additions and 41 deletions
15
renderer.h
15
renderer.h
|
@ -1871,20 +1871,27 @@ void LCR_rendererDrawMenu(const char *tabName,const char **items,
|
|||
s2++;
|
||||
}
|
||||
|
||||
#define _MENU_ITEM_HEIGHT (LCR_EFFECTIVE_RESOLUTION_Y / 20)
|
||||
#define _FONT_SIZE (2 + LCR_EFFECTIVE_RESOLUTION_Y / 512)
|
||||
|
||||
if (j == selectedItem + 1)
|
||||
for (int y = i - 10; y < i + LCR_rendererComputeTextHeight(3) + 10; ++y)
|
||||
for (int y = i - 7; y < i + LCR_rendererComputeTextHeight(_FONT_SIZE) + 7;
|
||||
++y)
|
||||
for (int x = LCR_EFFECTIVE_RESOLUTION_X / 4;
|
||||
x < LCR_EFFECTIVE_RESOLUTION_X - LCR_EFFECTIVE_RESOLUTION_X / 4; ++x)
|
||||
LCR_gameDrawPixelXYSafe(x,y,0x5c1b + 4 * ((x & 0x10) == (y & 0x10)));
|
||||
|
||||
LCR_rendererDrawText(s,(LCR_EFFECTIVE_RESOLUTION_X -
|
||||
LCR_rendererComputeTextWidth(s,3)) / 2,i,
|
||||
(j == 0 || j == selectedItem + 1) ? 0xf79c : textColor,3);
|
||||
LCR_rendererComputeTextWidth(s,_FONT_SIZE)) / 2,i,
|
||||
(j == 0 || j == selectedItem + 1) ? 0xf79c : textColor,_FONT_SIZE);
|
||||
|
||||
if (j == 0)
|
||||
i = stripHeight + stripHeight2;
|
||||
|
||||
i += LCR_rendererComputeTextHeight(5);
|
||||
i += _MENU_ITEM_HEIGHT;
|
||||
|
||||
#undef _FONT_SIZE
|
||||
#undef _MENU_ITEM_HEIGHT
|
||||
}
|
||||
|
||||
#if !LCR_SETTING_POTATO_GRAPHICS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue